triton-windows 3.3.0.post19__cp312-cp312-win_amd64.whl → 3.4.0.post20__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.
- triton/_C/libtriton.pyd +0 -0
- triton/__init__.py +4 -1
- triton/_filecheck.py +87 -0
- triton/_internal_testing.py +26 -15
- triton/_utils.py +110 -21
- triton/backends/__init__.py +20 -23
- triton/backends/amd/__init__.py +0 -0
- triton/backends/amd/compiler.py +112 -78
- triton/backends/amd/driver.c +5 -2
- triton/backends/amd/driver.py +149 -47
- triton/backends/compiler.py +7 -21
- triton/backends/nvidia/bin/ptxas.exe +0 -0
- triton/backends/nvidia/compiler.py +92 -93
- triton/backends/nvidia/driver.c +90 -98
- triton/backends/nvidia/driver.py +303 -128
- triton/compiler/code_generator.py +212 -111
- triton/compiler/compiler.py +110 -25
- triton/experimental/__init__.py +0 -0
- triton/experimental/gluon/__init__.py +4 -0
- triton/experimental/gluon/_compiler.py +0 -0
- triton/experimental/gluon/_runtime.py +99 -0
- triton/experimental/gluon/language/__init__.py +18 -0
- triton/experimental/gluon/language/_core.py +312 -0
- triton/experimental/gluon/language/_layouts.py +230 -0
- triton/experimental/gluon/language/_math.py +12 -0
- triton/experimental/gluon/language/_semantic.py +287 -0
- triton/experimental/gluon/language/_standard.py +47 -0
- triton/experimental/gluon/language/nvidia/__init__.py +4 -0
- triton/experimental/gluon/language/nvidia/blackwell/__init__.py +202 -0
- triton/experimental/gluon/language/nvidia/blackwell/tma.py +32 -0
- triton/experimental/gluon/language/nvidia/hopper/__init__.py +11 -0
- triton/experimental/gluon/language/nvidia/hopper/mbarrier.py +51 -0
- triton/experimental/gluon/language/nvidia/hopper/tma.py +96 -0
- triton/experimental/gluon/nvidia/__init__.py +4 -0
- triton/experimental/gluon/nvidia/blackwell.py +3 -0
- triton/experimental/gluon/nvidia/hopper.py +40 -0
- triton/knobs.py +481 -0
- triton/language/__init__.py +39 -14
- triton/language/core.py +794 -537
- triton/language/extra/cuda/__init__.py +10 -7
- triton/language/extra/cuda/gdc.py +42 -0
- triton/language/extra/cuda/libdevice.py +394 -394
- triton/language/extra/cuda/utils.py +21 -21
- triton/language/extra/hip/libdevice.py +113 -104
- triton/language/math.py +65 -66
- triton/language/random.py +12 -2
- triton/language/semantic.py +1706 -1770
- triton/language/standard.py +116 -51
- triton/runtime/autotuner.py +117 -59
- triton/runtime/build.py +76 -12
- triton/runtime/cache.py +18 -47
- triton/runtime/driver.py +32 -29
- triton/runtime/interpreter.py +72 -35
- triton/runtime/jit.py +146 -110
- triton/runtime/tcc/lib/python310.def +1610 -0
- triton/runtime/tcc/lib/python311.def +1633 -0
- triton/runtime/tcc/lib/python312.def +1703 -0
- triton/runtime/tcc/lib/python313.def +1651 -0
- triton/runtime/tcc/lib/python313t.def +1656 -0
- triton/runtime/tcc/lib/python39.def +1644 -0
- triton/runtime/tcc/lib/python3t.def +905 -0
- triton/testing.py +16 -12
- triton/tools/disasm.py +3 -4
- triton/tools/tensor_descriptor.py +36 -0
- triton/windows_utils.py +14 -6
- {triton_windows-3.3.0.post19.dist-info → triton_windows-3.4.0.post20.dist-info}/METADATA +7 -2
- triton_windows-3.4.0.post20.dist-info/RECORD +186 -0
- {triton_windows-3.3.0.post19.dist-info → triton_windows-3.4.0.post20.dist-info}/WHEEL +1 -1
- triton_windows-3.4.0.post20.dist-info/entry_points.txt +3 -0
- triton_windows-3.4.0.post20.dist-info/licenses/LICENSE +23 -0
- triton_windows-3.4.0.post20.dist-info/top_level.txt +1 -0
- 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/language/_utils.py +0 -21
- triton/language/extra/cuda/_experimental_tma.py +0 -106
- triton/tools/experimental_descriptor.py +0 -32
- triton_windows-3.3.0.post19.dist-info/RECORD +0 -253
- triton_windows-3.3.0.post19.dist-info/top_level.txt +0 -14
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2019 - 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_AMD_DETAIL_HIP_RUNTIME_PROF_H
|
|
24
|
-
#define HIP_INCLUDE_HIP_AMD_DETAIL_HIP_RUNTIME_PROF_H
|
|
25
|
-
|
|
26
|
-
// HIP ROCclr Op IDs enumeration
|
|
27
|
-
enum HipVdiOpId {
|
|
28
|
-
kHipVdiOpIdDispatch = 0,
|
|
29
|
-
kHipVdiOpIdCopy = 1,
|
|
30
|
-
kHipVdiOpIdBarrier = 2,
|
|
31
|
-
kHipVdiOpIdNumber = 3
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// Types of ROCclr commands
|
|
35
|
-
enum HipVdiCommandKind {
|
|
36
|
-
kHipVdiCommandKernel = 0x11F0,
|
|
37
|
-
kHipVdiCommandTask = 0x11F1,
|
|
38
|
-
kHipVdiMemcpyDeviceToHost = 0x11F3,
|
|
39
|
-
kHipHipVdiMemcpyHostToDevice = 0x11F4,
|
|
40
|
-
kHipVdiMemcpyDeviceToDevice = 0x11F5,
|
|
41
|
-
kHipVidMemcpyDeviceToHostRect = 0x1201,
|
|
42
|
-
kHipVdiMemcpyHostToDeviceRect = 0x1202,
|
|
43
|
-
kHipVdiMemcpyDeviceToDeviceRect = 0x1203,
|
|
44
|
-
kHipVdiFillMemory = 0x1207,
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @brief Initializes activity callback
|
|
49
|
-
*
|
|
50
|
-
* @param [input] id_callback Event ID callback function
|
|
51
|
-
* @param [input] op_callback Event operation callback function
|
|
52
|
-
* @param [input] arg Arguments passed into callback
|
|
53
|
-
*
|
|
54
|
-
* @returns None
|
|
55
|
-
*/
|
|
56
|
-
void hipInitActivityCallback(void* id_callback, void* op_callback, void* arg);
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @brief Enables activity callback
|
|
60
|
-
*
|
|
61
|
-
* @param [input] op Operation, which will trigger a callback (@see HipVdiOpId)
|
|
62
|
-
* @param [input] enable Enable state for the callback
|
|
63
|
-
*
|
|
64
|
-
* @returns True if successful
|
|
65
|
-
*/
|
|
66
|
-
bool hipEnableActivityCallback(uint32_t op, bool enable);
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @brief Returns the description string for the operation kind
|
|
70
|
-
*
|
|
71
|
-
* @param [input] id Command kind id (@see HipVdiCommandKind)
|
|
72
|
-
*
|
|
73
|
-
* @returns A pointer to a const string with the command description
|
|
74
|
-
*/
|
|
75
|
-
const char* hipGetCmdName(uint32_t id);
|
|
76
|
-
|
|
77
|
-
#endif // HIP_INCLUDE_HIP_AMD_DETAIL_HIP_RUNTIME_PROF_H
|
|
78
|
-
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2015 - 2022 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
|
-
/**
|
|
24
|
-
* @file amd_detail/host_defines.h
|
|
25
|
-
* @brief TODO-doc
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
#ifndef HIP_INCLUDE_HIP_AMD_DETAIL_HOST_DEFINES_H
|
|
29
|
-
#define HIP_INCLUDE_HIP_AMD_DETAIL_HOST_DEFINES_H
|
|
30
|
-
|
|
31
|
-
// Add guard to Generic Grid Launch method
|
|
32
|
-
#ifndef GENERIC_GRID_LAUNCH
|
|
33
|
-
#define GENERIC_GRID_LAUNCH 1
|
|
34
|
-
#endif
|
|
35
|
-
|
|
36
|
-
#if defined(__clang__) && defined(__HIP__)
|
|
37
|
-
|
|
38
|
-
namespace __hip_internal {
|
|
39
|
-
typedef unsigned char uint8_t;
|
|
40
|
-
typedef unsigned short uint16_t;
|
|
41
|
-
typedef unsigned int uint32_t;
|
|
42
|
-
typedef unsigned long long uint64_t;
|
|
43
|
-
typedef signed char int8_t;
|
|
44
|
-
typedef signed short int16_t;
|
|
45
|
-
typedef signed int int32_t;
|
|
46
|
-
typedef signed long long int64_t;
|
|
47
|
-
|
|
48
|
-
template <class _Tp, _Tp __v> struct integral_constant {
|
|
49
|
-
static constexpr const _Tp value = __v;
|
|
50
|
-
typedef _Tp value_type;
|
|
51
|
-
typedef integral_constant type;
|
|
52
|
-
constexpr operator value_type() const { return value; }
|
|
53
|
-
constexpr value_type operator()() const { return value; }
|
|
54
|
-
};
|
|
55
|
-
template <class _Tp, _Tp __v> constexpr const _Tp integral_constant<_Tp, __v>::value;
|
|
56
|
-
|
|
57
|
-
typedef integral_constant<bool, true> true_type;
|
|
58
|
-
typedef integral_constant<bool, false> false_type;
|
|
59
|
-
|
|
60
|
-
template <bool B> using bool_constant = integral_constant<bool, B>;
|
|
61
|
-
typedef bool_constant<true> true_type;
|
|
62
|
-
typedef bool_constant<false> false_type;
|
|
63
|
-
|
|
64
|
-
template <bool __B, class __T = void> struct enable_if {};
|
|
65
|
-
template <class __T> struct enable_if<true, __T> { typedef __T type; };
|
|
66
|
-
|
|
67
|
-
template<bool _B> struct true_or_false_type : public false_type {};
|
|
68
|
-
template<> struct true_or_false_type<true> : public true_type {};
|
|
69
|
-
|
|
70
|
-
template <class _Tp> struct is_integral : public false_type {};
|
|
71
|
-
template <> struct is_integral<bool> : public true_type {};
|
|
72
|
-
template <> struct is_integral<char> : public true_type {};
|
|
73
|
-
template <> struct is_integral<signed char> : public true_type {};
|
|
74
|
-
template <> struct is_integral<unsigned char> : public true_type {};
|
|
75
|
-
template <> struct is_integral<wchar_t> : public true_type {};
|
|
76
|
-
template <> struct is_integral<short> : public true_type {};
|
|
77
|
-
template <> struct is_integral<unsigned short> : public true_type {};
|
|
78
|
-
template <> struct is_integral<int> : public true_type {};
|
|
79
|
-
template <> struct is_integral<unsigned int> : public true_type {};
|
|
80
|
-
template <> struct is_integral<long> : public true_type {};
|
|
81
|
-
template <> struct is_integral<unsigned long> : public true_type {};
|
|
82
|
-
template <> struct is_integral<long long> : public true_type {};
|
|
83
|
-
template <> struct is_integral<unsigned long long> : public true_type {};
|
|
84
|
-
|
|
85
|
-
template <class _Tp> struct is_arithmetic : public false_type {};
|
|
86
|
-
template <> struct is_arithmetic<bool> : public true_type {};
|
|
87
|
-
template <> struct is_arithmetic<char> : public true_type {};
|
|
88
|
-
template <> struct is_arithmetic<signed char> : public true_type {};
|
|
89
|
-
template <> struct is_arithmetic<unsigned char> : public true_type {};
|
|
90
|
-
template <> struct is_arithmetic<wchar_t> : public true_type {};
|
|
91
|
-
template <> struct is_arithmetic<short> : public true_type {};
|
|
92
|
-
template <> struct is_arithmetic<unsigned short> : public true_type {};
|
|
93
|
-
template <> struct is_arithmetic<int> : public true_type {};
|
|
94
|
-
template <> struct is_arithmetic<unsigned int> : public true_type {};
|
|
95
|
-
template <> struct is_arithmetic<long> : public true_type {};
|
|
96
|
-
template <> struct is_arithmetic<unsigned long> : public true_type {};
|
|
97
|
-
template <> struct is_arithmetic<long long> : public true_type {};
|
|
98
|
-
template <> struct is_arithmetic<unsigned long long> : public true_type {};
|
|
99
|
-
template <> struct is_arithmetic<float> : public true_type {};
|
|
100
|
-
template <> struct is_arithmetic<double> : public true_type {};
|
|
101
|
-
|
|
102
|
-
template<typename _Tp> struct is_floating_point : public false_type {};
|
|
103
|
-
template<> struct is_floating_point<float> : public true_type {};
|
|
104
|
-
template<> struct is_floating_point<double> : public true_type {};
|
|
105
|
-
template<> struct is_floating_point<long double> : public true_type {};
|
|
106
|
-
|
|
107
|
-
template <typename __T, typename __U> struct is_same : public false_type {};
|
|
108
|
-
template <typename __T> struct is_same<__T, __T> : public true_type {};
|
|
109
|
-
|
|
110
|
-
template<typename _Tp, bool = is_arithmetic<_Tp>::value>
|
|
111
|
-
struct is_signed : public false_type {};
|
|
112
|
-
template<typename _Tp>
|
|
113
|
-
struct is_signed<_Tp, true> : public true_or_false_type<_Tp(-1) < _Tp(0)> {};
|
|
114
|
-
|
|
115
|
-
template<typename _CharT> struct char_traits;
|
|
116
|
-
template<typename _CharT, typename _Traits = char_traits<_CharT>> class basic_istream;
|
|
117
|
-
template<typename _CharT, typename _Traits = char_traits<_CharT>> class basic_ostream;
|
|
118
|
-
typedef basic_istream<char> istream;
|
|
119
|
-
typedef basic_ostream<char> ostream;
|
|
120
|
-
|
|
121
|
-
template<typename _Tp>
|
|
122
|
-
struct is_standard_layout
|
|
123
|
-
: public integral_constant<bool, __is_standard_layout(_Tp)>
|
|
124
|
-
{ };
|
|
125
|
-
|
|
126
|
-
template<typename _Tp>
|
|
127
|
-
struct is_trivial
|
|
128
|
-
: public integral_constant<bool, __is_trivial(_Tp)>
|
|
129
|
-
{ };
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
template <bool B, class T, class F> struct conditional { using type = T; };
|
|
133
|
-
template <class T, class F> struct conditional<false, T, F> { using type = F; };
|
|
134
|
-
}
|
|
135
|
-
typedef __hip_internal::uint8_t __hip_uint8_t;
|
|
136
|
-
typedef __hip_internal::uint16_t __hip_uint16_t;
|
|
137
|
-
typedef __hip_internal::uint32_t __hip_uint32_t;
|
|
138
|
-
typedef __hip_internal::uint64_t __hip_uint64_t;
|
|
139
|
-
typedef __hip_internal::int8_t __hip_int8_t;
|
|
140
|
-
typedef __hip_internal::int16_t __hip_int16_t;
|
|
141
|
-
typedef __hip_internal::int32_t __hip_int32_t;
|
|
142
|
-
typedef __hip_internal::int64_t __hip_int64_t;
|
|
143
|
-
|
|
144
|
-
#if !__CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__
|
|
145
|
-
#define __host__ __attribute__((host))
|
|
146
|
-
#define __device__ __attribute__((device))
|
|
147
|
-
#define __global__ __attribute__((global))
|
|
148
|
-
#define __shared__ __attribute__((shared))
|
|
149
|
-
#define __constant__ __attribute__((constant))
|
|
150
|
-
#endif // !__CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__
|
|
151
|
-
|
|
152
|
-
#if !defined(__has_feature) || !__has_feature(cuda_noinline_keyword)
|
|
153
|
-
#define __noinline__ __attribute__((noinline))
|
|
154
|
-
#endif
|
|
155
|
-
|
|
156
|
-
#define __forceinline__ inline __attribute__((always_inline))
|
|
157
|
-
|
|
158
|
-
#if __HIP_NO_IMAGE_SUPPORT
|
|
159
|
-
#define __hip_img_chk__ __attribute__((unavailable("The image/texture API not supported on the device")))
|
|
160
|
-
#else
|
|
161
|
-
#define __hip_img_chk__
|
|
162
|
-
#endif
|
|
163
|
-
|
|
164
|
-
#else
|
|
165
|
-
|
|
166
|
-
// Non-HCC compiler
|
|
167
|
-
/**
|
|
168
|
-
* Function and kernel markers
|
|
169
|
-
*/
|
|
170
|
-
#define __host__
|
|
171
|
-
#define __device__
|
|
172
|
-
|
|
173
|
-
#define __global__
|
|
174
|
-
|
|
175
|
-
#define __noinline__
|
|
176
|
-
#define __forceinline__ inline
|
|
177
|
-
|
|
178
|
-
#define __shared__
|
|
179
|
-
#define __constant__
|
|
180
|
-
|
|
181
|
-
#define __hip_img_chk__
|
|
182
|
-
#endif
|
|
183
|
-
|
|
184
|
-
#endif
|
|
@@ -1,102 +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
|
-
#pragma once
|
|
23
|
-
|
|
24
|
-
#include <hsa/hsa.h>
|
|
25
|
-
|
|
26
|
-
#include <cstdint>
|
|
27
|
-
#include <functional>
|
|
28
|
-
#include <string>
|
|
29
|
-
|
|
30
|
-
namespace hip_impl {
|
|
31
|
-
inline void* address(hsa_executable_symbol_t x) {
|
|
32
|
-
void* r = nullptr;
|
|
33
|
-
hsa_executable_symbol_get_info(x, HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ADDRESS, &r);
|
|
34
|
-
|
|
35
|
-
return r;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
inline hsa_agent_t agent(hsa_executable_symbol_t x) {
|
|
39
|
-
hsa_agent_t r = {};
|
|
40
|
-
hsa_executable_symbol_get_info(x, HSA_EXECUTABLE_SYMBOL_INFO_AGENT, &r);
|
|
41
|
-
|
|
42
|
-
return r;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
inline std::uint32_t group_size(hsa_executable_symbol_t x) {
|
|
46
|
-
std::uint32_t r = 0u;
|
|
47
|
-
hsa_executable_symbol_get_info(x, HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_GROUP_SEGMENT_SIZE, &r);
|
|
48
|
-
|
|
49
|
-
return r;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
inline hsa_isa_t isa(hsa_agent_t x) {
|
|
53
|
-
hsa_isa_t r = {};
|
|
54
|
-
hsa_agent_iterate_isas(x,
|
|
55
|
-
[](hsa_isa_t i, void* o) {
|
|
56
|
-
*static_cast<hsa_isa_t*>(o) = i; // Pick the first.
|
|
57
|
-
|
|
58
|
-
return HSA_STATUS_INFO_BREAK;
|
|
59
|
-
},
|
|
60
|
-
&r);
|
|
61
|
-
|
|
62
|
-
return r;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
inline std::uint64_t kernel_object(hsa_executable_symbol_t x) {
|
|
66
|
-
std::uint64_t r = 0u;
|
|
67
|
-
hsa_executable_symbol_get_info(x, HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_OBJECT, &r);
|
|
68
|
-
|
|
69
|
-
return r;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
inline std::string name(hsa_executable_symbol_t x) {
|
|
73
|
-
std::uint32_t sz = 0u;
|
|
74
|
-
hsa_executable_symbol_get_info(x, HSA_EXECUTABLE_SYMBOL_INFO_NAME_LENGTH, &sz);
|
|
75
|
-
|
|
76
|
-
std::string r(sz, '\0');
|
|
77
|
-
hsa_executable_symbol_get_info(x, HSA_EXECUTABLE_SYMBOL_INFO_NAME, &r.front());
|
|
78
|
-
|
|
79
|
-
return r;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
inline std::uint32_t private_size(hsa_executable_symbol_t x) {
|
|
83
|
-
std::uint32_t r = 0u;
|
|
84
|
-
hsa_executable_symbol_get_info(x, HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_PRIVATE_SEGMENT_SIZE, &r);
|
|
85
|
-
|
|
86
|
-
return r;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
inline std::uint32_t size(hsa_executable_symbol_t x) {
|
|
90
|
-
std::uint32_t r = 0;
|
|
91
|
-
hsa_executable_symbol_get_info(x, HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_SIZE, &r);
|
|
92
|
-
|
|
93
|
-
return r;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
inline hsa_symbol_kind_t type(hsa_executable_symbol_t x) {
|
|
97
|
-
hsa_symbol_kind_t r = {};
|
|
98
|
-
hsa_executable_symbol_get_info(x, HSA_EXECUTABLE_SYMBOL_INFO_TYPE, &r);
|
|
99
|
-
|
|
100
|
-
return r;
|
|
101
|
-
}
|
|
102
|
-
} // namespace hip_impl
|