triton-windows 3.3.1.post19__cp311-cp311-win_amd64.whl → 3.4.0.post20__cp311-cp311-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 (166) hide show
  1. triton/_C/libtriton.pyd +0 -0
  2. triton/__init__.py +4 -1
  3. triton/_filecheck.py +87 -0
  4. triton/_internal_testing.py +26 -15
  5. triton/_utils.py +110 -21
  6. triton/backends/__init__.py +20 -23
  7. triton/backends/amd/__init__.py +0 -0
  8. triton/backends/amd/compiler.py +112 -78
  9. triton/backends/amd/driver.c +5 -2
  10. triton/backends/amd/driver.py +149 -47
  11. triton/backends/compiler.py +7 -21
  12. triton/backends/nvidia/bin/ptxas.exe +0 -0
  13. triton/backends/nvidia/compiler.py +92 -93
  14. triton/backends/nvidia/driver.c +90 -98
  15. triton/backends/nvidia/driver.py +303 -128
  16. triton/compiler/code_generator.py +212 -111
  17. triton/compiler/compiler.py +110 -25
  18. triton/experimental/__init__.py +0 -0
  19. triton/experimental/gluon/__init__.py +4 -0
  20. triton/experimental/gluon/_compiler.py +0 -0
  21. triton/experimental/gluon/_runtime.py +99 -0
  22. triton/experimental/gluon/language/__init__.py +18 -0
  23. triton/experimental/gluon/language/_core.py +312 -0
  24. triton/experimental/gluon/language/_layouts.py +230 -0
  25. triton/experimental/gluon/language/_math.py +12 -0
  26. triton/experimental/gluon/language/_semantic.py +287 -0
  27. triton/experimental/gluon/language/_standard.py +47 -0
  28. triton/experimental/gluon/language/nvidia/__init__.py +4 -0
  29. triton/experimental/gluon/language/nvidia/blackwell/__init__.py +202 -0
  30. triton/experimental/gluon/language/nvidia/blackwell/tma.py +32 -0
  31. triton/experimental/gluon/language/nvidia/hopper/__init__.py +11 -0
  32. triton/experimental/gluon/language/nvidia/hopper/mbarrier.py +51 -0
  33. triton/experimental/gluon/language/nvidia/hopper/tma.py +96 -0
  34. triton/experimental/gluon/nvidia/__init__.py +4 -0
  35. triton/experimental/gluon/nvidia/blackwell.py +3 -0
  36. triton/experimental/gluon/nvidia/hopper.py +40 -0
  37. triton/knobs.py +481 -0
  38. triton/language/__init__.py +39 -14
  39. triton/language/core.py +794 -537
  40. triton/language/extra/cuda/__init__.py +10 -7
  41. triton/language/extra/cuda/gdc.py +42 -0
  42. triton/language/extra/cuda/libdevice.py +394 -394
  43. triton/language/extra/cuda/utils.py +21 -21
  44. triton/language/extra/hip/libdevice.py +113 -104
  45. triton/language/math.py +65 -66
  46. triton/language/random.py +12 -2
  47. triton/language/semantic.py +1706 -1770
  48. triton/language/standard.py +116 -51
  49. triton/runtime/autotuner.py +117 -59
  50. triton/runtime/build.py +76 -12
  51. triton/runtime/cache.py +18 -47
  52. triton/runtime/driver.py +32 -29
  53. triton/runtime/interpreter.py +72 -35
  54. triton/runtime/jit.py +146 -110
  55. triton/testing.py +16 -12
  56. triton/tools/disasm.py +3 -4
  57. triton/tools/tensor_descriptor.py +36 -0
  58. triton/windows_utils.py +14 -6
  59. {triton_windows-3.3.1.post19.dist-info → triton_windows-3.4.0.post20.dist-info}/METADATA +7 -2
  60. triton_windows-3.4.0.post20.dist-info/RECORD +186 -0
  61. triton_windows-3.4.0.post20.dist-info/entry_points.txt +3 -0
  62. triton_windows-3.4.0.post20.dist-info/licenses/LICENSE +23 -0
  63. triton_windows-3.4.0.post20.dist-info/top_level.txt +1 -0
  64. triton/backends/amd/include/hip/amd_detail/amd_channel_descriptor.h +0 -358
  65. triton/backends/amd/include/hip/amd_detail/amd_device_functions.h +0 -1010
  66. triton/backends/amd/include/hip/amd_detail/amd_hip_atomic.h +0 -1638
  67. triton/backends/amd/include/hip/amd_detail/amd_hip_bf16.h +0 -1814
  68. triton/backends/amd/include/hip/amd_detail/amd_hip_bfloat16.h +0 -293
  69. triton/backends/amd/include/hip/amd_detail/amd_hip_common.h +0 -32
  70. triton/backends/amd/include/hip/amd_detail/amd_hip_complex.h +0 -174
  71. triton/backends/amd/include/hip/amd_detail/amd_hip_cooperative_groups.h +0 -835
  72. triton/backends/amd/include/hip/amd_detail/amd_hip_fp16.h +0 -1809
  73. triton/backends/amd/include/hip/amd_detail/amd_hip_fp8.h +0 -1391
  74. triton/backends/amd/include/hip/amd_detail/amd_hip_gl_interop.h +0 -108
  75. triton/backends/amd/include/hip/amd_detail/amd_hip_math_constants.h +0 -124
  76. triton/backends/amd/include/hip/amd_detail/amd_hip_runtime.h +0 -405
  77. triton/backends/amd/include/hip/amd_detail/amd_hip_runtime_pt_api.h +0 -196
  78. triton/backends/amd/include/hip/amd_detail/amd_hip_unsafe_atomics.h +0 -565
  79. triton/backends/amd/include/hip/amd_detail/amd_hip_vector_types.h +0 -2226
  80. triton/backends/amd/include/hip/amd_detail/amd_math_functions.h +0 -104
  81. triton/backends/amd/include/hip/amd_detail/amd_surface_functions.h +0 -244
  82. triton/backends/amd/include/hip/amd_detail/amd_warp_functions.h +0 -538
  83. triton/backends/amd/include/hip/amd_detail/amd_warp_sync_functions.h +0 -288
  84. triton/backends/amd/include/hip/amd_detail/concepts.hpp +0 -30
  85. triton/backends/amd/include/hip/amd_detail/device_library_decls.h +0 -133
  86. triton/backends/amd/include/hip/amd_detail/functional_grid_launch.hpp +0 -218
  87. triton/backends/amd/include/hip/amd_detail/grid_launch.h +0 -67
  88. triton/backends/amd/include/hip/amd_detail/grid_launch.hpp +0 -50
  89. triton/backends/amd/include/hip/amd_detail/grid_launch_GGL.hpp +0 -26
  90. triton/backends/amd/include/hip/amd_detail/helpers.hpp +0 -137
  91. triton/backends/amd/include/hip/amd_detail/hip_api_trace.hpp +0 -1446
  92. triton/backends/amd/include/hip/amd_detail/hip_assert.h +0 -101
  93. triton/backends/amd/include/hip/amd_detail/hip_cooperative_groups_helper.h +0 -242
  94. triton/backends/amd/include/hip/amd_detail/hip_fp16_gcc.h +0 -254
  95. triton/backends/amd/include/hip/amd_detail/hip_fp16_math_fwd.h +0 -96
  96. triton/backends/amd/include/hip/amd_detail/hip_ldg.h +0 -100
  97. triton/backends/amd/include/hip/amd_detail/hip_prof_str.h +0 -10570
  98. triton/backends/amd/include/hip/amd_detail/hip_runtime_prof.h +0 -78
  99. triton/backends/amd/include/hip/amd_detail/host_defines.h +0 -184
  100. triton/backends/amd/include/hip/amd_detail/hsa_helpers.hpp +0 -102
  101. triton/backends/amd/include/hip/amd_detail/macro_based_grid_launch.hpp +0 -798
  102. triton/backends/amd/include/hip/amd_detail/math_fwd.h +0 -698
  103. triton/backends/amd/include/hip/amd_detail/ockl_image.h +0 -177
  104. triton/backends/amd/include/hip/amd_detail/program_state.hpp +0 -107
  105. triton/backends/amd/include/hip/amd_detail/texture_fetch_functions.h +0 -491
  106. triton/backends/amd/include/hip/amd_detail/texture_indirect_functions.h +0 -478
  107. triton/backends/amd/include/hip/channel_descriptor.h +0 -39
  108. triton/backends/amd/include/hip/device_functions.h +0 -38
  109. triton/backends/amd/include/hip/driver_types.h +0 -468
  110. triton/backends/amd/include/hip/hip_bf16.h +0 -36
  111. triton/backends/amd/include/hip/hip_bfloat16.h +0 -44
  112. triton/backends/amd/include/hip/hip_common.h +0 -100
  113. triton/backends/amd/include/hip/hip_complex.h +0 -38
  114. triton/backends/amd/include/hip/hip_cooperative_groups.h +0 -46
  115. triton/backends/amd/include/hip/hip_deprecated.h +0 -95
  116. triton/backends/amd/include/hip/hip_ext.h +0 -161
  117. triton/backends/amd/include/hip/hip_fp16.h +0 -36
  118. triton/backends/amd/include/hip/hip_fp8.h +0 -33
  119. triton/backends/amd/include/hip/hip_gl_interop.h +0 -32
  120. triton/backends/amd/include/hip/hip_hcc.h +0 -24
  121. triton/backends/amd/include/hip/hip_math_constants.h +0 -36
  122. triton/backends/amd/include/hip/hip_profile.h +0 -27
  123. triton/backends/amd/include/hip/hip_runtime.h +0 -75
  124. triton/backends/amd/include/hip/hip_runtime_api.h +0 -9261
  125. triton/backends/amd/include/hip/hip_texture_types.h +0 -29
  126. triton/backends/amd/include/hip/hip_vector_types.h +0 -41
  127. triton/backends/amd/include/hip/hip_version.h +0 -17
  128. triton/backends/amd/include/hip/hiprtc.h +0 -421
  129. triton/backends/amd/include/hip/library_types.h +0 -78
  130. triton/backends/amd/include/hip/math_functions.h +0 -42
  131. triton/backends/amd/include/hip/surface_types.h +0 -63
  132. triton/backends/amd/include/hip/texture_types.h +0 -194
  133. triton/backends/amd/include/hsa/Brig.h +0 -1131
  134. triton/backends/amd/include/hsa/amd_hsa_common.h +0 -91
  135. triton/backends/amd/include/hsa/amd_hsa_elf.h +0 -462
  136. triton/backends/amd/include/hsa/amd_hsa_kernel_code.h +0 -269
  137. triton/backends/amd/include/hsa/amd_hsa_queue.h +0 -109
  138. triton/backends/amd/include/hsa/amd_hsa_signal.h +0 -80
  139. triton/backends/amd/include/hsa/hsa.h +0 -5738
  140. triton/backends/amd/include/hsa/hsa_amd_tool.h +0 -91
  141. triton/backends/amd/include/hsa/hsa_api_trace.h +0 -579
  142. triton/backends/amd/include/hsa/hsa_api_trace_version.h +0 -68
  143. triton/backends/amd/include/hsa/hsa_ext_amd.h +0 -3146
  144. triton/backends/amd/include/hsa/hsa_ext_finalize.h +0 -531
  145. triton/backends/amd/include/hsa/hsa_ext_image.h +0 -1454
  146. triton/backends/amd/include/hsa/hsa_ven_amd_aqlprofile.h +0 -488
  147. triton/backends/amd/include/hsa/hsa_ven_amd_loader.h +0 -667
  148. triton/backends/amd/include/hsa/hsa_ven_amd_pc_sampling.h +0 -416
  149. triton/backends/amd/include/roctracer/ext/prof_protocol.h +0 -107
  150. triton/backends/amd/include/roctracer/hip_ostream_ops.h +0 -4515
  151. triton/backends/amd/include/roctracer/hsa_ostream_ops.h +0 -1727
  152. triton/backends/amd/include/roctracer/hsa_prof_str.h +0 -3059
  153. triton/backends/amd/include/roctracer/roctracer.h +0 -779
  154. triton/backends/amd/include/roctracer/roctracer_ext.h +0 -81
  155. triton/backends/amd/include/roctracer/roctracer_hcc.h +0 -24
  156. triton/backends/amd/include/roctracer/roctracer_hip.h +0 -37
  157. triton/backends/amd/include/roctracer/roctracer_hsa.h +0 -112
  158. triton/backends/amd/include/roctracer/roctracer_plugin.h +0 -137
  159. triton/backends/amd/include/roctracer/roctracer_roctx.h +0 -67
  160. triton/backends/amd/include/roctracer/roctx.h +0 -229
  161. triton/language/_utils.py +0 -21
  162. triton/language/extra/cuda/_experimental_tma.py +0 -106
  163. triton/tools/experimental_descriptor.py +0 -32
  164. triton_windows-3.3.1.post19.dist-info/RECORD +0 -260
  165. triton_windows-3.3.1.post19.dist-info/top_level.txt +0 -14
  166. {triton_windows-3.3.1.post19.dist-info → triton_windows-3.4.0.post20.dist-info}/WHEEL +0 -0
@@ -1,478 +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
- #pragma once
24
-
25
- #if defined(__cplusplus)
26
-
27
- #if !defined(__HIPCC_RTC__)
28
- #include <hip/hip_vector_types.h>
29
- #include <hip/hip_texture_types.h>
30
- #include <hip/amd_detail/texture_fetch_functions.h>
31
- #include <hip/amd_detail/ockl_image.h>
32
- #include <type_traits>
33
- #endif // !defined(__HIPCC_RTC__)
34
-
35
- #define TEXTURE_OBJECT_PARAMETERS_INIT \
36
- unsigned int ADDRESS_SPACE_CONSTANT* i = (unsigned int ADDRESS_SPACE_CONSTANT*)textureObject; \
37
- unsigned int ADDRESS_SPACE_CONSTANT* s = i + HIP_SAMPLER_OBJECT_OFFSET_DWORD;
38
-
39
- template <
40
- typename T,
41
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
42
- static __device__ __hip_img_chk__ T tex1Dfetch(hipTextureObject_t textureObject, int x)
43
- {
44
- TEXTURE_OBJECT_PARAMETERS_INIT
45
- auto tmp = __ockl_image_load_1Db(i, x);
46
- return __hipMapFrom<T>(tmp);
47
- }
48
-
49
- template <
50
- typename T,
51
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
52
- static __device__ __hip_img_chk__ void tex1Dfetch(T *ptr, hipTextureObject_t textureObject, int x)
53
- {
54
- *ptr = tex1Dfetch<T>(textureObject, x);
55
- }
56
-
57
- template <
58
- typename T,
59
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
60
- static __device__ __hip_img_chk__ T tex1D(hipTextureObject_t textureObject, float x)
61
- {
62
- TEXTURE_OBJECT_PARAMETERS_INIT
63
- auto tmp = __ockl_image_sample_1D(i, s, x);
64
- return __hipMapFrom<T>(tmp);
65
- }
66
-
67
- template <
68
- typename T,
69
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
70
- static __device__ __hip_img_chk__ void tex1D(T *ptr, hipTextureObject_t textureObject, float x)
71
- {
72
- *ptr = tex1D<T>(textureObject, x);
73
- }
74
-
75
- template <
76
- typename T,
77
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
78
- static __device__ __hip_img_chk__ T tex2D(hipTextureObject_t textureObject, float x, float y)
79
- {
80
- TEXTURE_OBJECT_PARAMETERS_INIT
81
- auto tmp = __ockl_image_sample_2D(i, s, float2(x, y).data);
82
- return __hipMapFrom<T>(tmp);
83
- }
84
-
85
- template <
86
- typename T,
87
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
88
- static __device__ __hip_img_chk__ void tex2D(T *ptr, hipTextureObject_t textureObject, float x, float y)
89
- {
90
- *ptr = tex2D<T>(textureObject, x, y);
91
- }
92
-
93
- template <
94
- typename T,
95
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
96
- static __device__ __hip_img_chk__ T tex3D(hipTextureObject_t textureObject, float x, float y, float z)
97
- {
98
- TEXTURE_OBJECT_PARAMETERS_INIT
99
- auto tmp = __ockl_image_sample_3D(i, s, float4(x, y, z, 0.0f).data);
100
- return __hipMapFrom<T>(tmp);
101
- }
102
-
103
- template <
104
- typename T,
105
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
106
- static __device__ __hip_img_chk__ void tex3D(T *ptr, hipTextureObject_t textureObject, float x, float y, float z)
107
- {
108
- *ptr = tex3D<T>(textureObject, x, y, z);
109
- }
110
-
111
- template <
112
- typename T,
113
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
114
- static __device__ __hip_img_chk__ T tex1DLayered(hipTextureObject_t textureObject, float x, int layer)
115
- {
116
- TEXTURE_OBJECT_PARAMETERS_INIT
117
- auto tmp = __ockl_image_sample_1Da(i, s, float2(x, layer).data);
118
- return __hipMapFrom<T>(tmp);
119
- }
120
-
121
- template <
122
- typename T,
123
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
124
- static __device__ __hip_img_chk__ void tex1DLayered(T *ptr, hipTextureObject_t textureObject, float x, int layer)
125
- {
126
- *ptr = tex1DLayered<T>(textureObject, x, layer);
127
- }
128
-
129
- template <
130
- typename T,
131
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
132
- static __device__ __hip_img_chk__ T tex2DLayered(hipTextureObject_t textureObject, float x, float y, int layer)
133
- {
134
- TEXTURE_OBJECT_PARAMETERS_INIT
135
- auto tmp = __ockl_image_sample_2Da(i, s, float4(x, y, layer, 0.0f).data);
136
- return __hipMapFrom<T>(tmp);
137
- }
138
-
139
- template <
140
- typename T,
141
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
142
- static __device__ __hip_img_chk__ void tex2DLayered(T *ptr, hipTextureObject_t textureObject, float x, float y, int layer)
143
- {
144
- *ptr = tex1DLayered<T>(textureObject, x, y, layer);
145
- }
146
-
147
- template <
148
- typename T,
149
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
150
- static __device__ __hip_img_chk__ T texCubemap(hipTextureObject_t textureObject, float x, float y, float z)
151
- {
152
- TEXTURE_OBJECT_PARAMETERS_INIT
153
- auto tmp = __ockl_image_sample_CM(i, s, float4(x, y, z, 0.0f).data);
154
- return __hipMapFrom<T>(tmp);
155
- }
156
-
157
- template <
158
- typename T,
159
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
160
- static __device__ __hip_img_chk__ void texCubemap(T *ptr, hipTextureObject_t textureObject, float x, float y, float z)
161
- {
162
- *ptr = texCubemap<T>(textureObject, x, y, z);
163
- }
164
-
165
- template <
166
- typename T,
167
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
168
- static __device__ __hip_img_chk__ T texCubemapLayered(hipTextureObject_t textureObject, float x, float y, float z, int layer)
169
- {
170
- TEXTURE_OBJECT_PARAMETERS_INIT
171
- auto tmp = __ockl_image_sample_CMa(i, s, float4(x, y, z, layer).data);
172
- return __hipMapFrom<T>(tmp);
173
- }
174
-
175
- template <
176
- typename T,
177
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
178
- static __device__ __hip_img_chk__ void texCubemapLayered(T *ptr, hipTextureObject_t textureObject, float x, float y, float z, int layer)
179
- {
180
- *ptr = texCubemapLayered<T>(textureObject, x, y, z, layer);
181
- }
182
-
183
- template <
184
- typename T,
185
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
186
- static __device__ __hip_img_chk__ T tex2Dgather(hipTextureObject_t textureObject, float x, float y, int comp = 0)
187
- {
188
- TEXTURE_OBJECT_PARAMETERS_INIT
189
- switch (comp) {
190
- case 1: {
191
- auto tmp = __ockl_image_gather4r_2D(i, s, float2(x, y).data);
192
- return __hipMapFrom<T>(tmp);
193
- break;
194
- }
195
- case 2: {
196
- auto tmp = __ockl_image_gather4g_2D(i, s, float2(x, y).data);
197
- return __hipMapFrom<T>(tmp);
198
- break;
199
- }
200
- case 3: {
201
- auto tmp = __ockl_image_gather4b_2D(i, s, float2(x, y).data);
202
- return __hipMapFrom<T>(tmp);
203
- break;
204
- }
205
- default: {
206
- auto tmp = __ockl_image_gather4a_2D(i, s, float2(x, y).data);
207
- return __hipMapFrom<T>(tmp);
208
- break;
209
- }
210
- }
211
- return {};
212
- }
213
-
214
- template <
215
- typename T,
216
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
217
- static __device__ __hip_img_chk__ void tex2Dgather(T *ptr, hipTextureObject_t textureObject, float x, float y, int comp = 0)
218
- {
219
- *ptr = texCubemapLayered<T>(textureObject, x, y, comp);
220
- }
221
-
222
- template <
223
- typename T,
224
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
225
- static __device__ __hip_img_chk__ T tex1DLod(hipTextureObject_t textureObject, float x, float level)
226
- {
227
- TEXTURE_OBJECT_PARAMETERS_INIT
228
- auto tmp = __ockl_image_sample_lod_1D(i, s, x, level);
229
- return __hipMapFrom<T>(tmp);
230
- }
231
-
232
- template <
233
- typename T,
234
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
235
- static __device__ __hip_img_chk__ void tex1DLod(T *ptr, hipTextureObject_t textureObject, float x, float level)
236
- {
237
- *ptr = tex1DLod<T>(textureObject, x, level);
238
- }
239
-
240
- template <
241
- typename T,
242
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
243
- static __device__ __hip_img_chk__ T tex2DLod(hipTextureObject_t textureObject, float x, float y, float level)
244
- {
245
- TEXTURE_OBJECT_PARAMETERS_INIT
246
- auto tmp = __ockl_image_sample_lod_2D(i, s, float2(x, y).data, level);
247
- return __hipMapFrom<T>(tmp);
248
- }
249
-
250
- template <
251
- typename T,
252
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
253
- static __device__ __hip_img_chk__ void tex2DLod(T *ptr, hipTextureObject_t textureObject, float x, float y, float level)
254
- {
255
- *ptr = tex2DLod<T>(textureObject, x, y, level);
256
- }
257
-
258
- template <
259
- typename T,
260
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
261
- static __device__ __hip_img_chk__ T tex3DLod(hipTextureObject_t textureObject, float x, float y, float z, float level)
262
- {
263
- TEXTURE_OBJECT_PARAMETERS_INIT
264
- auto tmp = __ockl_image_sample_lod_3D(i, s, float4(x, y, z, 0.0f).data, level);
265
- return __hipMapFrom<T>(tmp);
266
- }
267
-
268
- template <
269
- typename T,
270
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
271
- static __device__ __hip_img_chk__ void tex3DLod(T *ptr, hipTextureObject_t textureObject, float x, float y, float z, float level)
272
- {
273
- *ptr = tex3DLod<T>(textureObject, x, y, z, level);
274
- }
275
-
276
- template <
277
- typename T,
278
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
279
- static __device__ __hip_img_chk__ T tex1DLayeredLod(hipTextureObject_t textureObject, float x, int layer, float level)
280
- {
281
- TEXTURE_OBJECT_PARAMETERS_INIT
282
- auto tmp = __ockl_image_sample_1Da(i, s, float2(x, layer).data);
283
- return __hipMapFrom<T>(tmp);
284
- }
285
-
286
- template <
287
- typename T,
288
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
289
- static __device__ __hip_img_chk__ void tex1DLayeredLod(T *ptr, hipTextureObject_t textureObject, float x, int layer, float level)
290
- {
291
- *ptr = tex1DLayeredLod<T>(textureObject, x, layer, level);
292
- }
293
-
294
- template <
295
- typename T,
296
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
297
- static __device__ __hip_img_chk__ T tex2DLayeredLod(hipTextureObject_t textureObject, float x, float y, int layer, float level)
298
- {
299
- TEXTURE_OBJECT_PARAMETERS_INIT
300
- auto tmp = __ockl_image_sample_2Da(i, s, float4(x, y, layer, 0.0f).data);
301
- return __hipMapFrom<T>(tmp);
302
- }
303
-
304
- template <
305
- typename T,
306
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
307
- static __device__ __hip_img_chk__ void tex2DLayeredLod(T *ptr, hipTextureObject_t textureObject, float x, float y, int layer, float level)
308
- {
309
- *ptr = tex2DLayeredLod<T>(textureObject, x, y, layer, level);
310
- }
311
-
312
- template <
313
- typename T,
314
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
315
- static __device__ __hip_img_chk__ T texCubemapLod(hipTextureObject_t textureObject, float x, float y, float z, float level)
316
- {
317
- TEXTURE_OBJECT_PARAMETERS_INIT
318
- auto tmp = __ockl_image_sample_lod_CM(i, s, float4(x, y, z, 0.0f).data, level);
319
- return __hipMapFrom<T>(tmp);
320
- }
321
-
322
- template <
323
- typename T,
324
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
325
- static __device__ __hip_img_chk__ void texCubemapLod(T *ptr, hipTextureObject_t textureObject, float x, float y, float z, float level)
326
- {
327
- *ptr = texCubemapLod<T>(textureObject, x, y, z, level);
328
- }
329
-
330
- template <
331
- typename T,
332
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
333
- static __device__ __hip_img_chk__ T texCubemapGrad(hipTextureObject_t textureObject, float x, float y, float z, float4 dPdx, float4 dPdy)
334
- {
335
- TEXTURE_OBJECT_PARAMETERS_INIT
336
- // TODO missing in device libs.
337
- // auto tmp = __ockl_image_sample_grad_CM(i, s, float4(x, y, z, 0.0f).data, float4(dPdx.x, dPdx.y, dPdx.z, 0.0f).data, float4(dPdy.x, dPdy.y, dPdy.z, 0.0f).data);
338
- // return __hipMapFrom<T>(tmp);
339
- return {};
340
- }
341
-
342
- template <
343
- typename T,
344
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
345
- static __device__ __hip_img_chk__ void texCubemapGrad(T *ptr, hipTextureObject_t textureObject, float x, float y, float z, float4 dPdx, float4 dPdy)
346
- {
347
- *ptr = texCubemapGrad<T>(textureObject, x, y, z, dPdx, dPdy);
348
- }
349
-
350
- template <
351
- typename T,
352
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
353
- static __device__ __hip_img_chk__ T texCubemapLayeredLod(hipTextureObject_t textureObject, float x, float y, float z, int layer, float level)
354
- {
355
- TEXTURE_OBJECT_PARAMETERS_INIT
356
- auto tmp = __ockl_image_sample_lod_CMa(i, s, float4(x, y, z, layer).data, level);
357
- return __hipMapFrom<T>(tmp);
358
- }
359
-
360
- template <
361
- typename T,
362
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
363
- static __device__ __hip_img_chk__ void texCubemapLayeredLod(T *ptr, hipTextureObject_t textureObject, float x, float y, float z, int layer, float level)
364
- {
365
- *ptr = texCubemapLayeredLod<T>(textureObject, x, y, z, layer, level);
366
- }
367
-
368
- template <
369
- typename T,
370
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
371
- static __device__ __hip_img_chk__ T tex1DGrad(hipTextureObject_t textureObject, float x, float dPdx, float dPdy)
372
- {
373
- TEXTURE_OBJECT_PARAMETERS_INIT
374
- auto tmp = __ockl_image_sample_grad_1D(i, s, x, dPdx, dPdy);
375
- return __hipMapFrom<T>(tmp);
376
- }
377
-
378
- template <
379
- typename T,
380
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
381
- static __device__ __hip_img_chk__ void tex1DGrad(T *ptr, hipTextureObject_t textureObject, float x, float dPdx, float dPdy)
382
- {
383
- *ptr = tex1DGrad<T>(textureObject, x, dPdx, dPdy);
384
- }
385
-
386
- template <
387
- typename T,
388
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
389
- static __device__ __hip_img_chk__ T tex2DGrad(hipTextureObject_t textureObject, float x, float y, float2 dPdx, float2 dPdy)
390
- {
391
- TEXTURE_OBJECT_PARAMETERS_INIT
392
- auto tmp = __ockl_image_sample_grad_2D(i, s, float2(x, y).data, float2(dPdx.x, dPdx.y).data, float2(dPdy.x, dPdy.y).data);
393
- return __hipMapFrom<T>(tmp);
394
- }
395
-
396
- template <
397
- typename T,
398
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
399
- static __device__ __hip_img_chk__ void tex2DGrad(T *ptr, hipTextureObject_t textureObject, float x, float y, float2 dPdx, float2 dPdy)
400
- {
401
- *ptr = tex2DGrad<T>(textureObject, x, y, dPdx, dPdy);
402
- }
403
-
404
- template <
405
- typename T,
406
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
407
- static __device__ __hip_img_chk__ T tex3DGrad(hipTextureObject_t textureObject, float x, float y, float z, float4 dPdx, float4 dPdy)
408
- {
409
- TEXTURE_OBJECT_PARAMETERS_INIT
410
- auto tmp = __ockl_image_sample_grad_3D(i, s, float4(x, y, z, 0.0f).data, float4(dPdx.x, dPdx.y, dPdx.z, 0.0f).data, float4(dPdy.x, dPdy.y, dPdy.z, 0.0f).data);
411
- return __hipMapFrom<T>(tmp);
412
- }
413
-
414
- template <
415
- typename T,
416
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
417
- static __device__ __hip_img_chk__ void tex3DGrad(T *ptr, hipTextureObject_t textureObject, float x, float y, float z, float4 dPdx, float4 dPdy)
418
- {
419
- *ptr = tex3DGrad<T>(textureObject, x, y, z, dPdx, dPdy);
420
- }
421
-
422
- template <
423
- typename T,
424
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
425
- static __device__ __hip_img_chk__ T tex1DLayeredGrad(hipTextureObject_t textureObject, float x, int layer, float dPdx, float dPdy)
426
- {
427
- TEXTURE_OBJECT_PARAMETERS_INIT
428
- auto tmp = __ockl_image_sample_grad_1Da(i, s, float2(x, layer).data, dPdx, dPdy);
429
- return __hipMapFrom<T>(tmp);
430
- }
431
-
432
- template <
433
- typename T,
434
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
435
- static __device__ __hip_img_chk__ void tex1DLayeredGrad(T *ptr, hipTextureObject_t textureObject, float x, int layer, float dPdx, float dPdy)
436
- {
437
- *ptr = tex1DLayeredGrad<T>(textureObject, x, layer, dPdx, dPdy);
438
- }
439
-
440
- template <
441
- typename T,
442
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
443
- static __device__ __hip_img_chk__ T tex2DLayeredGrad(hipTextureObject_t textureObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
444
- {
445
- TEXTURE_OBJECT_PARAMETERS_INIT
446
- auto tmp = __ockl_image_sample_grad_2Da(i, s, float4(x, y, layer, 0.0f).data, float2(dPdx.x, dPdx.y).data, float2(dPdy.x, dPdy.y).data);
447
- return __hipMapFrom<T>(tmp);
448
- }
449
-
450
- template <
451
- typename T,
452
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
453
- static __device__ __hip_img_chk__ void tex2DLayeredGrad(T *ptr, hipTextureObject_t textureObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
454
- {
455
- *ptr = tex2DLayeredGrad<T>(textureObject, x, y, layer, dPdx, dPdy);
456
- }
457
-
458
- template <
459
- typename T,
460
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
461
- static __device__ __hip_img_chk__ T texCubemapLayeredGrad(hipTextureObject_t textureObject, float x, float y, float z, int layer, float4 dPdx, float4 dPdy)
462
- {
463
- TEXTURE_OBJECT_PARAMETERS_INIT
464
- // TODO missing in device libs.
465
- // auto tmp = __ockl_image_sample_grad_CMa(i, s, float4(x, y, z, layer).data, float4(dPdx.x, dPdx.y, dPdx.z, 0.0f).data, float4(dPdy.x, dPdy.y, dPdy.z, 0.0f).data);
466
- // return __hipMapFrom<T>(tmp);
467
- return {};
468
- }
469
-
470
- template <
471
- typename T,
472
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
473
- static __device__ __hip_img_chk__ void texCubemapLayeredGrad(T *ptr, hipTextureObject_t textureObject, float x, float y, float z, int layer, float4 dPdx, float4 dPdy)
474
- {
475
- *ptr = texCubemapLayeredGrad<T>(textureObject, x, y, z, layer, dPdx, dPdy);
476
- }
477
-
478
- #endif
@@ -1,39 +0,0 @@
1
- /*
2
- Copyright (c) 2015 - 2021 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_CHANNEL_DESCRIPTOR_H
24
- #define HIP_INCLUDE_HIP_CHANNEL_DESCRIPTOR_H
25
-
26
- // Some standard header files, these are included by hc.hpp and so want to make them avail on both
27
- // paths to provide a consistent include env and avoid "missing symbol" errors that only appears
28
- // on NVCC path:
29
-
30
-
31
- #if defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
32
- #include <hip/amd_detail/amd_channel_descriptor.h>
33
- #elif !defined(__HIP_PLATFORM_AMD__) && defined(__HIP_PLATFORM_NVIDIA__)
34
- #include <hip/nvidia_detail/nvidia_channel_descriptor.h>
35
- #else
36
- #error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
37
- #endif
38
-
39
- #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_DEVICE_FUNCTIONS_H
24
- #define HIP_INCLUDE_HIP_DEVICE_FUNCTIONS_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_device_functions.h>
32
- #elif !defined(__HIP_PLATFORM_AMD__) && defined(__HIP_PLATFORM_NVIDIA__)
33
- #include <device_functions.h>
34
- #else
35
- #error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
36
- #endif
37
-
38
- #endif