triton-windows 3.3.1.post19__cp310-cp310-win_amd64.whl → 3.3.1.post21__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of triton-windows might be problematic. Click here for more details.
- triton/_C/libtriton.pyd +0 -0
- triton/backends/amd/driver.py +6 -1
- triton/backends/nvidia/compiler.py +1 -3
- triton/backends/nvidia/driver.py +7 -3
- triton/runtime/autotuner.py +2 -2
- triton/runtime/build.py +5 -5
- triton/windows_utils.py +11 -4
- {triton_windows-3.3.1.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/METADATA +1 -1
- {triton_windows-3.3.1.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/RECORD +11 -108
- triton/backends/amd/include/hip/amd_detail/amd_channel_descriptor.h +0 -358
- triton/backends/amd/include/hip/amd_detail/amd_device_functions.h +0 -1010
- triton/backends/amd/include/hip/amd_detail/amd_hip_atomic.h +0 -1638
- triton/backends/amd/include/hip/amd_detail/amd_hip_bf16.h +0 -1814
- triton/backends/amd/include/hip/amd_detail/amd_hip_bfloat16.h +0 -293
- triton/backends/amd/include/hip/amd_detail/amd_hip_common.h +0 -32
- triton/backends/amd/include/hip/amd_detail/amd_hip_complex.h +0 -174
- triton/backends/amd/include/hip/amd_detail/amd_hip_cooperative_groups.h +0 -835
- triton/backends/amd/include/hip/amd_detail/amd_hip_fp16.h +0 -1809
- triton/backends/amd/include/hip/amd_detail/amd_hip_fp8.h +0 -1391
- triton/backends/amd/include/hip/amd_detail/amd_hip_gl_interop.h +0 -108
- triton/backends/amd/include/hip/amd_detail/amd_hip_math_constants.h +0 -124
- triton/backends/amd/include/hip/amd_detail/amd_hip_runtime.h +0 -405
- triton/backends/amd/include/hip/amd_detail/amd_hip_runtime_pt_api.h +0 -196
- triton/backends/amd/include/hip/amd_detail/amd_hip_unsafe_atomics.h +0 -565
- triton/backends/amd/include/hip/amd_detail/amd_hip_vector_types.h +0 -2226
- triton/backends/amd/include/hip/amd_detail/amd_math_functions.h +0 -104
- triton/backends/amd/include/hip/amd_detail/amd_surface_functions.h +0 -244
- triton/backends/amd/include/hip/amd_detail/amd_warp_functions.h +0 -538
- triton/backends/amd/include/hip/amd_detail/amd_warp_sync_functions.h +0 -288
- triton/backends/amd/include/hip/amd_detail/concepts.hpp +0 -30
- triton/backends/amd/include/hip/amd_detail/device_library_decls.h +0 -133
- triton/backends/amd/include/hip/amd_detail/functional_grid_launch.hpp +0 -218
- triton/backends/amd/include/hip/amd_detail/grid_launch.h +0 -67
- triton/backends/amd/include/hip/amd_detail/grid_launch.hpp +0 -50
- triton/backends/amd/include/hip/amd_detail/grid_launch_GGL.hpp +0 -26
- triton/backends/amd/include/hip/amd_detail/helpers.hpp +0 -137
- triton/backends/amd/include/hip/amd_detail/hip_api_trace.hpp +0 -1446
- triton/backends/amd/include/hip/amd_detail/hip_assert.h +0 -101
- triton/backends/amd/include/hip/amd_detail/hip_cooperative_groups_helper.h +0 -242
- triton/backends/amd/include/hip/amd_detail/hip_fp16_gcc.h +0 -254
- triton/backends/amd/include/hip/amd_detail/hip_fp16_math_fwd.h +0 -96
- triton/backends/amd/include/hip/amd_detail/hip_ldg.h +0 -100
- triton/backends/amd/include/hip/amd_detail/hip_prof_str.h +0 -10570
- triton/backends/amd/include/hip/amd_detail/hip_runtime_prof.h +0 -78
- triton/backends/amd/include/hip/amd_detail/host_defines.h +0 -184
- triton/backends/amd/include/hip/amd_detail/hsa_helpers.hpp +0 -102
- triton/backends/amd/include/hip/amd_detail/macro_based_grid_launch.hpp +0 -798
- triton/backends/amd/include/hip/amd_detail/math_fwd.h +0 -698
- triton/backends/amd/include/hip/amd_detail/ockl_image.h +0 -177
- triton/backends/amd/include/hip/amd_detail/program_state.hpp +0 -107
- triton/backends/amd/include/hip/amd_detail/texture_fetch_functions.h +0 -491
- triton/backends/amd/include/hip/amd_detail/texture_indirect_functions.h +0 -478
- triton/backends/amd/include/hip/channel_descriptor.h +0 -39
- triton/backends/amd/include/hip/device_functions.h +0 -38
- triton/backends/amd/include/hip/driver_types.h +0 -468
- triton/backends/amd/include/hip/hip_bf16.h +0 -36
- triton/backends/amd/include/hip/hip_bfloat16.h +0 -44
- triton/backends/amd/include/hip/hip_common.h +0 -100
- triton/backends/amd/include/hip/hip_complex.h +0 -38
- triton/backends/amd/include/hip/hip_cooperative_groups.h +0 -46
- triton/backends/amd/include/hip/hip_deprecated.h +0 -95
- triton/backends/amd/include/hip/hip_ext.h +0 -161
- triton/backends/amd/include/hip/hip_fp16.h +0 -36
- triton/backends/amd/include/hip/hip_fp8.h +0 -33
- triton/backends/amd/include/hip/hip_gl_interop.h +0 -32
- triton/backends/amd/include/hip/hip_hcc.h +0 -24
- triton/backends/amd/include/hip/hip_math_constants.h +0 -36
- triton/backends/amd/include/hip/hip_profile.h +0 -27
- triton/backends/amd/include/hip/hip_runtime.h +0 -75
- triton/backends/amd/include/hip/hip_runtime_api.h +0 -9261
- triton/backends/amd/include/hip/hip_texture_types.h +0 -29
- triton/backends/amd/include/hip/hip_vector_types.h +0 -41
- triton/backends/amd/include/hip/hip_version.h +0 -17
- triton/backends/amd/include/hip/hiprtc.h +0 -421
- triton/backends/amd/include/hip/library_types.h +0 -78
- triton/backends/amd/include/hip/math_functions.h +0 -42
- triton/backends/amd/include/hip/surface_types.h +0 -63
- triton/backends/amd/include/hip/texture_types.h +0 -194
- triton/backends/amd/include/hsa/Brig.h +0 -1131
- triton/backends/amd/include/hsa/amd_hsa_common.h +0 -91
- triton/backends/amd/include/hsa/amd_hsa_elf.h +0 -462
- triton/backends/amd/include/hsa/amd_hsa_kernel_code.h +0 -269
- triton/backends/amd/include/hsa/amd_hsa_queue.h +0 -109
- triton/backends/amd/include/hsa/amd_hsa_signal.h +0 -80
- triton/backends/amd/include/hsa/hsa.h +0 -5738
- triton/backends/amd/include/hsa/hsa_amd_tool.h +0 -91
- triton/backends/amd/include/hsa/hsa_api_trace.h +0 -579
- triton/backends/amd/include/hsa/hsa_api_trace_version.h +0 -68
- triton/backends/amd/include/hsa/hsa_ext_amd.h +0 -3146
- triton/backends/amd/include/hsa/hsa_ext_finalize.h +0 -531
- triton/backends/amd/include/hsa/hsa_ext_image.h +0 -1454
- triton/backends/amd/include/hsa/hsa_ven_amd_aqlprofile.h +0 -488
- triton/backends/amd/include/hsa/hsa_ven_amd_loader.h +0 -667
- triton/backends/amd/include/hsa/hsa_ven_amd_pc_sampling.h +0 -416
- triton/backends/amd/include/roctracer/ext/prof_protocol.h +0 -107
- triton/backends/amd/include/roctracer/hip_ostream_ops.h +0 -4515
- triton/backends/amd/include/roctracer/hsa_ostream_ops.h +0 -1727
- triton/backends/amd/include/roctracer/hsa_prof_str.h +0 -3059
- triton/backends/amd/include/roctracer/roctracer.h +0 -779
- triton/backends/amd/include/roctracer/roctracer_ext.h +0 -81
- triton/backends/amd/include/roctracer/roctracer_hcc.h +0 -24
- triton/backends/amd/include/roctracer/roctracer_hip.h +0 -37
- triton/backends/amd/include/roctracer/roctracer_hsa.h +0 -112
- triton/backends/amd/include/roctracer/roctracer_plugin.h +0 -137
- triton/backends/amd/include/roctracer/roctracer_roctx.h +0 -67
- triton/backends/amd/include/roctracer/roctx.h +0 -229
- {triton_windows-3.3.1.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/WHEEL +0 -0
- {triton_windows-3.3.1.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/top_level.txt +0 -0
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2015 - 2023 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_DRIVER_TYPES_H
|
|
24
|
-
#define HIP_INCLUDE_HIP_DRIVER_TYPES_H
|
|
25
|
-
|
|
26
|
-
#if !defined(__HIPCC_RTC__)
|
|
27
|
-
#include <hip/hip_common.h>
|
|
28
|
-
#endif
|
|
29
|
-
|
|
30
|
-
#if !defined(__HIP_PLATFORM_AMD__) && defined(__HIP_PLATFORM_NVIDIA__)
|
|
31
|
-
#include "driver_types.h"
|
|
32
|
-
#elif defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
|
|
33
|
-
|
|
34
|
-
#if !defined(__HIPCC_RTC__)
|
|
35
|
-
#ifndef __cplusplus
|
|
36
|
-
#include <stdbool.h>
|
|
37
|
-
#endif
|
|
38
|
-
#endif // !defined(__HIPCC_RTC__)
|
|
39
|
-
typedef void* hipDeviceptr_t;
|
|
40
|
-
typedef enum hipChannelFormatKind {
|
|
41
|
-
hipChannelFormatKindSigned = 0,
|
|
42
|
-
hipChannelFormatKindUnsigned = 1,
|
|
43
|
-
hipChannelFormatKindFloat = 2,
|
|
44
|
-
hipChannelFormatKindNone = 3
|
|
45
|
-
}hipChannelFormatKind;
|
|
46
|
-
typedef struct hipChannelFormatDesc {
|
|
47
|
-
int x;
|
|
48
|
-
int y;
|
|
49
|
-
int z;
|
|
50
|
-
int w;
|
|
51
|
-
enum hipChannelFormatKind f;
|
|
52
|
-
}hipChannelFormatDesc;
|
|
53
|
-
#define HIP_TRSA_OVERRIDE_FORMAT 0x01
|
|
54
|
-
#define HIP_TRSF_READ_AS_INTEGER 0x01
|
|
55
|
-
#define HIP_TRSF_NORMALIZED_COORDINATES 0x02
|
|
56
|
-
#define HIP_TRSF_SRGB 0x10
|
|
57
|
-
|
|
58
|
-
typedef struct hipArray* hipArray_t;
|
|
59
|
-
typedef const struct hipArray* hipArray_const_t;
|
|
60
|
-
typedef enum hipArray_Format {
|
|
61
|
-
HIP_AD_FORMAT_UNSIGNED_INT8 = 0x01,
|
|
62
|
-
HIP_AD_FORMAT_UNSIGNED_INT16 = 0x02,
|
|
63
|
-
HIP_AD_FORMAT_UNSIGNED_INT32 = 0x03,
|
|
64
|
-
HIP_AD_FORMAT_SIGNED_INT8 = 0x08,
|
|
65
|
-
HIP_AD_FORMAT_SIGNED_INT16 = 0x09,
|
|
66
|
-
HIP_AD_FORMAT_SIGNED_INT32 = 0x0a,
|
|
67
|
-
HIP_AD_FORMAT_HALF = 0x10,
|
|
68
|
-
HIP_AD_FORMAT_FLOAT = 0x20
|
|
69
|
-
}hipArray_Format;
|
|
70
|
-
typedef struct HIP_ARRAY_DESCRIPTOR {
|
|
71
|
-
size_t Width;
|
|
72
|
-
size_t Height;
|
|
73
|
-
enum hipArray_Format Format;
|
|
74
|
-
unsigned int NumChannels;
|
|
75
|
-
}HIP_ARRAY_DESCRIPTOR;
|
|
76
|
-
typedef struct HIP_ARRAY3D_DESCRIPTOR {
|
|
77
|
-
size_t Width;
|
|
78
|
-
size_t Height;
|
|
79
|
-
size_t Depth;
|
|
80
|
-
enum hipArray_Format Format;
|
|
81
|
-
unsigned int NumChannels;
|
|
82
|
-
unsigned int Flags;
|
|
83
|
-
}HIP_ARRAY3D_DESCRIPTOR;
|
|
84
|
-
#if !defined(__HIPCC_RTC__)
|
|
85
|
-
typedef struct hip_Memcpy2D {
|
|
86
|
-
size_t srcXInBytes;
|
|
87
|
-
size_t srcY;
|
|
88
|
-
hipMemoryType srcMemoryType;
|
|
89
|
-
const void* srcHost;
|
|
90
|
-
hipDeviceptr_t srcDevice;
|
|
91
|
-
hipArray_t srcArray;
|
|
92
|
-
size_t srcPitch;
|
|
93
|
-
size_t dstXInBytes;
|
|
94
|
-
size_t dstY;
|
|
95
|
-
hipMemoryType dstMemoryType;
|
|
96
|
-
void* dstHost;
|
|
97
|
-
hipDeviceptr_t dstDevice;
|
|
98
|
-
hipArray_t dstArray;
|
|
99
|
-
size_t dstPitch;
|
|
100
|
-
size_t WidthInBytes;
|
|
101
|
-
size_t Height;
|
|
102
|
-
} hip_Memcpy2D;
|
|
103
|
-
#endif // !defined(__HIPCC_RTC__)
|
|
104
|
-
typedef struct hipMipmappedArray {
|
|
105
|
-
void* data;
|
|
106
|
-
struct hipChannelFormatDesc desc;
|
|
107
|
-
unsigned int type;
|
|
108
|
-
unsigned int width;
|
|
109
|
-
unsigned int height;
|
|
110
|
-
unsigned int depth;
|
|
111
|
-
unsigned int min_mipmap_level;
|
|
112
|
-
unsigned int max_mipmap_level;
|
|
113
|
-
unsigned int flags;
|
|
114
|
-
enum hipArray_Format format;
|
|
115
|
-
unsigned int num_channels;
|
|
116
|
-
} hipMipmappedArray;
|
|
117
|
-
typedef struct hipMipmappedArray* hipMipmappedArray_t;
|
|
118
|
-
typedef hipMipmappedArray_t hipmipmappedArray;
|
|
119
|
-
typedef const struct hipMipmappedArray* hipMipmappedArray_const_t;
|
|
120
|
-
/**
|
|
121
|
-
* hip resource types
|
|
122
|
-
*/
|
|
123
|
-
typedef enum hipResourceType {
|
|
124
|
-
hipResourceTypeArray = 0x00,
|
|
125
|
-
hipResourceTypeMipmappedArray = 0x01,
|
|
126
|
-
hipResourceTypeLinear = 0x02,
|
|
127
|
-
hipResourceTypePitch2D = 0x03
|
|
128
|
-
}hipResourceType;
|
|
129
|
-
typedef enum HIPresourcetype_enum {
|
|
130
|
-
HIP_RESOURCE_TYPE_ARRAY = 0x00, /**< Array resoure */
|
|
131
|
-
HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY = 0x01, /**< Mipmapped array resource */
|
|
132
|
-
HIP_RESOURCE_TYPE_LINEAR = 0x02, /**< Linear resource */
|
|
133
|
-
HIP_RESOURCE_TYPE_PITCH2D = 0x03 /**< Pitch 2D resource */
|
|
134
|
-
} HIPresourcetype, hipResourcetype;
|
|
135
|
-
/**
|
|
136
|
-
* hip address modes
|
|
137
|
-
*/
|
|
138
|
-
typedef enum HIPaddress_mode_enum {
|
|
139
|
-
HIP_TR_ADDRESS_MODE_WRAP = 0,
|
|
140
|
-
HIP_TR_ADDRESS_MODE_CLAMP = 1,
|
|
141
|
-
HIP_TR_ADDRESS_MODE_MIRROR = 2,
|
|
142
|
-
HIP_TR_ADDRESS_MODE_BORDER = 3
|
|
143
|
-
} HIPaddress_mode;
|
|
144
|
-
/**
|
|
145
|
-
* hip filter modes
|
|
146
|
-
*/
|
|
147
|
-
typedef enum HIPfilter_mode_enum {
|
|
148
|
-
HIP_TR_FILTER_MODE_POINT = 0,
|
|
149
|
-
HIP_TR_FILTER_MODE_LINEAR = 1
|
|
150
|
-
} HIPfilter_mode;
|
|
151
|
-
/**
|
|
152
|
-
* Texture descriptor
|
|
153
|
-
*/
|
|
154
|
-
typedef struct HIP_TEXTURE_DESC_st {
|
|
155
|
-
HIPaddress_mode addressMode[3]; /**< Address modes */
|
|
156
|
-
HIPfilter_mode filterMode; /**< Filter mode */
|
|
157
|
-
unsigned int flags; /**< Flags */
|
|
158
|
-
unsigned int maxAnisotropy; /**< Maximum anisotropy ratio */
|
|
159
|
-
HIPfilter_mode mipmapFilterMode; /**< Mipmap filter mode */
|
|
160
|
-
float mipmapLevelBias; /**< Mipmap level bias */
|
|
161
|
-
float minMipmapLevelClamp; /**< Mipmap minimum level clamp */
|
|
162
|
-
float maxMipmapLevelClamp; /**< Mipmap maximum level clamp */
|
|
163
|
-
float borderColor[4]; /**< Border Color */
|
|
164
|
-
int reserved[12];
|
|
165
|
-
} HIP_TEXTURE_DESC;
|
|
166
|
-
/**
|
|
167
|
-
* hip texture resource view formats
|
|
168
|
-
*/
|
|
169
|
-
typedef enum hipResourceViewFormat {
|
|
170
|
-
hipResViewFormatNone = 0x00,
|
|
171
|
-
hipResViewFormatUnsignedChar1 = 0x01,
|
|
172
|
-
hipResViewFormatUnsignedChar2 = 0x02,
|
|
173
|
-
hipResViewFormatUnsignedChar4 = 0x03,
|
|
174
|
-
hipResViewFormatSignedChar1 = 0x04,
|
|
175
|
-
hipResViewFormatSignedChar2 = 0x05,
|
|
176
|
-
hipResViewFormatSignedChar4 = 0x06,
|
|
177
|
-
hipResViewFormatUnsignedShort1 = 0x07,
|
|
178
|
-
hipResViewFormatUnsignedShort2 = 0x08,
|
|
179
|
-
hipResViewFormatUnsignedShort4 = 0x09,
|
|
180
|
-
hipResViewFormatSignedShort1 = 0x0a,
|
|
181
|
-
hipResViewFormatSignedShort2 = 0x0b,
|
|
182
|
-
hipResViewFormatSignedShort4 = 0x0c,
|
|
183
|
-
hipResViewFormatUnsignedInt1 = 0x0d,
|
|
184
|
-
hipResViewFormatUnsignedInt2 = 0x0e,
|
|
185
|
-
hipResViewFormatUnsignedInt4 = 0x0f,
|
|
186
|
-
hipResViewFormatSignedInt1 = 0x10,
|
|
187
|
-
hipResViewFormatSignedInt2 = 0x11,
|
|
188
|
-
hipResViewFormatSignedInt4 = 0x12,
|
|
189
|
-
hipResViewFormatHalf1 = 0x13,
|
|
190
|
-
hipResViewFormatHalf2 = 0x14,
|
|
191
|
-
hipResViewFormatHalf4 = 0x15,
|
|
192
|
-
hipResViewFormatFloat1 = 0x16,
|
|
193
|
-
hipResViewFormatFloat2 = 0x17,
|
|
194
|
-
hipResViewFormatFloat4 = 0x18,
|
|
195
|
-
hipResViewFormatUnsignedBlockCompressed1 = 0x19,
|
|
196
|
-
hipResViewFormatUnsignedBlockCompressed2 = 0x1a,
|
|
197
|
-
hipResViewFormatUnsignedBlockCompressed3 = 0x1b,
|
|
198
|
-
hipResViewFormatUnsignedBlockCompressed4 = 0x1c,
|
|
199
|
-
hipResViewFormatSignedBlockCompressed4 = 0x1d,
|
|
200
|
-
hipResViewFormatUnsignedBlockCompressed5 = 0x1e,
|
|
201
|
-
hipResViewFormatSignedBlockCompressed5 = 0x1f,
|
|
202
|
-
hipResViewFormatUnsignedBlockCompressed6H = 0x20,
|
|
203
|
-
hipResViewFormatSignedBlockCompressed6H = 0x21,
|
|
204
|
-
hipResViewFormatUnsignedBlockCompressed7 = 0x22
|
|
205
|
-
}hipResourceViewFormat;
|
|
206
|
-
typedef enum HIPresourceViewFormat_enum
|
|
207
|
-
{
|
|
208
|
-
HIP_RES_VIEW_FORMAT_NONE = 0x00, /**< No resource view format (use underlying resource format) */
|
|
209
|
-
HIP_RES_VIEW_FORMAT_UINT_1X8 = 0x01, /**< 1 channel unsigned 8-bit integers */
|
|
210
|
-
HIP_RES_VIEW_FORMAT_UINT_2X8 = 0x02, /**< 2 channel unsigned 8-bit integers */
|
|
211
|
-
HIP_RES_VIEW_FORMAT_UINT_4X8 = 0x03, /**< 4 channel unsigned 8-bit integers */
|
|
212
|
-
HIP_RES_VIEW_FORMAT_SINT_1X8 = 0x04, /**< 1 channel signed 8-bit integers */
|
|
213
|
-
HIP_RES_VIEW_FORMAT_SINT_2X8 = 0x05, /**< 2 channel signed 8-bit integers */
|
|
214
|
-
HIP_RES_VIEW_FORMAT_SINT_4X8 = 0x06, /**< 4 channel signed 8-bit integers */
|
|
215
|
-
HIP_RES_VIEW_FORMAT_UINT_1X16 = 0x07, /**< 1 channel unsigned 16-bit integers */
|
|
216
|
-
HIP_RES_VIEW_FORMAT_UINT_2X16 = 0x08, /**< 2 channel unsigned 16-bit integers */
|
|
217
|
-
HIP_RES_VIEW_FORMAT_UINT_4X16 = 0x09, /**< 4 channel unsigned 16-bit integers */
|
|
218
|
-
HIP_RES_VIEW_FORMAT_SINT_1X16 = 0x0a, /**< 1 channel signed 16-bit integers */
|
|
219
|
-
HIP_RES_VIEW_FORMAT_SINT_2X16 = 0x0b, /**< 2 channel signed 16-bit integers */
|
|
220
|
-
HIP_RES_VIEW_FORMAT_SINT_4X16 = 0x0c, /**< 4 channel signed 16-bit integers */
|
|
221
|
-
HIP_RES_VIEW_FORMAT_UINT_1X32 = 0x0d, /**< 1 channel unsigned 32-bit integers */
|
|
222
|
-
HIP_RES_VIEW_FORMAT_UINT_2X32 = 0x0e, /**< 2 channel unsigned 32-bit integers */
|
|
223
|
-
HIP_RES_VIEW_FORMAT_UINT_4X32 = 0x0f, /**< 4 channel unsigned 32-bit integers */
|
|
224
|
-
HIP_RES_VIEW_FORMAT_SINT_1X32 = 0x10, /**< 1 channel signed 32-bit integers */
|
|
225
|
-
HIP_RES_VIEW_FORMAT_SINT_2X32 = 0x11, /**< 2 channel signed 32-bit integers */
|
|
226
|
-
HIP_RES_VIEW_FORMAT_SINT_4X32 = 0x12, /**< 4 channel signed 32-bit integers */
|
|
227
|
-
HIP_RES_VIEW_FORMAT_FLOAT_1X16 = 0x13, /**< 1 channel 16-bit floating point */
|
|
228
|
-
HIP_RES_VIEW_FORMAT_FLOAT_2X16 = 0x14, /**< 2 channel 16-bit floating point */
|
|
229
|
-
HIP_RES_VIEW_FORMAT_FLOAT_4X16 = 0x15, /**< 4 channel 16-bit floating point */
|
|
230
|
-
HIP_RES_VIEW_FORMAT_FLOAT_1X32 = 0x16, /**< 1 channel 32-bit floating point */
|
|
231
|
-
HIP_RES_VIEW_FORMAT_FLOAT_2X32 = 0x17, /**< 2 channel 32-bit floating point */
|
|
232
|
-
HIP_RES_VIEW_FORMAT_FLOAT_4X32 = 0x18, /**< 4 channel 32-bit floating point */
|
|
233
|
-
HIP_RES_VIEW_FORMAT_UNSIGNED_BC1 = 0x19, /**< Block compressed 1 */
|
|
234
|
-
HIP_RES_VIEW_FORMAT_UNSIGNED_BC2 = 0x1a, /**< Block compressed 2 */
|
|
235
|
-
HIP_RES_VIEW_FORMAT_UNSIGNED_BC3 = 0x1b, /**< Block compressed 3 */
|
|
236
|
-
HIP_RES_VIEW_FORMAT_UNSIGNED_BC4 = 0x1c, /**< Block compressed 4 unsigned */
|
|
237
|
-
HIP_RES_VIEW_FORMAT_SIGNED_BC4 = 0x1d, /**< Block compressed 4 signed */
|
|
238
|
-
HIP_RES_VIEW_FORMAT_UNSIGNED_BC5 = 0x1e, /**< Block compressed 5 unsigned */
|
|
239
|
-
HIP_RES_VIEW_FORMAT_SIGNED_BC5 = 0x1f, /**< Block compressed 5 signed */
|
|
240
|
-
HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H = 0x20, /**< Block compressed 6 unsigned half-float */
|
|
241
|
-
HIP_RES_VIEW_FORMAT_SIGNED_BC6H = 0x21, /**< Block compressed 6 signed half-float */
|
|
242
|
-
HIP_RES_VIEW_FORMAT_UNSIGNED_BC7 = 0x22 /**< Block compressed 7 */
|
|
243
|
-
} HIPresourceViewFormat;
|
|
244
|
-
/**
|
|
245
|
-
* HIP resource descriptor
|
|
246
|
-
*/
|
|
247
|
-
typedef struct hipResourceDesc {
|
|
248
|
-
enum hipResourceType resType;
|
|
249
|
-
union {
|
|
250
|
-
struct {
|
|
251
|
-
hipArray_t array;
|
|
252
|
-
} array;
|
|
253
|
-
struct {
|
|
254
|
-
hipMipmappedArray_t mipmap;
|
|
255
|
-
} mipmap;
|
|
256
|
-
struct {
|
|
257
|
-
void* devPtr;
|
|
258
|
-
struct hipChannelFormatDesc desc;
|
|
259
|
-
size_t sizeInBytes;
|
|
260
|
-
} linear;
|
|
261
|
-
struct {
|
|
262
|
-
void* devPtr;
|
|
263
|
-
struct hipChannelFormatDesc desc;
|
|
264
|
-
size_t width;
|
|
265
|
-
size_t height;
|
|
266
|
-
size_t pitchInBytes;
|
|
267
|
-
} pitch2D;
|
|
268
|
-
} res;
|
|
269
|
-
}hipResourceDesc;
|
|
270
|
-
typedef struct HIP_RESOURCE_DESC_st
|
|
271
|
-
{
|
|
272
|
-
HIPresourcetype resType; /**< Resource type */
|
|
273
|
-
union {
|
|
274
|
-
struct {
|
|
275
|
-
hipArray_t hArray; /**< HIP array */
|
|
276
|
-
} array;
|
|
277
|
-
struct {
|
|
278
|
-
hipMipmappedArray_t hMipmappedArray; /**< HIP mipmapped array */
|
|
279
|
-
} mipmap;
|
|
280
|
-
struct {
|
|
281
|
-
hipDeviceptr_t devPtr; /**< Device pointer */
|
|
282
|
-
hipArray_Format format; /**< Array format */
|
|
283
|
-
unsigned int numChannels; /**< Channels per array element */
|
|
284
|
-
size_t sizeInBytes; /**< Size in bytes */
|
|
285
|
-
} linear;
|
|
286
|
-
struct {
|
|
287
|
-
hipDeviceptr_t devPtr; /**< Device pointer */
|
|
288
|
-
hipArray_Format format; /**< Array format */
|
|
289
|
-
unsigned int numChannels; /**< Channels per array element */
|
|
290
|
-
size_t width; /**< Width of the array in elements */
|
|
291
|
-
size_t height; /**< Height of the array in elements */
|
|
292
|
-
size_t pitchInBytes; /**< Pitch between two rows in bytes */
|
|
293
|
-
} pitch2D;
|
|
294
|
-
struct {
|
|
295
|
-
int reserved[32];
|
|
296
|
-
} reserved;
|
|
297
|
-
} res;
|
|
298
|
-
unsigned int flags; /**< Flags (must be zero) */
|
|
299
|
-
} HIP_RESOURCE_DESC;
|
|
300
|
-
/**
|
|
301
|
-
* hip resource view descriptor
|
|
302
|
-
*/
|
|
303
|
-
struct hipResourceViewDesc {
|
|
304
|
-
enum hipResourceViewFormat format;
|
|
305
|
-
size_t width;
|
|
306
|
-
size_t height;
|
|
307
|
-
size_t depth;
|
|
308
|
-
unsigned int firstMipmapLevel;
|
|
309
|
-
unsigned int lastMipmapLevel;
|
|
310
|
-
unsigned int firstLayer;
|
|
311
|
-
unsigned int lastLayer;
|
|
312
|
-
};
|
|
313
|
-
/**
|
|
314
|
-
* Resource view descriptor
|
|
315
|
-
*/
|
|
316
|
-
typedef struct HIP_RESOURCE_VIEW_DESC_st
|
|
317
|
-
{
|
|
318
|
-
HIPresourceViewFormat format; /**< Resource view format */
|
|
319
|
-
size_t width; /**< Width of the resource view */
|
|
320
|
-
size_t height; /**< Height of the resource view */
|
|
321
|
-
size_t depth; /**< Depth of the resource view */
|
|
322
|
-
unsigned int firstMipmapLevel; /**< First defined mipmap level */
|
|
323
|
-
unsigned int lastMipmapLevel; /**< Last defined mipmap level */
|
|
324
|
-
unsigned int firstLayer; /**< First layer index */
|
|
325
|
-
unsigned int lastLayer; /**< Last layer index */
|
|
326
|
-
unsigned int reserved[16];
|
|
327
|
-
} HIP_RESOURCE_VIEW_DESC;
|
|
328
|
-
/**
|
|
329
|
-
* Memory copy types
|
|
330
|
-
*
|
|
331
|
-
*/
|
|
332
|
-
#if !defined(__HIPCC_RTC__)
|
|
333
|
-
typedef enum hipMemcpyKind {
|
|
334
|
-
hipMemcpyHostToHost = 0, ///< Host-to-Host Copy
|
|
335
|
-
hipMemcpyHostToDevice = 1, ///< Host-to-Device Copy
|
|
336
|
-
hipMemcpyDeviceToHost = 2, ///< Device-to-Host Copy
|
|
337
|
-
hipMemcpyDeviceToDevice = 3, ///< Device-to-Device Copy
|
|
338
|
-
hipMemcpyDefault = 4, ///< Runtime will automatically determine
|
|
339
|
-
///<copy-kind based on virtual addresses.
|
|
340
|
-
hipMemcpyDeviceToDeviceNoCU = 1024 ///< Device-to-Device Copy without using compute units
|
|
341
|
-
} hipMemcpyKind;
|
|
342
|
-
typedef struct hipPitchedPtr {
|
|
343
|
-
void* ptr;
|
|
344
|
-
size_t pitch;
|
|
345
|
-
size_t xsize;
|
|
346
|
-
size_t ysize;
|
|
347
|
-
}hipPitchedPtr;
|
|
348
|
-
typedef struct hipExtent {
|
|
349
|
-
size_t width; // Width in elements when referring to array memory, in bytes when referring to
|
|
350
|
-
// linear memory
|
|
351
|
-
size_t height;
|
|
352
|
-
size_t depth;
|
|
353
|
-
}hipExtent;
|
|
354
|
-
typedef struct hipPos {
|
|
355
|
-
size_t x;
|
|
356
|
-
size_t y;
|
|
357
|
-
size_t z;
|
|
358
|
-
}hipPos;
|
|
359
|
-
typedef struct hipMemcpy3DParms {
|
|
360
|
-
hipArray_t srcArray;
|
|
361
|
-
struct hipPos srcPos;
|
|
362
|
-
struct hipPitchedPtr srcPtr;
|
|
363
|
-
hipArray_t dstArray;
|
|
364
|
-
struct hipPos dstPos;
|
|
365
|
-
struct hipPitchedPtr dstPtr;
|
|
366
|
-
struct hipExtent extent;
|
|
367
|
-
enum hipMemcpyKind kind;
|
|
368
|
-
} hipMemcpy3DParms;
|
|
369
|
-
typedef struct HIP_MEMCPY3D {
|
|
370
|
-
size_t srcXInBytes;
|
|
371
|
-
size_t srcY;
|
|
372
|
-
size_t srcZ;
|
|
373
|
-
size_t srcLOD;
|
|
374
|
-
hipMemoryType srcMemoryType;
|
|
375
|
-
const void* srcHost;
|
|
376
|
-
hipDeviceptr_t srcDevice;
|
|
377
|
-
hipArray_t srcArray;
|
|
378
|
-
size_t srcPitch;
|
|
379
|
-
size_t srcHeight;
|
|
380
|
-
size_t dstXInBytes;
|
|
381
|
-
size_t dstY;
|
|
382
|
-
size_t dstZ;
|
|
383
|
-
size_t dstLOD;
|
|
384
|
-
hipMemoryType dstMemoryType;
|
|
385
|
-
void* dstHost;
|
|
386
|
-
hipDeviceptr_t dstDevice;
|
|
387
|
-
hipArray_t dstArray;
|
|
388
|
-
size_t dstPitch;
|
|
389
|
-
size_t dstHeight;
|
|
390
|
-
size_t WidthInBytes;
|
|
391
|
-
size_t Height;
|
|
392
|
-
size_t Depth;
|
|
393
|
-
} HIP_MEMCPY3D;
|
|
394
|
-
static inline struct hipPitchedPtr make_hipPitchedPtr(void* d, size_t p, size_t xsz,
|
|
395
|
-
size_t ysz) {
|
|
396
|
-
struct hipPitchedPtr s;
|
|
397
|
-
s.ptr = d;
|
|
398
|
-
s.pitch = p;
|
|
399
|
-
s.xsize = xsz;
|
|
400
|
-
s.ysize = ysz;
|
|
401
|
-
return s;
|
|
402
|
-
}
|
|
403
|
-
static inline struct hipPos make_hipPos(size_t x, size_t y, size_t z) {
|
|
404
|
-
struct hipPos p;
|
|
405
|
-
p.x = x;
|
|
406
|
-
p.y = y;
|
|
407
|
-
p.z = z;
|
|
408
|
-
return p;
|
|
409
|
-
}
|
|
410
|
-
static inline struct hipExtent make_hipExtent(size_t w, size_t h, size_t d) {
|
|
411
|
-
struct hipExtent e;
|
|
412
|
-
e.width = w;
|
|
413
|
-
e.height = h;
|
|
414
|
-
e.depth = d;
|
|
415
|
-
return e;
|
|
416
|
-
}
|
|
417
|
-
typedef enum hipFunction_attribute {
|
|
418
|
-
HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK,
|
|
419
|
-
HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES,
|
|
420
|
-
HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES,
|
|
421
|
-
HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES,
|
|
422
|
-
HIP_FUNC_ATTRIBUTE_NUM_REGS,
|
|
423
|
-
HIP_FUNC_ATTRIBUTE_PTX_VERSION,
|
|
424
|
-
HIP_FUNC_ATTRIBUTE_BINARY_VERSION,
|
|
425
|
-
HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA,
|
|
426
|
-
HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES,
|
|
427
|
-
HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT,
|
|
428
|
-
HIP_FUNC_ATTRIBUTE_MAX
|
|
429
|
-
} hipFunction_attribute;
|
|
430
|
-
|
|
431
|
-
typedef enum hipPointer_attribute {
|
|
432
|
-
HIP_POINTER_ATTRIBUTE_CONTEXT = 1, ///< The context on which a pointer was allocated
|
|
433
|
-
///< @warning - not supported in HIP
|
|
434
|
-
HIP_POINTER_ATTRIBUTE_MEMORY_TYPE, ///< memory type describing location of a pointer
|
|
435
|
-
HIP_POINTER_ATTRIBUTE_DEVICE_POINTER,///< address at which the pointer is allocated on device
|
|
436
|
-
HIP_POINTER_ATTRIBUTE_HOST_POINTER, ///< address at which the pointer is allocated on host
|
|
437
|
-
HIP_POINTER_ATTRIBUTE_P2P_TOKENS, ///< A pair of tokens for use with linux kernel interface
|
|
438
|
-
///< @warning - not supported in HIP
|
|
439
|
-
HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS, ///< Synchronize every synchronous memory operation
|
|
440
|
-
///< initiated on this region
|
|
441
|
-
HIP_POINTER_ATTRIBUTE_BUFFER_ID, ///< Unique ID for an allocated memory region
|
|
442
|
-
HIP_POINTER_ATTRIBUTE_IS_MANAGED, ///< Indicates if the pointer points to managed memory
|
|
443
|
-
HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL,///< device ordinal of a device on which a pointer
|
|
444
|
-
///< was allocated or registered
|
|
445
|
-
HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE, ///< if this pointer maps to an allocation
|
|
446
|
-
///< that is suitable for hipIpcGetMemHandle
|
|
447
|
-
///< @warning - not supported in HIP
|
|
448
|
-
HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR,///< Starting address for this requested pointer
|
|
449
|
-
HIP_POINTER_ATTRIBUTE_RANGE_SIZE, ///< Size of the address range for this requested pointer
|
|
450
|
-
HIP_POINTER_ATTRIBUTE_MAPPED, ///< tells if this pointer is in a valid address range
|
|
451
|
-
///< that is mapped to a backing allocation
|
|
452
|
-
HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES,///< Bitmask of allowed hipmemAllocationHandleType
|
|
453
|
-
///< for this allocation @warning - not supported in HIP
|
|
454
|
-
HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, ///< returns if the memory referenced by
|
|
455
|
-
///< this pointer can be used with the GPUDirect RDMA API
|
|
456
|
-
///< @warning - not supported in HIP
|
|
457
|
-
HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS, ///< Returns the access flags the device associated with
|
|
458
|
-
///< for the corresponding memory referenced by the ptr
|
|
459
|
-
HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE ///< Returns the mempool handle for the allocation if
|
|
460
|
-
///< it was allocated from a mempool
|
|
461
|
-
///< @warning - not supported in HIP
|
|
462
|
-
} hipPointer_attribute;
|
|
463
|
-
|
|
464
|
-
#endif // !defined(__HIPCC_RTC__)
|
|
465
|
-
#else
|
|
466
|
-
#error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
|
|
467
|
-
#endif
|
|
468
|
-
#endif
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2023 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_BF16_H
|
|
24
|
-
#define HIP_INCLUDE_HIP_HIP_BF16_H
|
|
25
|
-
|
|
26
|
-
#include <hip/hip_common.h>
|
|
27
|
-
|
|
28
|
-
#if defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
|
|
29
|
-
#include <hip/amd_detail/amd_hip_bf16.h>
|
|
30
|
-
#elif !defined(__HIP_PLATFORM_AMD__) && defined(__HIP_PLATFORM_NVIDIA__)
|
|
31
|
-
#include <hip/nvidia_detail/nvidia_hip_bf16.h>
|
|
32
|
-
#else
|
|
33
|
-
#error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
|
|
34
|
-
#endif
|
|
35
|
-
|
|
36
|
-
#endif // HIP_INCLUDE_HIP_HIP_BF16_H
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MIT License
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2019 - 2022 Advanced Micro Devices, Inc. All rights reserved.
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
* SOFTWARE.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
/*!\file
|
|
26
|
-
* \brief hip_bfloat16.h provides struct for hip_bfloat16 typedef
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
#ifndef _HIP_BFLOAT16_H_
|
|
30
|
-
#define _HIP_BFLOAT16_H_
|
|
31
|
-
|
|
32
|
-
#if !defined(__HIPCC_RTC__)
|
|
33
|
-
#include <hip/hip_common.h>
|
|
34
|
-
#endif
|
|
35
|
-
|
|
36
|
-
#if defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
|
|
37
|
-
#include <hip/amd_detail/amd_hip_bfloat16.h>
|
|
38
|
-
#elif !defined(__HIP_PLATFORM_AMD__) && defined(__HIP_PLATFORM_NVIDIA__)
|
|
39
|
-
#warning "hip_bfloat16.h is not supported on nvidia platform"
|
|
40
|
-
#else
|
|
41
|
-
#error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
|
|
42
|
-
#endif
|
|
43
|
-
|
|
44
|
-
#endif // _HIP_BFLOAT16_H_
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2015 - 2023 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_COMMON_H
|
|
24
|
-
#define HIP_INCLUDE_HIP_HIP_COMMON_H
|
|
25
|
-
|
|
26
|
-
#if defined(__clang__)
|
|
27
|
-
#pragma clang diagnostic push
|
|
28
|
-
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
|
|
29
|
-
#endif
|
|
30
|
-
// Common code included at start of every hip file.
|
|
31
|
-
// Auto enable __HIP_PLATFORM_AMD__ if compiling on AMD platform
|
|
32
|
-
// Other compiler (GCC,ICC,etc) need to set one of these macros explicitly
|
|
33
|
-
#if defined(__clang__) && defined(__HIP__)
|
|
34
|
-
#ifndef __HIP_PLATFORM_AMD__
|
|
35
|
-
#define __HIP_PLATFORM_AMD__
|
|
36
|
-
#endif
|
|
37
|
-
#endif // defined(__clang__) && defined(__HIP__)
|
|
38
|
-
|
|
39
|
-
// Auto enable __HIP_PLATFORM_NVIDIA__ if compiling with NVIDIA platform
|
|
40
|
-
#if defined(__NVCC__) || (defined(__clang__) && defined(__CUDA__) && !defined(__HIP__))
|
|
41
|
-
#ifndef __HIP_PLATFORM_NVIDIA__
|
|
42
|
-
#define __HIP_PLATFORM_NVIDIA__
|
|
43
|
-
#endif
|
|
44
|
-
|
|
45
|
-
#ifdef __CUDACC__
|
|
46
|
-
#define __HIPCC__
|
|
47
|
-
#endif
|
|
48
|
-
|
|
49
|
-
#endif //__NVCC__
|
|
50
|
-
|
|
51
|
-
// Auto enable __HIP_DEVICE_COMPILE__ if compiled in HCC or NVCC device path
|
|
52
|
-
#if (defined(__HCC_ACCELERATOR__) && __HCC_ACCELERATOR__ != 0) || \
|
|
53
|
-
(defined(__CUDA_ARCH__) && __CUDA_ARCH__ != 0)
|
|
54
|
-
#define __HIP_DEVICE_COMPILE__ 1
|
|
55
|
-
#endif
|
|
56
|
-
|
|
57
|
-
#ifdef __GNUC__
|
|
58
|
-
#define HIP_PUBLIC_API __attribute__ ((visibility ("default")))
|
|
59
|
-
#define HIP_INTERNAL_EXPORTED_API __attribute__ ((visibility ("default")))
|
|
60
|
-
#else
|
|
61
|
-
#define HIP_PUBLIC_API
|
|
62
|
-
#define HIP_INTERNAL_EXPORTED_API
|
|
63
|
-
#endif
|
|
64
|
-
|
|
65
|
-
#if __HIP_DEVICE_COMPILE__ == 0
|
|
66
|
-
// 32-bit Atomics
|
|
67
|
-
#define __HIP_ARCH_HAS_GLOBAL_INT32_ATOMICS__ (0)
|
|
68
|
-
#define __HIP_ARCH_HAS_GLOBAL_FLOAT_ATOMIC_EXCH__ (0)
|
|
69
|
-
#define __HIP_ARCH_HAS_SHARED_INT32_ATOMICS__ (0)
|
|
70
|
-
#define __HIP_ARCH_HAS_SHARED_FLOAT_ATOMIC_EXCH__ (0)
|
|
71
|
-
#define __HIP_ARCH_HAS_FLOAT_ATOMIC_ADD__ (0)
|
|
72
|
-
|
|
73
|
-
// 64-bit Atomics
|
|
74
|
-
#define __HIP_ARCH_HAS_GLOBAL_INT64_ATOMICS__ (0)
|
|
75
|
-
#define __HIP_ARCH_HAS_SHARED_INT64_ATOMICS__ (0)
|
|
76
|
-
|
|
77
|
-
// Doubles
|
|
78
|
-
#define __HIP_ARCH_HAS_DOUBLES__ (0)
|
|
79
|
-
|
|
80
|
-
// Warp cross-lane operations
|
|
81
|
-
#define __HIP_ARCH_HAS_WARP_VOTE__ (0)
|
|
82
|
-
#define __HIP_ARCH_HAS_WARP_BALLOT__ (0)
|
|
83
|
-
#define __HIP_ARCH_HAS_WARP_SHUFFLE__ (0)
|
|
84
|
-
#define __HIP_ARCH_HAS_WARP_FUNNEL_SHIFT__ (0)
|
|
85
|
-
|
|
86
|
-
// Sync
|
|
87
|
-
#define __HIP_ARCH_HAS_THREAD_FENCE_SYSTEM__ (0)
|
|
88
|
-
#define __HIP_ARCH_HAS_SYNC_THREAD_EXT__ (0)
|
|
89
|
-
|
|
90
|
-
// Misc
|
|
91
|
-
#define __HIP_ARCH_HAS_SURFACE_FUNCS__ (0)
|
|
92
|
-
#define __HIP_ARCH_HAS_3DGRID__ (0)
|
|
93
|
-
#define __HIP_ARCH_HAS_DYNAMIC_PARALLEL__ (0)
|
|
94
|
-
#endif
|
|
95
|
-
|
|
96
|
-
#if defined(__clang__)
|
|
97
|
-
#pragma clang diagnostic pop
|
|
98
|
-
#endif
|
|
99
|
-
|
|
100
|
-
#endif
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2015 - 2023 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_COMPLEX_H
|
|
24
|
-
#define HIP_INCLUDE_HIP_HIP_COMPLEX_H
|
|
25
|
-
|
|
26
|
-
#if !defined(__HIPCC_RTC__)
|
|
27
|
-
#include <hip/hip_common.h>
|
|
28
|
-
#endif
|
|
29
|
-
|
|
30
|
-
#if defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
|
|
31
|
-
#include <hip/amd_detail/amd_hip_complex.h>
|
|
32
|
-
#elif !defined(__HIP_PLATFORM_AMD__) && defined(__HIP_PLATFORM_NVIDIA__)
|
|
33
|
-
#include <hip/nvidia_detail/nvidia_hip_complex.h>
|
|
34
|
-
#else
|
|
35
|
-
#error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
|
|
36
|
-
#endif
|
|
37
|
-
|
|
38
|
-
#endif
|