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 hipError_t hipHccGetAccelerator(int deviceId, hc::accelerator* acc);
52 
59 hipError_t hipHccGetAcceleratorView(hipStream_t stream, hc::accelerator_view** av);
60 
61 
92 hipError_t hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
93  uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ,
94  uint32_t localWorkSizeX, uint32_t localWorkSizeY,
95  uint32_t localWorkSizeZ, size_t sharedMemBytes,
96  hipStream_t hStream, void** kernelParams, void** extra,
97  hipEvent_t startEvent = nullptr,
98  hipEvent_t stopEvent = nullptr,
99  uint32_t flags = 0);
100 
101 hipError_t hipHccModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
102  uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ,
103  uint32_t localWorkSizeX, uint32_t localWorkSizeY,
104  uint32_t localWorkSizeZ, size_t sharedMemBytes,
105  hipStream_t hStream, void** kernelParams, void** extra,
106  hipEvent_t startEvent = nullptr,
107  hipEvent_t stopEvent = nullptr)
108  __attribute__((deprecated("use hipExtModuleLaunchKernel instead")));
109 
110 // doxygen end HCC-specific features
114 #endif // #ifdef __HCC__
115 #endif // #ifdef HIP_INCLUDE_HIP_HIP_HCC_H
hipError_t hipHccGetAccelerator(int deviceId, hc::accelerator *acc)
Return hc::accelerator associated with the specified deviceId.
Definition: hip_hcc.cpp:2436
_Float16 __2f16 __attribute__((ext_vector_type(2)))
Copies the size of symbol symbolName to size.
Definition: hip_fp16_math_fwd.h:53
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...
Definition: hip_module.cpp:290
Definition: hip_module.cpp:106
hipError_t hipHccGetAcceleratorView(hipStream_t stream, hc::accelerator_view **av)
Return hc::accelerator_view associated with the specified stream.
Definition: hip_hcc.cpp:2452
Definition: hip_hcc_internal.h:705
Definition: hip_hcc_internal.h:524
Definition: hip_hcc.h:31