HIP: Heterogenous-computing Interface for Portability
hip_hcc.h
1 /*
2 Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved.
3 
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10 
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
21 */
22 
23 #ifndef HIP_INCLUDE_HIP_HIP_HCC_H
24 #define HIP_INCLUDE_HIP_HIP_HCC_H
25 
26 #ifdef __HCC__
27 
28 #include "hip/hip_runtime_api.h"
29 
30 // Forward declarations:
31 namespace hc {
32 class accelerator;
33 class accelerator_view;
34 }; // namespace hc
35 
36 
51 HIP_PUBLIC_API
52 hipError_t hipHccGetAccelerator(int deviceId, hc::accelerator* acc);
53 
60 HIP_PUBLIC_API
61 hipError_t hipHccGetAcceleratorView(hipStream_t stream, hc::accelerator_view** av);
62 
63 
94 HIP_PUBLIC_API
95 hipError_t hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
96  uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ,
97  uint32_t localWorkSizeX, uint32_t localWorkSizeY,
98  uint32_t localWorkSizeZ, size_t sharedMemBytes,
99  hipStream_t hStream, void** kernelParams, void** extra,
100  hipEvent_t startEvent = nullptr,
101  hipEvent_t stopEvent = nullptr,
102  uint32_t flags = 0);
103 
104 HIP_PUBLIC_API
105 hipError_t hipHccModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
106  uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ,
107  uint32_t localWorkSizeX, uint32_t localWorkSizeY,
108  uint32_t localWorkSizeZ, size_t sharedMemBytes,
109  hipStream_t hStream, void** kernelParams, void** extra,
110  hipEvent_t startEvent = nullptr,
111  hipEvent_t stopEvent = nullptr)
112  __attribute__((deprecated("use hipExtModuleLaunchKernel instead")));
113 
114 // doxygen end HCC-specific features
118 #endif // #ifdef __HCC__
119 #endif // #ifdef HIP_INCLUDE_HIP_HIP_HCC_H
HIP_PUBLIC_API hipError_t hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, uint32_t localWorkSizeX, uint32_t localWorkSizeY, uint32_t localWorkSizeZ, size_t sharedMemBytes, hipStream_t hStream, void **kernelParams, void **extra, hipEvent_t startEvent=nullptr, hipEvent_t stopEvent=nullptr, uint32_t flags=0)
launches kernel f with launch parameters and shared memory on stream with arguments passed to kernelp...
HIP_PUBLIC_API hipError_t hipHccGetAcceleratorView(hipStream_t stream, hc::accelerator_view **av)
Return hc::accelerator_view associated with the specified stream.
HIP_PUBLIC_API hipError_t hipHccGetAccelerator(int deviceId, hc::accelerator *acc)
Return hc::accelerator associated with the specified deviceId.
Definition: hip_hcc.h:31