triton-windows 3.2.0.post11__cp312-cp312-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.

Files changed (154) hide show
  1. triton/_C/libtriton.pyd +0 -0
  2. triton/__init__.py +85 -0
  3. triton/_internal_testing.py +123 -0
  4. triton/backends/__init__.py +50 -0
  5. triton/backends/amd/compiler.py +368 -0
  6. triton/backends/amd/driver.c +211 -0
  7. triton/backends/amd/driver.py +512 -0
  8. triton/backends/amd/include/hip/amd_detail/amd_channel_descriptor.h +358 -0
  9. triton/backends/amd/include/hip/amd_detail/amd_device_functions.h +1031 -0
  10. triton/backends/amd/include/hip/amd_detail/amd_hip_atomic.h +1612 -0
  11. triton/backends/amd/include/hip/amd_detail/amd_hip_bf16.h +1337 -0
  12. triton/backends/amd/include/hip/amd_detail/amd_hip_bfloat16.h +293 -0
  13. triton/backends/amd/include/hip/amd_detail/amd_hip_common.h +32 -0
  14. triton/backends/amd/include/hip/amd_detail/amd_hip_complex.h +174 -0
  15. triton/backends/amd/include/hip/amd_detail/amd_hip_cooperative_groups.h +829 -0
  16. triton/backends/amd/include/hip/amd_detail/amd_hip_fp16.h +1809 -0
  17. triton/backends/amd/include/hip/amd_detail/amd_hip_gl_interop.h +108 -0
  18. triton/backends/amd/include/hip/amd_detail/amd_hip_math_constants.h +124 -0
  19. triton/backends/amd/include/hip/amd_detail/amd_hip_runtime.h +405 -0
  20. triton/backends/amd/include/hip/amd_detail/amd_hip_runtime_pt_api.h +196 -0
  21. triton/backends/amd/include/hip/amd_detail/amd_hip_unsafe_atomics.h +565 -0
  22. triton/backends/amd/include/hip/amd_detail/amd_hip_vector_types.h +2226 -0
  23. triton/backends/amd/include/hip/amd_detail/amd_math_functions.h +104 -0
  24. triton/backends/amd/include/hip/amd_detail/amd_surface_functions.h +244 -0
  25. triton/backends/amd/include/hip/amd_detail/amd_warp_functions.h +494 -0
  26. triton/backends/amd/include/hip/amd_detail/concepts.hpp +30 -0
  27. triton/backends/amd/include/hip/amd_detail/device_library_decls.h +133 -0
  28. triton/backends/amd/include/hip/amd_detail/functional_grid_launch.hpp +218 -0
  29. triton/backends/amd/include/hip/amd_detail/grid_launch.h +67 -0
  30. triton/backends/amd/include/hip/amd_detail/grid_launch.hpp +50 -0
  31. triton/backends/amd/include/hip/amd_detail/grid_launch_GGL.hpp +26 -0
  32. triton/backends/amd/include/hip/amd_detail/helpers.hpp +137 -0
  33. triton/backends/amd/include/hip/amd_detail/hip_api_trace.hpp +1350 -0
  34. triton/backends/amd/include/hip/amd_detail/hip_assert.h +101 -0
  35. triton/backends/amd/include/hip/amd_detail/hip_cooperative_groups_helper.h +242 -0
  36. triton/backends/amd/include/hip/amd_detail/hip_fp16_gcc.h +254 -0
  37. triton/backends/amd/include/hip/amd_detail/hip_fp16_math_fwd.h +96 -0
  38. triton/backends/amd/include/hip/amd_detail/hip_ldg.h +100 -0
  39. triton/backends/amd/include/hip/amd_detail/hip_prof_str.h +10169 -0
  40. triton/backends/amd/include/hip/amd_detail/hip_runtime_prof.h +77 -0
  41. triton/backends/amd/include/hip/amd_detail/host_defines.h +180 -0
  42. triton/backends/amd/include/hip/amd_detail/hsa_helpers.hpp +102 -0
  43. triton/backends/amd/include/hip/amd_detail/macro_based_grid_launch.hpp +798 -0
  44. triton/backends/amd/include/hip/amd_detail/math_fwd.h +698 -0
  45. triton/backends/amd/include/hip/amd_detail/ockl_image.h +177 -0
  46. triton/backends/amd/include/hip/amd_detail/program_state.hpp +107 -0
  47. triton/backends/amd/include/hip/amd_detail/texture_fetch_functions.h +491 -0
  48. triton/backends/amd/include/hip/amd_detail/texture_indirect_functions.h +478 -0
  49. triton/backends/amd/include/hip/channel_descriptor.h +39 -0
  50. triton/backends/amd/include/hip/device_functions.h +38 -0
  51. triton/backends/amd/include/hip/driver_types.h +468 -0
  52. triton/backends/amd/include/hip/hip_bf16.h +36 -0
  53. triton/backends/amd/include/hip/hip_bfloat16.h +44 -0
  54. triton/backends/amd/include/hip/hip_common.h +100 -0
  55. triton/backends/amd/include/hip/hip_complex.h +38 -0
  56. triton/backends/amd/include/hip/hip_cooperative_groups.h +46 -0
  57. triton/backends/amd/include/hip/hip_deprecated.h +95 -0
  58. triton/backends/amd/include/hip/hip_ext.h +159 -0
  59. triton/backends/amd/include/hip/hip_fp16.h +36 -0
  60. triton/backends/amd/include/hip/hip_gl_interop.h +32 -0
  61. triton/backends/amd/include/hip/hip_hcc.h +24 -0
  62. triton/backends/amd/include/hip/hip_math_constants.h +36 -0
  63. triton/backends/amd/include/hip/hip_profile.h +27 -0
  64. triton/backends/amd/include/hip/hip_runtime.h +75 -0
  65. triton/backends/amd/include/hip/hip_runtime_api.h +8919 -0
  66. triton/backends/amd/include/hip/hip_texture_types.h +29 -0
  67. triton/backends/amd/include/hip/hip_vector_types.h +41 -0
  68. triton/backends/amd/include/hip/hip_version.h +17 -0
  69. triton/backends/amd/include/hip/hiprtc.h +421 -0
  70. triton/backends/amd/include/hip/library_types.h +78 -0
  71. triton/backends/amd/include/hip/math_functions.h +42 -0
  72. triton/backends/amd/include/hip/surface_types.h +63 -0
  73. triton/backends/amd/include/hip/texture_types.h +194 -0
  74. triton/backends/amd/include/hsa/Brig.h +1131 -0
  75. triton/backends/amd/include/hsa/amd_hsa_common.h +91 -0
  76. triton/backends/amd/include/hsa/amd_hsa_elf.h +436 -0
  77. triton/backends/amd/include/hsa/amd_hsa_kernel_code.h +269 -0
  78. triton/backends/amd/include/hsa/amd_hsa_queue.h +109 -0
  79. triton/backends/amd/include/hsa/amd_hsa_signal.h +80 -0
  80. triton/backends/amd/include/hsa/hsa.h +5729 -0
  81. triton/backends/amd/include/hsa/hsa_amd_tool.h +91 -0
  82. triton/backends/amd/include/hsa/hsa_api_trace.h +566 -0
  83. triton/backends/amd/include/hsa/hsa_ext_amd.h +3090 -0
  84. triton/backends/amd/include/hsa/hsa_ext_finalize.h +531 -0
  85. triton/backends/amd/include/hsa/hsa_ext_image.h +1454 -0
  86. triton/backends/amd/include/hsa/hsa_ven_amd_aqlprofile.h +488 -0
  87. triton/backends/amd/include/hsa/hsa_ven_amd_loader.h +667 -0
  88. triton/backends/amd/include/roctracer/ext/prof_protocol.h +107 -0
  89. triton/backends/amd/include/roctracer/hip_ostream_ops.h +4435 -0
  90. triton/backends/amd/include/roctracer/hsa_ostream_ops.h +1467 -0
  91. triton/backends/amd/include/roctracer/hsa_prof_str.h +3027 -0
  92. triton/backends/amd/include/roctracer/roctracer.h +779 -0
  93. triton/backends/amd/include/roctracer/roctracer_ext.h +81 -0
  94. triton/backends/amd/include/roctracer/roctracer_hcc.h +24 -0
  95. triton/backends/amd/include/roctracer/roctracer_hip.h +37 -0
  96. triton/backends/amd/include/roctracer/roctracer_hsa.h +112 -0
  97. triton/backends/amd/include/roctracer/roctracer_plugin.h +137 -0
  98. triton/backends/amd/include/roctracer/roctracer_roctx.h +67 -0
  99. triton/backends/amd/include/roctracer/roctx.h +229 -0
  100. triton/backends/amd/lib/ockl.bc +0 -0
  101. triton/backends/amd/lib/ocml.bc +0 -0
  102. triton/backends/compiler.py +304 -0
  103. triton/backends/driver.py +48 -0
  104. triton/backends/nvidia/__init__.py +0 -0
  105. triton/backends/nvidia/bin/ptxas.exe +0 -0
  106. triton/backends/nvidia/compiler.py +410 -0
  107. triton/backends/nvidia/driver.c +451 -0
  108. triton/backends/nvidia/driver.py +524 -0
  109. triton/backends/nvidia/include/cuda.h +24359 -0
  110. triton/backends/nvidia/lib/libdevice.10.bc +0 -0
  111. triton/backends/nvidia/lib/x64/cuda.lib +0 -0
  112. triton/compiler/__init__.py +4 -0
  113. triton/compiler/code_generator.py +1303 -0
  114. triton/compiler/compiler.py +430 -0
  115. triton/compiler/errors.py +51 -0
  116. triton/compiler/make_launcher.py +0 -0
  117. triton/errors.py +5 -0
  118. triton/language/__init__.py +294 -0
  119. triton/language/_utils.py +21 -0
  120. triton/language/core.py +2694 -0
  121. triton/language/extra/__init__.py +26 -0
  122. triton/language/extra/cuda/__init__.py +13 -0
  123. triton/language/extra/cuda/_experimental_tma.py +108 -0
  124. triton/language/extra/cuda/libdevice.py +1629 -0
  125. triton/language/extra/cuda/utils.py +109 -0
  126. triton/language/extra/hip/__init__.py +3 -0
  127. triton/language/extra/hip/libdevice.py +475 -0
  128. triton/language/extra/libdevice.py +786 -0
  129. triton/language/math.py +250 -0
  130. triton/language/random.py +207 -0
  131. triton/language/semantic.py +1796 -0
  132. triton/language/standard.py +452 -0
  133. triton/runtime/__init__.py +23 -0
  134. triton/runtime/autotuner.py +408 -0
  135. triton/runtime/build.py +111 -0
  136. triton/runtime/cache.py +295 -0
  137. triton/runtime/driver.py +60 -0
  138. triton/runtime/errors.py +26 -0
  139. triton/runtime/interpreter.py +1235 -0
  140. triton/runtime/jit.py +951 -0
  141. triton/testing.py +511 -0
  142. triton/tools/__init__.py +0 -0
  143. triton/tools/build_extern.py +365 -0
  144. triton/tools/compile.c +67 -0
  145. triton/tools/compile.h +14 -0
  146. triton/tools/compile.py +155 -0
  147. triton/tools/disasm.py +144 -0
  148. triton/tools/experimental_descriptor.py +32 -0
  149. triton/tools/link.py +322 -0
  150. triton/windows_utils.py +375 -0
  151. triton_windows-3.2.0.post11.dist-info/METADATA +39 -0
  152. triton_windows-3.2.0.post11.dist-info/RECORD +154 -0
  153. triton_windows-3.2.0.post11.dist-info/WHEEL +5 -0
  154. triton_windows-3.2.0.post11.dist-info/top_level.txt +12 -0
@@ -0,0 +1,358 @@
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_AMD_DETAIL_CHANNEL_DESCRIPTOR_H
24
+ #define HIP_INCLUDE_HIP_AMD_DETAIL_CHANNEL_DESCRIPTOR_H
25
+
26
+ #if !defined(__HIPCC_RTC__)
27
+ #include <hip/hip_common.h>
28
+ #include <hip/driver_types.h>
29
+ #include <hip/amd_detail/amd_hip_vector_types.h>
30
+ #endif
31
+
32
+ #ifdef __cplusplus
33
+
34
+ extern "C" HIP_PUBLIC_API
35
+ hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int w, hipChannelFormatKind f);
36
+
37
+ static inline hipChannelFormatDesc hipCreateChannelDescHalf() {
38
+ int e = (int)sizeof(unsigned short) * 8;
39
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindFloat);
40
+ }
41
+
42
+ static inline hipChannelFormatDesc hipCreateChannelDescHalf1() {
43
+ int e = (int)sizeof(unsigned short) * 8;
44
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindFloat);
45
+ }
46
+
47
+ static inline hipChannelFormatDesc hipCreateChannelDescHalf2() {
48
+ int e = (int)sizeof(unsigned short) * 8;
49
+ return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindFloat);
50
+ }
51
+
52
+ static inline hipChannelFormatDesc hipCreateChannelDescHalf4() {
53
+ int e = (int)sizeof(unsigned short) * 8;
54
+ return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindFloat);
55
+ }
56
+
57
+ template <typename T>
58
+ static inline hipChannelFormatDesc hipCreateChannelDesc() {
59
+ return hipCreateChannelDesc(0, 0, 0, 0, hipChannelFormatKindNone);
60
+ }
61
+
62
+ template <>
63
+ inline hipChannelFormatDesc hipCreateChannelDesc<char>() {
64
+ int e = (int)sizeof(char) * 8;
65
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
66
+ }
67
+
68
+ template <>
69
+ inline hipChannelFormatDesc hipCreateChannelDesc<signed char>() {
70
+ int e = (int)sizeof(signed char) * 8;
71
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
72
+ }
73
+
74
+ template <>
75
+ inline hipChannelFormatDesc hipCreateChannelDesc<unsigned char>() {
76
+ int e = (int)sizeof(unsigned char) * 8;
77
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
78
+ }
79
+
80
+ template <>
81
+ inline hipChannelFormatDesc hipCreateChannelDesc<uchar1>() {
82
+ int e = (int)sizeof(unsigned char) * 8;
83
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
84
+ }
85
+
86
+ template <>
87
+ inline hipChannelFormatDesc hipCreateChannelDesc<char1>() {
88
+ int e = (int)sizeof(signed char) * 8;
89
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
90
+ }
91
+
92
+ template <>
93
+ inline hipChannelFormatDesc hipCreateChannelDesc<uchar2>() {
94
+ int e = (int)sizeof(unsigned char) * 8;
95
+ return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindUnsigned);
96
+ }
97
+
98
+ template <>
99
+ inline hipChannelFormatDesc hipCreateChannelDesc<char2>() {
100
+ int e = (int)sizeof(signed char) * 8;
101
+ return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindSigned);
102
+ }
103
+
104
+ #ifndef __GNUC__ // vector3 is the same as vector4
105
+ template <>
106
+ inline hipChannelFormatDesc hipCreateChannelDesc<uchar3>() {
107
+ int e = (int)sizeof(unsigned char) * 8;
108
+ return hipCreateChannelDesc(e, e, e, 0, hipChannelFormatKindUnsigned);
109
+ }
110
+
111
+ template <>
112
+ inline hipChannelFormatDesc hipCreateChannelDesc<char3>() {
113
+ int e = (int)sizeof(signed char) * 8;
114
+ return hipCreateChannelDesc(e, e, e, 0, hipChannelFormatKindSigned);
115
+ }
116
+ #endif
117
+
118
+ template <>
119
+ inline hipChannelFormatDesc hipCreateChannelDesc<uchar4>() {
120
+ int e = (int)sizeof(unsigned char) * 8;
121
+ return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindUnsigned);
122
+ }
123
+
124
+ template <>
125
+ inline hipChannelFormatDesc hipCreateChannelDesc<char4>() {
126
+ int e = (int)sizeof(signed char) * 8;
127
+ return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindSigned);
128
+ }
129
+
130
+ template <>
131
+ inline hipChannelFormatDesc hipCreateChannelDesc<unsigned short>() {
132
+ int e = (int)sizeof(unsigned short) * 8;
133
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
134
+ }
135
+
136
+ template <>
137
+ inline hipChannelFormatDesc hipCreateChannelDesc<signed short>() {
138
+ int e = (int)sizeof(signed short) * 8;
139
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
140
+ }
141
+
142
+ template <>
143
+ inline hipChannelFormatDesc hipCreateChannelDesc<ushort1>() {
144
+ int e = (int)sizeof(unsigned short) * 8;
145
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
146
+ }
147
+
148
+ template <>
149
+ inline hipChannelFormatDesc hipCreateChannelDesc<short1>() {
150
+ int e = (int)sizeof(signed short) * 8;
151
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
152
+ }
153
+
154
+ template <>
155
+ inline hipChannelFormatDesc hipCreateChannelDesc<ushort2>() {
156
+ int e = (int)sizeof(unsigned short) * 8;
157
+ return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindUnsigned);
158
+ }
159
+
160
+ template <>
161
+ inline hipChannelFormatDesc hipCreateChannelDesc<short2>() {
162
+ int e = (int)sizeof(signed short) * 8;
163
+ return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindSigned);
164
+ }
165
+
166
+ #ifndef __GNUC__
167
+ template <>
168
+ inline hipChannelFormatDesc hipCreateChannelDesc<ushort3>() {
169
+ int e = (int)sizeof(unsigned short) * 8;
170
+ return hipCreateChannelDesc(e, e, e, 0, hipChannelFormatKindUnsigned);
171
+ }
172
+
173
+ template <>
174
+ inline hipChannelFormatDesc hipCreateChannelDesc<short3>() {
175
+ int e = (int)sizeof(signed short) * 8;
176
+ return hipCreateChannelDesc(e, e, e, 0, hipChannelFormatKindSigned);
177
+ }
178
+ #endif
179
+
180
+ template <>
181
+ inline hipChannelFormatDesc hipCreateChannelDesc<ushort4>() {
182
+ int e = (int)sizeof(unsigned short) * 8;
183
+ return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindUnsigned);
184
+ }
185
+
186
+ template <>
187
+ inline hipChannelFormatDesc hipCreateChannelDesc<short4>() {
188
+ int e = (int)sizeof(signed short) * 8;
189
+ return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindSigned);
190
+ }
191
+
192
+ template <>
193
+ inline hipChannelFormatDesc hipCreateChannelDesc<unsigned int>() {
194
+ int e = (int)sizeof(unsigned int) * 8;
195
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
196
+ }
197
+
198
+ template <>
199
+ inline hipChannelFormatDesc hipCreateChannelDesc<signed int>() {
200
+ int e = (int)sizeof(signed int) * 8;
201
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
202
+ }
203
+
204
+ template <>
205
+ inline hipChannelFormatDesc hipCreateChannelDesc<uint1>() {
206
+ int e = (int)sizeof(unsigned int) * 8;
207
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
208
+ }
209
+
210
+ template <>
211
+ inline hipChannelFormatDesc hipCreateChannelDesc<int1>() {
212
+ int e = (int)sizeof(signed int) * 8;
213
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
214
+ }
215
+
216
+ template <>
217
+ inline hipChannelFormatDesc hipCreateChannelDesc<uint2>() {
218
+ int e = (int)sizeof(unsigned int) * 8;
219
+ return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindUnsigned);
220
+ }
221
+
222
+ template <>
223
+ inline hipChannelFormatDesc hipCreateChannelDesc<int2>() {
224
+ int e = (int)sizeof(signed int) * 8;
225
+ return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindSigned);
226
+ }
227
+
228
+ #ifndef __GNUC__
229
+ template <>
230
+ inline hipChannelFormatDesc hipCreateChannelDesc<uint3>() {
231
+ int e = (int)sizeof(unsigned int) * 8;
232
+ return hipCreateChannelDesc(e, e, e, 0, hipChannelFormatKindUnsigned);
233
+ }
234
+
235
+ template <>
236
+ inline hipChannelFormatDesc hipCreateChannelDesc<int3>() {
237
+ int e = (int)sizeof(signed int) * 8;
238
+ return hipCreateChannelDesc(e, e, e, 0, hipChannelFormatKindSigned);
239
+ }
240
+ #endif
241
+
242
+ template <>
243
+ inline hipChannelFormatDesc hipCreateChannelDesc<uint4>() {
244
+ int e = (int)sizeof(unsigned int) * 8;
245
+ return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindUnsigned);
246
+ }
247
+
248
+ template <>
249
+ inline hipChannelFormatDesc hipCreateChannelDesc<int4>() {
250
+ int e = (int)sizeof(signed int) * 8;
251
+ return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindSigned);
252
+ }
253
+
254
+ template <>
255
+ inline hipChannelFormatDesc hipCreateChannelDesc<float>() {
256
+ int e = (int)sizeof(float) * 8;
257
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindFloat);
258
+ }
259
+
260
+ template <>
261
+ inline hipChannelFormatDesc hipCreateChannelDesc<float1>() {
262
+ int e = (int)sizeof(float) * 8;
263
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindFloat);
264
+ }
265
+
266
+ template <>
267
+ inline hipChannelFormatDesc hipCreateChannelDesc<float2>() {
268
+ int e = (int)sizeof(float) * 8;
269
+ return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindFloat);
270
+ }
271
+
272
+ #ifndef __GNUC__
273
+ template <>
274
+ inline hipChannelFormatDesc hipCreateChannelDesc<float3>() {
275
+ int e = (int)sizeof(float) * 8;
276
+ return hipCreateChannelDesc(e, e, e, 0, hipChannelFormatKindFloat);
277
+ }
278
+ #endif
279
+
280
+ template <>
281
+ inline hipChannelFormatDesc hipCreateChannelDesc<float4>() {
282
+ int e = (int)sizeof(float) * 8;
283
+ return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindFloat);
284
+ }
285
+
286
+ #if !defined(__LP64__)
287
+
288
+ template <>
289
+ inline hipChannelFormatDesc hipCreateChannelDesc<unsigned long>() {
290
+ int e = (int)sizeof(unsigned long) * 8;
291
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
292
+ }
293
+
294
+ template <>
295
+ inline hipChannelFormatDesc hipCreateChannelDesc<signed long>() {
296
+ int e = (int)sizeof(signed long) * 8;
297
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
298
+ }
299
+
300
+ template <>
301
+ inline hipChannelFormatDesc hipCreateChannelDesc<ulong1>() {
302
+ int e = (int)sizeof(unsigned long) * 8;
303
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
304
+ }
305
+
306
+ template <>
307
+ inline hipChannelFormatDesc hipCreateChannelDesc<long1>() {
308
+ int e = (int)sizeof(signed long) * 8;
309
+ return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
310
+ }
311
+
312
+ template <>
313
+ inline hipChannelFormatDesc hipCreateChannelDesc<ulong2>() {
314
+ int e = (int)sizeof(unsigned long) * 8;
315
+ return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindUnsigned);
316
+ }
317
+
318
+ template <>
319
+ inline hipChannelFormatDesc hipCreateChannelDesc<long2>() {
320
+ int e = (int)sizeof(signed long) * 8;
321
+ return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindSigned);
322
+ }
323
+
324
+ #ifndef __GNUC__
325
+ template <>
326
+ inline hipChannelFormatDesc hipCreateChannelDesc<ulong3>() {
327
+ int e = (int)sizeof(unsigned long) * 8;
328
+ return hipCreateChannelDesc(e, e, e, 0, hipChannelFormatKindUnsigned);
329
+ }
330
+
331
+ template <>
332
+ inline hipChannelFormatDesc hipCreateChannelDesc<long3>() {
333
+ int e = (int)sizeof(signed long) * 8;
334
+ return hipCreateChannelDesc(e, e, e, 0, hipChannelFormatKindSigned);
335
+ }
336
+ #endif
337
+
338
+ template <>
339
+ inline hipChannelFormatDesc hipCreateChannelDesc<ulong4>() {
340
+ int e = (int)sizeof(unsigned long) * 8;
341
+ return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindUnsigned);
342
+ }
343
+
344
+ template <>
345
+ inline hipChannelFormatDesc hipCreateChannelDesc<long4>() {
346
+ int e = (int)sizeof(signed long) * 8;
347
+ return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindSigned);
348
+ }
349
+ #endif /* !__LP64__ */
350
+
351
+ #else
352
+
353
+ struct hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int w,
354
+ enum hipChannelFormatKind f);
355
+
356
+ #endif /* __cplusplus */
357
+
358
+ #endif /* !HIP_INCLUDE_HIP_AMD_DETAIL_CHANNEL_DESCRIPTOR_H */