triton-windows 3.3.1.post19__cp39-cp39-win_amd64.whl → 3.3.1.post21__cp39-cp39-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 (108) hide show
  1. triton/_C/libtriton.pyd +0 -0
  2. triton/backends/amd/driver.py +6 -1
  3. triton/backends/nvidia/compiler.py +1 -3
  4. triton/backends/nvidia/driver.py +7 -3
  5. triton/runtime/autotuner.py +2 -2
  6. triton/runtime/build.py +5 -5
  7. triton/windows_utils.py +11 -4
  8. {triton_windows-3.3.1.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/METADATA +1 -1
  9. {triton_windows-3.3.1.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/RECORD +11 -108
  10. triton/backends/amd/include/hip/amd_detail/amd_channel_descriptor.h +0 -358
  11. triton/backends/amd/include/hip/amd_detail/amd_device_functions.h +0 -1010
  12. triton/backends/amd/include/hip/amd_detail/amd_hip_atomic.h +0 -1638
  13. triton/backends/amd/include/hip/amd_detail/amd_hip_bf16.h +0 -1814
  14. triton/backends/amd/include/hip/amd_detail/amd_hip_bfloat16.h +0 -293
  15. triton/backends/amd/include/hip/amd_detail/amd_hip_common.h +0 -32
  16. triton/backends/amd/include/hip/amd_detail/amd_hip_complex.h +0 -174
  17. triton/backends/amd/include/hip/amd_detail/amd_hip_cooperative_groups.h +0 -835
  18. triton/backends/amd/include/hip/amd_detail/amd_hip_fp16.h +0 -1809
  19. triton/backends/amd/include/hip/amd_detail/amd_hip_fp8.h +0 -1391
  20. triton/backends/amd/include/hip/amd_detail/amd_hip_gl_interop.h +0 -108
  21. triton/backends/amd/include/hip/amd_detail/amd_hip_math_constants.h +0 -124
  22. triton/backends/amd/include/hip/amd_detail/amd_hip_runtime.h +0 -405
  23. triton/backends/amd/include/hip/amd_detail/amd_hip_runtime_pt_api.h +0 -196
  24. triton/backends/amd/include/hip/amd_detail/amd_hip_unsafe_atomics.h +0 -565
  25. triton/backends/amd/include/hip/amd_detail/amd_hip_vector_types.h +0 -2226
  26. triton/backends/amd/include/hip/amd_detail/amd_math_functions.h +0 -104
  27. triton/backends/amd/include/hip/amd_detail/amd_surface_functions.h +0 -244
  28. triton/backends/amd/include/hip/amd_detail/amd_warp_functions.h +0 -538
  29. triton/backends/amd/include/hip/amd_detail/amd_warp_sync_functions.h +0 -288
  30. triton/backends/amd/include/hip/amd_detail/concepts.hpp +0 -30
  31. triton/backends/amd/include/hip/amd_detail/device_library_decls.h +0 -133
  32. triton/backends/amd/include/hip/amd_detail/functional_grid_launch.hpp +0 -218
  33. triton/backends/amd/include/hip/amd_detail/grid_launch.h +0 -67
  34. triton/backends/amd/include/hip/amd_detail/grid_launch.hpp +0 -50
  35. triton/backends/amd/include/hip/amd_detail/grid_launch_GGL.hpp +0 -26
  36. triton/backends/amd/include/hip/amd_detail/helpers.hpp +0 -137
  37. triton/backends/amd/include/hip/amd_detail/hip_api_trace.hpp +0 -1446
  38. triton/backends/amd/include/hip/amd_detail/hip_assert.h +0 -101
  39. triton/backends/amd/include/hip/amd_detail/hip_cooperative_groups_helper.h +0 -242
  40. triton/backends/amd/include/hip/amd_detail/hip_fp16_gcc.h +0 -254
  41. triton/backends/amd/include/hip/amd_detail/hip_fp16_math_fwd.h +0 -96
  42. triton/backends/amd/include/hip/amd_detail/hip_ldg.h +0 -100
  43. triton/backends/amd/include/hip/amd_detail/hip_prof_str.h +0 -10570
  44. triton/backends/amd/include/hip/amd_detail/hip_runtime_prof.h +0 -78
  45. triton/backends/amd/include/hip/amd_detail/host_defines.h +0 -184
  46. triton/backends/amd/include/hip/amd_detail/hsa_helpers.hpp +0 -102
  47. triton/backends/amd/include/hip/amd_detail/macro_based_grid_launch.hpp +0 -798
  48. triton/backends/amd/include/hip/amd_detail/math_fwd.h +0 -698
  49. triton/backends/amd/include/hip/amd_detail/ockl_image.h +0 -177
  50. triton/backends/amd/include/hip/amd_detail/program_state.hpp +0 -107
  51. triton/backends/amd/include/hip/amd_detail/texture_fetch_functions.h +0 -491
  52. triton/backends/amd/include/hip/amd_detail/texture_indirect_functions.h +0 -478
  53. triton/backends/amd/include/hip/channel_descriptor.h +0 -39
  54. triton/backends/amd/include/hip/device_functions.h +0 -38
  55. triton/backends/amd/include/hip/driver_types.h +0 -468
  56. triton/backends/amd/include/hip/hip_bf16.h +0 -36
  57. triton/backends/amd/include/hip/hip_bfloat16.h +0 -44
  58. triton/backends/amd/include/hip/hip_common.h +0 -100
  59. triton/backends/amd/include/hip/hip_complex.h +0 -38
  60. triton/backends/amd/include/hip/hip_cooperative_groups.h +0 -46
  61. triton/backends/amd/include/hip/hip_deprecated.h +0 -95
  62. triton/backends/amd/include/hip/hip_ext.h +0 -161
  63. triton/backends/amd/include/hip/hip_fp16.h +0 -36
  64. triton/backends/amd/include/hip/hip_fp8.h +0 -33
  65. triton/backends/amd/include/hip/hip_gl_interop.h +0 -32
  66. triton/backends/amd/include/hip/hip_hcc.h +0 -24
  67. triton/backends/amd/include/hip/hip_math_constants.h +0 -36
  68. triton/backends/amd/include/hip/hip_profile.h +0 -27
  69. triton/backends/amd/include/hip/hip_runtime.h +0 -75
  70. triton/backends/amd/include/hip/hip_runtime_api.h +0 -9261
  71. triton/backends/amd/include/hip/hip_texture_types.h +0 -29
  72. triton/backends/amd/include/hip/hip_vector_types.h +0 -41
  73. triton/backends/amd/include/hip/hip_version.h +0 -17
  74. triton/backends/amd/include/hip/hiprtc.h +0 -421
  75. triton/backends/amd/include/hip/library_types.h +0 -78
  76. triton/backends/amd/include/hip/math_functions.h +0 -42
  77. triton/backends/amd/include/hip/surface_types.h +0 -63
  78. triton/backends/amd/include/hip/texture_types.h +0 -194
  79. triton/backends/amd/include/hsa/Brig.h +0 -1131
  80. triton/backends/amd/include/hsa/amd_hsa_common.h +0 -91
  81. triton/backends/amd/include/hsa/amd_hsa_elf.h +0 -462
  82. triton/backends/amd/include/hsa/amd_hsa_kernel_code.h +0 -269
  83. triton/backends/amd/include/hsa/amd_hsa_queue.h +0 -109
  84. triton/backends/amd/include/hsa/amd_hsa_signal.h +0 -80
  85. triton/backends/amd/include/hsa/hsa.h +0 -5738
  86. triton/backends/amd/include/hsa/hsa_amd_tool.h +0 -91
  87. triton/backends/amd/include/hsa/hsa_api_trace.h +0 -579
  88. triton/backends/amd/include/hsa/hsa_api_trace_version.h +0 -68
  89. triton/backends/amd/include/hsa/hsa_ext_amd.h +0 -3146
  90. triton/backends/amd/include/hsa/hsa_ext_finalize.h +0 -531
  91. triton/backends/amd/include/hsa/hsa_ext_image.h +0 -1454
  92. triton/backends/amd/include/hsa/hsa_ven_amd_aqlprofile.h +0 -488
  93. triton/backends/amd/include/hsa/hsa_ven_amd_loader.h +0 -667
  94. triton/backends/amd/include/hsa/hsa_ven_amd_pc_sampling.h +0 -416
  95. triton/backends/amd/include/roctracer/ext/prof_protocol.h +0 -107
  96. triton/backends/amd/include/roctracer/hip_ostream_ops.h +0 -4515
  97. triton/backends/amd/include/roctracer/hsa_ostream_ops.h +0 -1727
  98. triton/backends/amd/include/roctracer/hsa_prof_str.h +0 -3059
  99. triton/backends/amd/include/roctracer/roctracer.h +0 -779
  100. triton/backends/amd/include/roctracer/roctracer_ext.h +0 -81
  101. triton/backends/amd/include/roctracer/roctracer_hcc.h +0 -24
  102. triton/backends/amd/include/roctracer/roctracer_hip.h +0 -37
  103. triton/backends/amd/include/roctracer/roctracer_hsa.h +0 -112
  104. triton/backends/amd/include/roctracer/roctracer_plugin.h +0 -137
  105. triton/backends/amd/include/roctracer/roctracer_roctx.h +0 -67
  106. triton/backends/amd/include/roctracer/roctx.h +0 -229
  107. {triton_windows-3.3.1.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/WHEEL +0 -0
  108. {triton_windows-3.3.1.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/top_level.txt +0 -0
@@ -1,104 +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(__HIPCC_RTC__)
26
- #include "hip_fp16_math_fwd.h"
27
- #include "amd_hip_vector_types.h"
28
- #include "math_fwd.h"
29
-
30
- #include <hip/amd_detail/host_defines.h>
31
-
32
- #include <algorithm>
33
- // assert.h is only for the host version of assert.
34
- // The device version of assert is implemented in hip/amd_detail/hip_runtime.h.
35
- // Users should include hip_runtime.h for the device version of assert.
36
- #if !__HIP_DEVICE_COMPILE__
37
- #include <assert.h>
38
- #endif
39
- #include <limits.h>
40
- #include <limits>
41
- #include <stdint.h>
42
- #endif // !defined(__HIPCC_RTC__)
43
-
44
- #if _LIBCPP_VERSION && __HIP__
45
- namespace std {
46
- template <>
47
- struct __numeric_type<_Float16>
48
- {
49
- static _Float16 __test(_Float16);
50
-
51
- typedef _Float16 type;
52
- static const bool value = true;
53
- };
54
- }
55
- #endif // _LIBCPP_VERSION
56
-
57
- #pragma push_macro("__DEVICE__")
58
- #pragma push_macro("__RETURN_TYPE")
59
-
60
- #define __DEVICE__ static __device__
61
- #define __RETURN_TYPE bool
62
-
63
- // DOT FUNCTIONS
64
- #if defined(__clang__) && defined(__HIP__)
65
- __DEVICE__
66
- inline
67
- int amd_mixed_dot(short2 a, short2 b, int c, bool saturate) {
68
- return __ockl_sdot2(a.data, b.data, c, saturate);
69
- }
70
- __DEVICE__
71
- inline
72
- uint amd_mixed_dot(ushort2 a, ushort2 b, uint c, bool saturate) {
73
- return __ockl_udot2(a.data, b.data, c, saturate);
74
- }
75
- __DEVICE__
76
- inline
77
- int amd_mixed_dot(char4 a, char4 b, int c, bool saturate) {
78
- return __ockl_sdot4(a.data, b.data, c, saturate);
79
- }
80
- __DEVICE__
81
- inline
82
- uint amd_mixed_dot(uchar4 a, uchar4 b, uint c, bool saturate) {
83
- return __ockl_udot4(a.data, b.data, c, saturate);
84
- }
85
- __DEVICE__
86
- inline
87
- int amd_mixed_dot(int a, int b, int c, bool saturate) {
88
- return __ockl_sdot8(a, b, c, saturate);
89
- }
90
- __DEVICE__
91
- inline
92
- uint amd_mixed_dot(uint a, uint b, uint c, bool saturate) {
93
- return __ockl_udot8(a, b, c, saturate);
94
- }
95
- #endif
96
-
97
- #pragma pop_macro("__DEVICE__")
98
- #pragma pop_macro("__RETURN_TYPE")
99
- // For backward compatibility.
100
- // There are HIP applications e.g. TensorFlow, expecting __HIP_ARCH_* macros
101
- // defined after including math_functions.h.
102
- #if !defined(__HIPCC_RTC__)
103
- #include <hip/amd_detail/amd_hip_runtime.h>
104
- #endif
@@ -1,244 +0,0 @@
1
- /*
2
- Copyright (c) 2018 - 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_SURFACE_FUNCTIONS_H
24
- #define HIP_INCLUDE_HIP_AMD_DETAIL_SURFACE_FUNCTIONS_H
25
-
26
- #if defined(__cplusplus)
27
-
28
- #if !defined(__HIPCC_RTC__)
29
- #include <hip/surface_types.h>
30
- #include <hip/hip_vector_types.h>
31
- #include <hip/amd_detail/texture_fetch_functions.h>
32
- #include <hip/amd_detail/ockl_image.h>
33
- #endif
34
-
35
- #if defined(__HIPCC_RTC__)
36
- #define __HOST_DEVICE__ __device__
37
- #else
38
- #define __HOST_DEVICE__ __host__ __device__
39
- #endif
40
-
41
- #define __HIP_SURFACE_OBJECT_PARAMETERS_INIT \
42
- unsigned int ADDRESS_SPACE_CONSTANT* i = (unsigned int ADDRESS_SPACE_CONSTANT*)surfObj;
43
-
44
- // CUDA is using byte address, need map to pixel address for HIP
45
- static __HOST_DEVICE__ __forceinline__ int __hipGetPixelAddr(int x, int format, int order) {
46
- /*
47
- * use below format index to generate format LUT
48
- typedef enum {
49
- HSA_EXT_IMAGE_CHANNEL_TYPE_SNORM_INT8 = 0,
50
- HSA_EXT_IMAGE_CHANNEL_TYPE_SNORM_INT16 = 1,
51
- HSA_EXT_IMAGE_CHANNEL_TYPE_UNORM_INT8 = 2,
52
- HSA_EXT_IMAGE_CHANNEL_TYPE_UNORM_INT16 = 3,
53
- HSA_EXT_IMAGE_CHANNEL_TYPE_UNORM_INT24 = 4,
54
- HSA_EXT_IMAGE_CHANNEL_TYPE_UNORM_SHORT_555 = 5,
55
- HSA_EXT_IMAGE_CHANNEL_TYPE_UNORM_SHORT_565 = 6,
56
- HSA_EXT_IMAGE_CHANNEL_TYPE_UNORM_SHORT_101010 = 7,
57
- HSA_EXT_IMAGE_CHANNEL_TYPE_SIGNED_INT8 = 8,
58
- HSA_EXT_IMAGE_CHANNEL_TYPE_SIGNED_INT16 = 9,
59
- HSA_EXT_IMAGE_CHANNEL_TYPE_SIGNED_INT32 = 10,
60
- HSA_EXT_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8 = 11,
61
- HSA_EXT_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16 = 12,
62
- HSA_EXT_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32 = 13,
63
- HSA_EXT_IMAGE_CHANNEL_TYPE_HALF_FLOAT = 14,
64
- HSA_EXT_IMAGE_CHANNEL_TYPE_FLOAT = 15
65
- } hsa_ext_image_channel_type_t;
66
- */
67
- static const int FormatLUT[] = { 0, 1, 0, 1, 3, 1, 1, 1, 0, 1, 2, 0, 1, 2, 1, 2 };
68
- x = FormatLUT[format] == 3 ? x / FormatLUT[format] : x >> FormatLUT[format];
69
-
70
- /*
71
- * use below order index to generate order LUT
72
- typedef enum {
73
- HSA_EXT_IMAGE_CHANNEL_ORDER_A = 0,
74
- HSA_EXT_IMAGE_CHANNEL_ORDER_R = 1,
75
- HSA_EXT_IMAGE_CHANNEL_ORDER_RX = 2,
76
- HSA_EXT_IMAGE_CHANNEL_ORDER_RG = 3,
77
- HSA_EXT_IMAGE_CHANNEL_ORDER_RGX = 4,
78
- HSA_EXT_IMAGE_CHANNEL_ORDER_RA = 5,
79
- HSA_EXT_IMAGE_CHANNEL_ORDER_RGB = 6,
80
- HSA_EXT_IMAGE_CHANNEL_ORDER_RGBX = 7,
81
- HSA_EXT_IMAGE_CHANNEL_ORDER_RGBA = 8,
82
- HSA_EXT_IMAGE_CHANNEL_ORDER_BGRA = 9,
83
- HSA_EXT_IMAGE_CHANNEL_ORDER_ARGB = 10,
84
- HSA_EXT_IMAGE_CHANNEL_ORDER_ABGR = 11,
85
- HSA_EXT_IMAGE_CHANNEL_ORDER_SRGB = 12,
86
- HSA_EXT_IMAGE_CHANNEL_ORDER_SRGBX = 13,
87
- HSA_EXT_IMAGE_CHANNEL_ORDER_SRGBA = 14,
88
- HSA_EXT_IMAGE_CHANNEL_ORDER_SBGRA = 15,
89
- HSA_EXT_IMAGE_CHANNEL_ORDER_INTENSITY = 16,
90
- HSA_EXT_IMAGE_CHANNEL_ORDER_LUMINANCE = 17,
91
- HSA_EXT_IMAGE_CHANNEL_ORDER_DEPTH = 18,
92
- HSA_EXT_IMAGE_CHANNEL_ORDER_DEPTH_STENCIL = 19
93
- } hsa_ext_image_channel_order_t;
94
- */
95
- static const int OrderLUT[] = { 0, 0, 1, 1, 3, 1, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 0, 0, 0, 0 };
96
- return x = OrderLUT[order] == 3 ? x / OrderLUT[order] : x >> OrderLUT[order];
97
- }
98
-
99
- template <
100
- typename T,
101
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
102
- static __device__ __hip_img_chk__ void surf1Dread(T* data, hipSurfaceObject_t surfObj, int x,
103
- int boundaryMode = hipBoundaryModeZero) {
104
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
105
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_1D(i), __ockl_image_channel_order_1D(i));
106
- auto tmp = __ockl_image_load_1D(i, x);
107
- *data = __hipMapFrom<T>(tmp);
108
- }
109
-
110
- template <
111
- typename T,
112
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
113
- static __device__ __hip_img_chk__ void surf1Dwrite(T data, hipSurfaceObject_t surfObj, int x) {
114
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
115
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_1D(i), __ockl_image_channel_order_1D(i));
116
- auto tmp = __hipMapTo<float4::Native_vec_>(data);
117
- __ockl_image_store_1D(i, x, tmp);
118
- }
119
-
120
- template <
121
- typename T,
122
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
123
- static __device__ __hip_img_chk__ void surf2Dread(T* data, hipSurfaceObject_t surfObj, int x, int y) {
124
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
125
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_2D(i), __ockl_image_channel_order_2D(i));
126
- auto tmp = __ockl_image_load_2D(i, int2(x, y).data);
127
- *data = __hipMapFrom<T>(tmp);
128
- }
129
-
130
- template <
131
- typename T,
132
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
133
- static __device__ __hip_img_chk__ void surf2Dwrite(T data, hipSurfaceObject_t surfObj, int x, int y) {
134
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
135
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_2D(i), __ockl_image_channel_order_2D(i));
136
- auto tmp = __hipMapTo<float4::Native_vec_>(data);
137
- __ockl_image_store_2D(i, int2(x, y).data, tmp);
138
- }
139
-
140
- template <
141
- typename T,
142
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
143
- static __device__ __hip_img_chk__ void surf3Dread(T* data, hipSurfaceObject_t surfObj, int x, int y, int z) {
144
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
145
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_3D(i), __ockl_image_channel_order_3D(i));
146
- auto tmp = __ockl_image_load_3D(i, int4(x, y, z, 0).data);
147
- *data = __hipMapFrom<T>(tmp);
148
- }
149
-
150
- template <
151
- typename T,
152
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
153
- static __device__ __hip_img_chk__ void surf3Dwrite(T data, hipSurfaceObject_t surfObj, int x, int y, int z) {
154
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
155
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_3D(i), __ockl_image_channel_order_3D(i));
156
- auto tmp = __hipMapTo<float4::Native_vec_>(data);
157
- __ockl_image_store_3D(i, int4(x, y, z, 0).data, tmp);
158
- }
159
-
160
- template <
161
- typename T,
162
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
163
- static __device__ __hip_img_chk__ void surf1DLayeredread(T* data, hipSurfaceObject_t surfObj, int x, int layer) {
164
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
165
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_1D(i), __ockl_image_channel_order_1D(i));
166
- auto tmp = __ockl_image_load_lod_1D(i, x, layer);
167
- *data = __hipMapFrom<T>(tmp);
168
- }
169
-
170
- template <
171
- typename T,
172
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
173
- static __device__ __hip_img_chk__ void surf1DLayeredwrite(T data, hipSurfaceObject_t surfObj, int x, int layer) {
174
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
175
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_1D(i), __ockl_image_channel_order_1D(i));
176
- auto tmp = __hipMapTo<float4::Native_vec_>(data);
177
- __ockl_image_store_lod_1D(i, x, layer, tmp);
178
- }
179
-
180
- template <
181
- typename T,
182
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
183
- static __device__ __hip_img_chk__ void surf2DLayeredread(T* data, hipSurfaceObject_t surfObj, int x, int y, int layer) {
184
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
185
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_2D(i), __ockl_image_channel_order_2D(i));
186
- auto tmp = __ockl_image_load_lod_2D(i, int2(x, y).data, layer);
187
- *data = __hipMapFrom<T>(tmp);
188
- }
189
-
190
- template <
191
- typename T,
192
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
193
- static __device__ __hip_img_chk__ void surf2DLayeredwrite(T data, hipSurfaceObject_t surfObj, int x, int y, int layer) {
194
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
195
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_2D(i), __ockl_image_channel_order_2D(i));
196
- auto tmp = __hipMapTo<float4::Native_vec_>(data);
197
- __ockl_image_store_lod_2D(i, int2(x, y).data, layer, tmp);
198
- }
199
-
200
- template <
201
- typename T,
202
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
203
- static __device__ __hip_img_chk__ void surfCubemapread(T* data, hipSurfaceObject_t surfObj, int x, int y, int face) {
204
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
205
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_2D(i), __ockl_image_channel_order_2D(i));
206
- auto tmp = __ockl_image_load_CM(i, int2(x, y).data, face);
207
- *data = __hipMapFrom<T>(tmp);
208
- }
209
-
210
- template <
211
- typename T,
212
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
213
- static __device__ __hip_img_chk__ void surfCubemapwrite(T data, hipSurfaceObject_t surfObj, int x, int y, int face) {
214
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
215
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_2D(i), __ockl_image_channel_order_2D(i));
216
- auto tmp = __hipMapTo<float4::Native_vec_>(data);
217
- __ockl_image_store_CM(i, int2(x, y).data, face, tmp);
218
- }
219
-
220
- template <
221
- typename T,
222
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
223
- static __device__ __hip_img_chk__ void surfCubemapLayeredread(T* data, hipSurfaceObject_t surfObj, int x, int y, int face,
224
- int layer) {
225
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
226
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_2D(i), __ockl_image_channel_order_2D(i));
227
- auto tmp = __ockl_image_load_lod_CM(i, int2(x, y).data, face, layer);
228
- *data = __hipMapFrom<T>(tmp);
229
- }
230
-
231
- template <
232
- typename T,
233
- typename std::enable_if<__hip_is_tex_surf_channel_type<T>::value>::type* = nullptr>
234
- static __device__ __hip_img_chk__ void surfCubemapLayeredwrite(T* data, hipSurfaceObject_t surfObj, int x, int y, int face,
235
- int layer) {
236
- __HIP_SURFACE_OBJECT_PARAMETERS_INIT
237
- x = __hipGetPixelAddr(x, __ockl_image_channel_data_type_2D(i), __ockl_image_channel_order_2D(i));
238
- auto tmp = __hipMapTo<float4::Native_vec_>(data);
239
- __ockl_image_store_lod_CM(i, int2(x, y).data, face, layer, tmp);
240
- }
241
-
242
- #endif
243
-
244
- #endif