triton-windows 3.3.0.post19__cp310-cp310-win_amd64.whl → 3.4.0.post20__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of triton-windows might be problematic. Click here for more details.
- triton/_C/libtriton.pyd +0 -0
- triton/__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,101 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
|
|
3
|
-
|
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
in the Software without restriction, including without limitation the rights
|
|
7
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
furnished to do so, subject to the following conditions:
|
|
10
|
-
|
|
11
|
-
The above copyright notice and this permission notice shall be included in
|
|
12
|
-
all copies or substantial portions of the Software.
|
|
13
|
-
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
-
THE SOFTWARE.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
#pragma once
|
|
24
|
-
|
|
25
|
-
// abort
|
|
26
|
-
extern "C" __device__ inline __attribute__((weak))
|
|
27
|
-
void abort() {
|
|
28
|
-
__builtin_trap();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// The noinline attribute helps encapsulate the printf expansion,
|
|
32
|
-
// which otherwise has a performance impact just by increasing the
|
|
33
|
-
// size of the calling function. Additionally, the weak attribute
|
|
34
|
-
// allows the function to exist as a global although its definition is
|
|
35
|
-
// included in every compilation unit.
|
|
36
|
-
#if defined(_WIN32) || defined(_WIN64)
|
|
37
|
-
extern "C" __device__ __attribute__((noinline)) __attribute__((weak))
|
|
38
|
-
void _wassert(const wchar_t *_msg, const wchar_t *_file, unsigned _line) {
|
|
39
|
-
// FIXME: Need `wchar_t` support to generate assertion message.
|
|
40
|
-
__builtin_trap();
|
|
41
|
-
}
|
|
42
|
-
#else /* defined(_WIN32) || defined(_WIN64) */
|
|
43
|
-
extern "C" __device__ __attribute__((noinline)) __attribute__((weak))
|
|
44
|
-
void __assert_fail(const char *assertion,
|
|
45
|
-
const char *file,
|
|
46
|
-
unsigned int line,
|
|
47
|
-
const char *function)
|
|
48
|
-
{
|
|
49
|
-
const char fmt[] = "%s:%u: %s: Device-side assertion `%s' failed.\n";
|
|
50
|
-
|
|
51
|
-
// strlen is not available as a built-in yet, so we create our own
|
|
52
|
-
// loop in a macro. With a string literal argument, the compiler
|
|
53
|
-
// usually manages to replace the loop with a constant.
|
|
54
|
-
//
|
|
55
|
-
// The macro does not check for null pointer, since all the string
|
|
56
|
-
// arguments are defined to be constant literals when called from
|
|
57
|
-
// the assert() macro.
|
|
58
|
-
//
|
|
59
|
-
// NOTE: The loop below includes the null terminator in the length
|
|
60
|
-
// as required by append_string_n().
|
|
61
|
-
#define __hip_get_string_length(LEN, STR) \
|
|
62
|
-
do { \
|
|
63
|
-
const char *tmp = STR; \
|
|
64
|
-
while (*tmp++); \
|
|
65
|
-
LEN = tmp - STR; \
|
|
66
|
-
} while (0)
|
|
67
|
-
|
|
68
|
-
auto msg = __ockl_fprintf_stderr_begin();
|
|
69
|
-
int len = 0;
|
|
70
|
-
__hip_get_string_length(len, fmt);
|
|
71
|
-
msg = __ockl_fprintf_append_string_n(msg, fmt, len, 0);
|
|
72
|
-
__hip_get_string_length(len, file);
|
|
73
|
-
msg = __ockl_fprintf_append_string_n(msg, file, len, 0);
|
|
74
|
-
msg = __ockl_fprintf_append_args(msg, 1, line, 0, 0, 0, 0, 0, 0, 0);
|
|
75
|
-
__hip_get_string_length(len, function);
|
|
76
|
-
msg = __ockl_fprintf_append_string_n(msg, function, len, 0);
|
|
77
|
-
__hip_get_string_length(len, assertion);
|
|
78
|
-
__ockl_fprintf_append_string_n(msg, assertion, len, /* is_last = */ 1);
|
|
79
|
-
|
|
80
|
-
#undef __hip_get_string_length
|
|
81
|
-
|
|
82
|
-
__builtin_trap();
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
extern "C" __device__ __attribute__((noinline)) __attribute__((weak))
|
|
86
|
-
void __assertfail()
|
|
87
|
-
{
|
|
88
|
-
// ignore all the args for now.
|
|
89
|
-
__builtin_trap();
|
|
90
|
-
}
|
|
91
|
-
#endif /* defined(_WIN32) || defined(_WIN64) */
|
|
92
|
-
|
|
93
|
-
#if defined(NDEBUG)
|
|
94
|
-
#define __hip_assert(COND)
|
|
95
|
-
#else
|
|
96
|
-
#define __hip_assert(COND) \
|
|
97
|
-
do { \
|
|
98
|
-
if (!(COND)) \
|
|
99
|
-
__builtin_trap(); \
|
|
100
|
-
} while (0)
|
|
101
|
-
#endif
|
|
@@ -1,242 +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
|
-
/**
|
|
24
|
-
* @file amd_detail/hip_cooperative_groups_helper.h
|
|
25
|
-
*
|
|
26
|
-
* @brief Device side implementation of cooperative group feature.
|
|
27
|
-
*
|
|
28
|
-
* Defines helper constructs and APIs which aid the types and device API
|
|
29
|
-
* wrappers defined within `amd_detail/hip_cooperative_groups.h`.
|
|
30
|
-
*/
|
|
31
|
-
#ifndef HIP_INCLUDE_HIP_AMD_DETAIL_HIP_COOPERATIVE_GROUPS_HELPER_H
|
|
32
|
-
#define HIP_INCLUDE_HIP_AMD_DETAIL_HIP_COOPERATIVE_GROUPS_HELPER_H
|
|
33
|
-
|
|
34
|
-
#if __cplusplus
|
|
35
|
-
#if !defined(__HIPCC_RTC__)
|
|
36
|
-
#include <hip/amd_detail/amd_hip_runtime.h> // threadId, blockId
|
|
37
|
-
#include <hip/amd_detail/amd_device_functions.h>
|
|
38
|
-
#endif
|
|
39
|
-
#if !defined(__align__)
|
|
40
|
-
#define __align__(x) __attribute__((aligned(x)))
|
|
41
|
-
#endif
|
|
42
|
-
|
|
43
|
-
#if !defined(__CG_QUALIFIER__)
|
|
44
|
-
#define __CG_QUALIFIER__ __device__ __forceinline__
|
|
45
|
-
#endif
|
|
46
|
-
|
|
47
|
-
#if !defined(__CG_STATIC_QUALIFIER__)
|
|
48
|
-
#define __CG_STATIC_QUALIFIER__ __device__ static __forceinline__
|
|
49
|
-
#endif
|
|
50
|
-
|
|
51
|
-
#if !defined(_CG_STATIC_CONST_DECL_)
|
|
52
|
-
#define _CG_STATIC_CONST_DECL_ static constexpr
|
|
53
|
-
#endif
|
|
54
|
-
|
|
55
|
-
#if __AMDGCN_WAVEFRONT_SIZE == 32
|
|
56
|
-
using lane_mask = unsigned int;
|
|
57
|
-
#else
|
|
58
|
-
using lane_mask = unsigned long long int;
|
|
59
|
-
#endif
|
|
60
|
-
|
|
61
|
-
namespace cooperative_groups {
|
|
62
|
-
|
|
63
|
-
/* Global scope */
|
|
64
|
-
template <unsigned int size>
|
|
65
|
-
using is_power_of_2 = std::integral_constant<bool, (size & (size - 1)) == 0>;
|
|
66
|
-
|
|
67
|
-
template <unsigned int size>
|
|
68
|
-
using is_valid_wavefront = std::integral_constant<bool, (size <= __AMDGCN_WAVEFRONT_SIZE)>;
|
|
69
|
-
|
|
70
|
-
template <unsigned int size>
|
|
71
|
-
using is_valid_tile_size =
|
|
72
|
-
std::integral_constant<bool, is_power_of_2<size>::value && is_valid_wavefront<size>::value>;
|
|
73
|
-
|
|
74
|
-
template <typename T>
|
|
75
|
-
using is_valid_type =
|
|
76
|
-
std::integral_constant<bool, std::is_integral<T>::value || std::is_floating_point<T>::value>;
|
|
77
|
-
|
|
78
|
-
namespace internal {
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* @brief Enums representing different cooperative group types
|
|
82
|
-
* @note This enum is only applicable on Linux.
|
|
83
|
-
*
|
|
84
|
-
*/
|
|
85
|
-
typedef enum {
|
|
86
|
-
cg_invalid,
|
|
87
|
-
cg_multi_grid,
|
|
88
|
-
cg_grid,
|
|
89
|
-
cg_workgroup,
|
|
90
|
-
cg_tiled_group,
|
|
91
|
-
cg_coalesced_group
|
|
92
|
-
} group_type;
|
|
93
|
-
/**
|
|
94
|
-
* @ingroup CooperativeG
|
|
95
|
-
* @{
|
|
96
|
-
* This section describes the cooperative groups functions of HIP runtime API.
|
|
97
|
-
*
|
|
98
|
-
* The cooperative groups provides flexible thread parallel programming algorithms, threads
|
|
99
|
-
* cooperate and share data to perform collective computations.
|
|
100
|
-
*
|
|
101
|
-
* @note Cooperative groups feature is implemented on Linux, under developement
|
|
102
|
-
* on Windows.
|
|
103
|
-
*
|
|
104
|
-
*/
|
|
105
|
-
/**
|
|
106
|
-
*
|
|
107
|
-
* @brief Functionalities related to multi-grid cooperative group type
|
|
108
|
-
* @note The following cooperative groups functions are only applicable on Linux.
|
|
109
|
-
*
|
|
110
|
-
*/
|
|
111
|
-
namespace multi_grid {
|
|
112
|
-
|
|
113
|
-
__CG_STATIC_QUALIFIER__ uint32_t num_grids() {
|
|
114
|
-
return static_cast<uint32_t>(__ockl_multi_grid_num_grids()); }
|
|
115
|
-
|
|
116
|
-
__CG_STATIC_QUALIFIER__ uint32_t grid_rank() {
|
|
117
|
-
return static_cast<uint32_t>(__ockl_multi_grid_grid_rank()); }
|
|
118
|
-
|
|
119
|
-
__CG_STATIC_QUALIFIER__ uint32_t size() { return static_cast<uint32_t>(__ockl_multi_grid_size()); }
|
|
120
|
-
|
|
121
|
-
__CG_STATIC_QUALIFIER__ uint32_t thread_rank() {
|
|
122
|
-
return static_cast<uint32_t>(__ockl_multi_grid_thread_rank()); }
|
|
123
|
-
|
|
124
|
-
__CG_STATIC_QUALIFIER__ bool is_valid() { return static_cast<bool>(__ockl_multi_grid_is_valid()); }
|
|
125
|
-
|
|
126
|
-
__CG_STATIC_QUALIFIER__ void sync() { __ockl_multi_grid_sync(); }
|
|
127
|
-
|
|
128
|
-
} // namespace multi_grid
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* @brief Functionalities related to grid cooperative group type
|
|
132
|
-
* @note The following cooperative groups functions are only applicable on Linux.
|
|
133
|
-
*/
|
|
134
|
-
namespace grid {
|
|
135
|
-
|
|
136
|
-
__CG_STATIC_QUALIFIER__ uint32_t size() {
|
|
137
|
-
return static_cast<uint32_t>((blockDim.z * gridDim.z) * (blockDim.y * gridDim.y) *
|
|
138
|
-
(blockDim.x * gridDim.x));
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
__CG_STATIC_QUALIFIER__ uint32_t thread_rank() {
|
|
142
|
-
// Compute global id of the workgroup to which the current thread belongs to
|
|
143
|
-
uint32_t blkIdx = static_cast<uint32_t>((blockIdx.z * gridDim.y * gridDim.x) +
|
|
144
|
-
(blockIdx.y * gridDim.x) + (blockIdx.x));
|
|
145
|
-
|
|
146
|
-
// Compute total number of threads being passed to reach current workgroup
|
|
147
|
-
// within grid
|
|
148
|
-
uint32_t num_threads_till_current_workgroup =
|
|
149
|
-
static_cast<uint32_t>(blkIdx * (blockDim.x * blockDim.y * blockDim.z));
|
|
150
|
-
|
|
151
|
-
// Compute thread local rank within current workgroup
|
|
152
|
-
uint32_t local_thread_rank = static_cast<uint32_t>((threadIdx.z * blockDim.y * blockDim.x) +
|
|
153
|
-
(threadIdx.y * blockDim.x) + (threadIdx.x));
|
|
154
|
-
|
|
155
|
-
return (num_threads_till_current_workgroup + local_thread_rank);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
__CG_STATIC_QUALIFIER__ bool is_valid() { return static_cast<bool>(__ockl_grid_is_valid()); }
|
|
159
|
-
|
|
160
|
-
__CG_STATIC_QUALIFIER__ void sync() { __ockl_grid_sync(); }
|
|
161
|
-
|
|
162
|
-
} // namespace grid
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* @brief Functionalities related to `workgroup` (thread_block in CUDA terminology)
|
|
166
|
-
* cooperative group type
|
|
167
|
-
* @note The following cooperative groups functions are only applicable on Linux.
|
|
168
|
-
*/
|
|
169
|
-
namespace workgroup {
|
|
170
|
-
|
|
171
|
-
__CG_STATIC_QUALIFIER__ dim3 group_index() {
|
|
172
|
-
return (dim3(static_cast<uint32_t>(blockIdx.x), static_cast<uint32_t>(blockIdx.y),
|
|
173
|
-
static_cast<uint32_t>(blockIdx.z)));
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
__CG_STATIC_QUALIFIER__ dim3 thread_index() {
|
|
177
|
-
return (dim3(static_cast<uint32_t>(threadIdx.x), static_cast<uint32_t>(threadIdx.y),
|
|
178
|
-
static_cast<uint32_t>(threadIdx.z)));
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
__CG_STATIC_QUALIFIER__ uint32_t size() {
|
|
182
|
-
return (static_cast<uint32_t>(blockDim.x * blockDim.y * blockDim.z));
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
__CG_STATIC_QUALIFIER__ uint32_t thread_rank() {
|
|
186
|
-
return (static_cast<uint32_t>((threadIdx.z * blockDim.y * blockDim.x) +
|
|
187
|
-
(threadIdx.y * blockDim.x) + (threadIdx.x)));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
__CG_STATIC_QUALIFIER__ bool is_valid() {
|
|
191
|
-
return true;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
__CG_STATIC_QUALIFIER__ void sync() { __syncthreads(); }
|
|
195
|
-
|
|
196
|
-
__CG_STATIC_QUALIFIER__ dim3 block_dim() {
|
|
197
|
-
return (dim3(static_cast<uint32_t>(blockDim.x), static_cast<uint32_t>(blockDim.y),
|
|
198
|
-
static_cast<uint32_t>(blockDim.z)));
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
} // namespace workgroup
|
|
202
|
-
|
|
203
|
-
namespace tiled_group {
|
|
204
|
-
|
|
205
|
-
// enforce ordering for memory intructions
|
|
206
|
-
__CG_STATIC_QUALIFIER__ void sync() { __builtin_amdgcn_fence(__ATOMIC_ACQ_REL, "agent"); }
|
|
207
|
-
|
|
208
|
-
} // namespace tiled_group
|
|
209
|
-
|
|
210
|
-
namespace coalesced_group {
|
|
211
|
-
|
|
212
|
-
// enforce ordering for memory intructions
|
|
213
|
-
__CG_STATIC_QUALIFIER__ void sync() { __builtin_amdgcn_fence(__ATOMIC_ACQ_REL, "agent"); }
|
|
214
|
-
|
|
215
|
-
// Masked bit count
|
|
216
|
-
//
|
|
217
|
-
// For each thread, this function returns the number of active threads which
|
|
218
|
-
// have i-th bit of x set and come before the current thread.
|
|
219
|
-
__CG_STATIC_QUALIFIER__ unsigned int masked_bit_count(lane_mask x, unsigned int add = 0) {
|
|
220
|
-
unsigned int counter=0;
|
|
221
|
-
#if __AMDGCN_WAVEFRONT_SIZE == 32
|
|
222
|
-
counter = __builtin_amdgcn_mbcnt_lo(x, add);
|
|
223
|
-
#else
|
|
224
|
-
counter = __builtin_amdgcn_mbcnt_lo(static_cast<lane_mask>(x), add);
|
|
225
|
-
counter = __builtin_amdgcn_mbcnt_hi(static_cast<lane_mask>(x >> 32), counter);
|
|
226
|
-
#endif
|
|
227
|
-
|
|
228
|
-
return counter;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
} // namespace coalesced_group
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
} // namespace internal
|
|
235
|
-
|
|
236
|
-
} // namespace cooperative_groups
|
|
237
|
-
/**
|
|
238
|
-
* @}
|
|
239
|
-
*/
|
|
240
|
-
|
|
241
|
-
#endif // __cplusplus
|
|
242
|
-
#endif // HIP_INCLUDE_HIP_AMD_DETAIL_HIP_COOPERATIVE_GROUPS_HELPER_H
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#if defined(__cplusplus)
|
|
4
|
-
#include <cstring>
|
|
5
|
-
#endif
|
|
6
|
-
|
|
7
|
-
struct __half_raw {
|
|
8
|
-
unsigned short x;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
struct __half2_raw {
|
|
12
|
-
unsigned short x;
|
|
13
|
-
unsigned short y;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
#if defined(__cplusplus)
|
|
17
|
-
struct __half;
|
|
18
|
-
|
|
19
|
-
__half __float2half(float);
|
|
20
|
-
float __half2float(__half);
|
|
21
|
-
|
|
22
|
-
// BEGIN STRUCT __HALF
|
|
23
|
-
struct __half {
|
|
24
|
-
protected:
|
|
25
|
-
unsigned short __x;
|
|
26
|
-
public:
|
|
27
|
-
// CREATORS
|
|
28
|
-
__half() = default;
|
|
29
|
-
__half(const __half_raw& x) : __x{x.x} {}
|
|
30
|
-
#if !defined(__HIP_NO_HALF_CONVERSIONS__)
|
|
31
|
-
__half(float x) : __x{__float2half(x).__x} {}
|
|
32
|
-
__half(double x) : __x{__float2half(x).__x} {}
|
|
33
|
-
#endif
|
|
34
|
-
__half(const __half&) = default;
|
|
35
|
-
__half(__half&&) = default;
|
|
36
|
-
~__half() = default;
|
|
37
|
-
|
|
38
|
-
// MANIPULATORS
|
|
39
|
-
__half& operator=(const __half&) = default;
|
|
40
|
-
__half& operator=(__half&&) = default;
|
|
41
|
-
__half& operator=(const __half_raw& x) { __x = x.x; return *this; }
|
|
42
|
-
#if !defined(__HIP_NO_HALF_CONVERSIONS__)
|
|
43
|
-
__half& operator=(float x)
|
|
44
|
-
{
|
|
45
|
-
__x = __float2half(x).__x;
|
|
46
|
-
return *this;
|
|
47
|
-
}
|
|
48
|
-
__half& operator=(double x)
|
|
49
|
-
{
|
|
50
|
-
return *this = static_cast<float>(x);
|
|
51
|
-
}
|
|
52
|
-
#endif
|
|
53
|
-
|
|
54
|
-
// ACCESSORS
|
|
55
|
-
operator float() const { return __half2float(*this); }
|
|
56
|
-
operator __half_raw() const { return __half_raw{__x}; }
|
|
57
|
-
};
|
|
58
|
-
// END STRUCT __HALF
|
|
59
|
-
|
|
60
|
-
// BEGIN STRUCT __HALF2
|
|
61
|
-
struct __half2 {
|
|
62
|
-
public:
|
|
63
|
-
__half x;
|
|
64
|
-
__half y;
|
|
65
|
-
|
|
66
|
-
// CREATORS
|
|
67
|
-
__half2() = default;
|
|
68
|
-
__half2(const __half2_raw& ix)
|
|
69
|
-
:
|
|
70
|
-
x{reinterpret_cast<const __half&>(ix.x)},
|
|
71
|
-
y{reinterpret_cast<const __half&>(ix.y)}
|
|
72
|
-
{}
|
|
73
|
-
__half2(const __half& ix, const __half& iy) : x{ix}, y{iy} {}
|
|
74
|
-
__half2(const __half2&) = default;
|
|
75
|
-
__half2(__half2&&) = default;
|
|
76
|
-
~__half2() = default;
|
|
77
|
-
|
|
78
|
-
// MANIPULATORS
|
|
79
|
-
__half2& operator=(const __half2&) = default;
|
|
80
|
-
__half2& operator=(__half2&&) = default;
|
|
81
|
-
__half2& operator=(const __half2_raw& ix)
|
|
82
|
-
{
|
|
83
|
-
x = reinterpret_cast<const __half_raw&>(ix.x);
|
|
84
|
-
y = reinterpret_cast<const __half_raw&>(ix.y);
|
|
85
|
-
return *this;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// ACCESSORS
|
|
89
|
-
operator __half2_raw() const
|
|
90
|
-
{
|
|
91
|
-
return __half2_raw{
|
|
92
|
-
reinterpret_cast<const unsigned short&>(x),
|
|
93
|
-
reinterpret_cast<const unsigned short&>(y)};
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
// END STRUCT __HALF2
|
|
97
|
-
|
|
98
|
-
inline
|
|
99
|
-
unsigned short __internal_float2half(
|
|
100
|
-
float flt, unsigned int& sgn, unsigned int& rem)
|
|
101
|
-
{
|
|
102
|
-
unsigned int x{};
|
|
103
|
-
std::memcpy(&x, &flt, sizeof(flt));
|
|
104
|
-
|
|
105
|
-
unsigned int u = (x & 0x7fffffffU);
|
|
106
|
-
sgn = ((x >> 16) & 0x8000U);
|
|
107
|
-
|
|
108
|
-
// NaN/+Inf/-Inf
|
|
109
|
-
if (u >= 0x7f800000U) {
|
|
110
|
-
rem = 0;
|
|
111
|
-
return static_cast<unsigned short>(
|
|
112
|
-
(u == 0x7f800000U) ? (sgn | 0x7c00U) : 0x7fffU);
|
|
113
|
-
}
|
|
114
|
-
// Overflows
|
|
115
|
-
if (u > 0x477fefffU) {
|
|
116
|
-
rem = 0x80000000U;
|
|
117
|
-
return static_cast<unsigned short>(sgn | 0x7bffU);
|
|
118
|
-
}
|
|
119
|
-
// Normal numbers
|
|
120
|
-
if (u >= 0x38800000U) {
|
|
121
|
-
rem = u << 19;
|
|
122
|
-
u -= 0x38000000U;
|
|
123
|
-
return static_cast<unsigned short>(sgn | (u >> 13));
|
|
124
|
-
}
|
|
125
|
-
// +0/-0
|
|
126
|
-
if (u < 0x33000001U) {
|
|
127
|
-
rem = u;
|
|
128
|
-
return static_cast<unsigned short>(sgn);
|
|
129
|
-
}
|
|
130
|
-
// Denormal numbers
|
|
131
|
-
unsigned int exponent = u >> 23;
|
|
132
|
-
unsigned int mantissa = (u & 0x7fffffU);
|
|
133
|
-
unsigned int shift = 0x7eU - exponent;
|
|
134
|
-
mantissa |= 0x800000U;
|
|
135
|
-
rem = mantissa << (32 - shift);
|
|
136
|
-
return static_cast<unsigned short>(sgn | (mantissa >> shift));
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
inline
|
|
140
|
-
__half __float2half(float x)
|
|
141
|
-
{
|
|
142
|
-
__half_raw r;
|
|
143
|
-
unsigned int sgn{};
|
|
144
|
-
unsigned int rem{};
|
|
145
|
-
r.x = __internal_float2half(x, sgn, rem);
|
|
146
|
-
if (rem > 0x80000000U || (rem == 0x80000000U && (r.x & 0x1))) ++r.x;
|
|
147
|
-
|
|
148
|
-
return r;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
inline
|
|
152
|
-
__half __float2half_rn(float x) { return __float2half(x); }
|
|
153
|
-
|
|
154
|
-
inline
|
|
155
|
-
__half __float2half_rz(float x)
|
|
156
|
-
{
|
|
157
|
-
__half_raw r;
|
|
158
|
-
unsigned int sgn{};
|
|
159
|
-
unsigned int rem{};
|
|
160
|
-
r.x = __internal_float2half(x, sgn, rem);
|
|
161
|
-
|
|
162
|
-
return r;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
inline
|
|
166
|
-
__half __float2half_rd(float x)
|
|
167
|
-
{
|
|
168
|
-
__half_raw r;
|
|
169
|
-
unsigned int sgn{};
|
|
170
|
-
unsigned int rem{};
|
|
171
|
-
r.x = __internal_float2half(x, sgn, rem);
|
|
172
|
-
if (rem && sgn) ++r.x;
|
|
173
|
-
|
|
174
|
-
return r;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
inline
|
|
178
|
-
__half __float2half_ru(float x)
|
|
179
|
-
{
|
|
180
|
-
__half_raw r;
|
|
181
|
-
unsigned int sgn{};
|
|
182
|
-
unsigned int rem{};
|
|
183
|
-
r.x = __internal_float2half(x, sgn, rem);
|
|
184
|
-
if (rem && !sgn) ++r.x;
|
|
185
|
-
|
|
186
|
-
return r;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
inline
|
|
190
|
-
__half2 __float2half2_rn(float x)
|
|
191
|
-
{
|
|
192
|
-
return __half2{__float2half_rn(x), __float2half_rn(x)};
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
inline
|
|
196
|
-
__half2 __floats2half2_rn(float x, float y)
|
|
197
|
-
{
|
|
198
|
-
return __half2{__float2half_rn(x), __float2half_rn(y)};
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
inline
|
|
202
|
-
float __internal_half2float(unsigned short x)
|
|
203
|
-
{
|
|
204
|
-
unsigned int sign = ((x >> 15) & 1);
|
|
205
|
-
unsigned int exponent = ((x >> 10) & 0x1f);
|
|
206
|
-
unsigned int mantissa = ((x & 0x3ff) << 13);
|
|
207
|
-
|
|
208
|
-
if (exponent == 0x1fU) { /* NaN or Inf */
|
|
209
|
-
mantissa = (mantissa ? (sign = 0, 0x7fffffU) : 0);
|
|
210
|
-
exponent = 0xffU;
|
|
211
|
-
} else if (!exponent) { /* Denorm or Zero */
|
|
212
|
-
if (mantissa) {
|
|
213
|
-
unsigned int msb;
|
|
214
|
-
exponent = 0x71U;
|
|
215
|
-
do {
|
|
216
|
-
msb = (mantissa & 0x400000U);
|
|
217
|
-
mantissa <<= 1; /* normalize */
|
|
218
|
-
--exponent;
|
|
219
|
-
} while (!msb);
|
|
220
|
-
mantissa &= 0x7fffffU; /* 1.mantissa is implicit */
|
|
221
|
-
}
|
|
222
|
-
} else {
|
|
223
|
-
exponent += 0x70U;
|
|
224
|
-
}
|
|
225
|
-
unsigned int u = ((sign << 31) | (exponent << 23) | mantissa);
|
|
226
|
-
float f;
|
|
227
|
-
memcpy(&f, &u, sizeof(u));
|
|
228
|
-
|
|
229
|
-
return f;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
inline
|
|
233
|
-
float __half2float(__half x)
|
|
234
|
-
{
|
|
235
|
-
return __internal_half2float(static_cast<__half_raw>(x).x);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
inline
|
|
239
|
-
float __low2float(__half2 x)
|
|
240
|
-
{
|
|
241
|
-
return __internal_half2float(static_cast<__half2_raw>(x).x);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
inline
|
|
245
|
-
float __high2float(__half2 x)
|
|
246
|
-
{
|
|
247
|
-
return __internal_half2float(static_cast<__half2_raw>(x).y);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
#if !defined(HIP_NO_HALF)
|
|
251
|
-
using half = __half;
|
|
252
|
-
using half2 = __half2;
|
|
253
|
-
#endif
|
|
254
|
-
#endif // defined(__cplusplus)
|
|
@@ -1,96 +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
|
-
// /*
|
|
26
|
-
// Half Math Functions
|
|
27
|
-
// */
|
|
28
|
-
#if !defined(__HIPCC_RTC__)
|
|
29
|
-
#include "host_defines.h"
|
|
30
|
-
#endif
|
|
31
|
-
#ifndef __CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__
|
|
32
|
-
extern "C"
|
|
33
|
-
{
|
|
34
|
-
__device__ __attribute__((const)) _Float16 __ocml_ceil_f16(_Float16);
|
|
35
|
-
__device__ _Float16 __ocml_cos_f16(_Float16);
|
|
36
|
-
__device__ __attribute__((pure)) _Float16 __ocml_exp_f16(_Float16);
|
|
37
|
-
__device__ __attribute__((pure)) _Float16 __ocml_exp10_f16(_Float16);
|
|
38
|
-
__device__ __attribute__((pure)) _Float16 __ocml_exp2_f16(_Float16);
|
|
39
|
-
__device__ __attribute__((const)) _Float16 __ocml_floor_f16(_Float16);
|
|
40
|
-
__device__ __attribute__((const))
|
|
41
|
-
_Float16 __ocml_fma_f16(_Float16, _Float16, _Float16);
|
|
42
|
-
__device__ __attribute__((const)) _Float16 __ocml_fabs_f16(_Float16);
|
|
43
|
-
__device__ __attribute__((const)) int __ocml_isinf_f16(_Float16);
|
|
44
|
-
__device__ __attribute__((const)) int __ocml_isnan_f16(_Float16);
|
|
45
|
-
__device__ __attribute__((pure)) _Float16 __ocml_log_f16(_Float16);
|
|
46
|
-
__device__ __attribute__((pure)) _Float16 __ocml_log10_f16(_Float16);
|
|
47
|
-
__device__ __attribute__((pure)) _Float16 __ocml_log2_f16(_Float16);
|
|
48
|
-
__device__ __attribute__((pure)) _Float16 __ocml_pown_f16(_Float16, int);
|
|
49
|
-
__device__ __attribute__((const)) _Float16 __ocml_rint_f16(_Float16);
|
|
50
|
-
__device__ __attribute__((const)) _Float16 __ocml_rsqrt_f16(_Float16);
|
|
51
|
-
__device__ _Float16 __ocml_sin_f16(_Float16);
|
|
52
|
-
__device__ __attribute__((const)) _Float16 __ocml_sqrt_f16(_Float16);
|
|
53
|
-
__device__ __attribute__((const)) _Float16 __ocml_trunc_f16(_Float16);
|
|
54
|
-
__device__ __attribute__((const)) _Float16 __ocml_fmax_f16(_Float16, _Float16);
|
|
55
|
-
__device__ __attribute__((const)) _Float16 __ocml_fmin_f16(_Float16, _Float16);
|
|
56
|
-
|
|
57
|
-
typedef _Float16 __2f16 __attribute__((ext_vector_type(2)));
|
|
58
|
-
typedef short __2i16 __attribute__((ext_vector_type(2)));
|
|
59
|
-
|
|
60
|
-
#if defined(__clang__) && defined(__HIP__)
|
|
61
|
-
__device__ __attribute__((const)) float __ockl_fdot2(__2f16 a, __2f16 b, float c, bool s);
|
|
62
|
-
#endif
|
|
63
|
-
|
|
64
|
-
__device__ __attribute__((const)) __2f16 __ocml_ceil_2f16(__2f16);
|
|
65
|
-
__device__ __attribute__((const)) __2f16 __ocml_fabs_2f16(__2f16);
|
|
66
|
-
__device__ __2f16 __ocml_cos_2f16(__2f16);
|
|
67
|
-
__device__ __attribute__((pure)) __2f16 __ocml_exp_2f16(__2f16);
|
|
68
|
-
__device__ __attribute__((pure)) __2f16 __ocml_exp10_2f16(__2f16);
|
|
69
|
-
__device__ __attribute__((pure)) __2f16 __ocml_exp2_2f16(__2f16);
|
|
70
|
-
__device__ __attribute__((const)) __2f16 __ocml_floor_2f16(__2f16);
|
|
71
|
-
__device__ __attribute__((const)) __2f16 __ocml_fma_2f16(__2f16, __2f16, __2f16);
|
|
72
|
-
__device__ __attribute__((const)) __2i16 __ocml_isinf_2f16(__2f16);
|
|
73
|
-
__device__ __attribute__((const)) __2i16 __ocml_isnan_2f16(__2f16);
|
|
74
|
-
__device__ __attribute__((pure)) __2f16 __ocml_log_2f16(__2f16);
|
|
75
|
-
__device__ __attribute__((pure)) __2f16 __ocml_log10_2f16(__2f16);
|
|
76
|
-
__device__ __attribute__((pure)) __2f16 __ocml_log2_2f16(__2f16);
|
|
77
|
-
__device__ __attribute__((const)) __2f16 __ocml_rint_2f16(__2f16);
|
|
78
|
-
__device__ __attribute__((const)) __2f16 __ocml_rsqrt_2f16(__2f16);
|
|
79
|
-
__device__ __2f16 __ocml_sin_2f16(__2f16);
|
|
80
|
-
__device__ __attribute__((const)) __2f16 __ocml_sqrt_2f16(__2f16);
|
|
81
|
-
__device__ __attribute__((const)) __2f16 __ocml_trunc_2f16(__2f16);
|
|
82
|
-
|
|
83
|
-
__device__ __attribute__((const)) _Float16 __ocml_cvtrtn_f16_f32(float);
|
|
84
|
-
__device__ __attribute__((const)) _Float16 __ocml_cvtrtp_f16_f32(float);
|
|
85
|
-
__device__ __attribute__((const)) _Float16 __ocml_cvtrtz_f16_f32(float);
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
#endif // !__CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__
|
|
89
|
-
//TODO: remove these after they get into clang header __clang_hip_libdevice_declares.h'
|
|
90
|
-
extern "C" {
|
|
91
|
-
__device__ __attribute__((const)) _Float16 __ocml_fmax_f16(_Float16, _Float16);
|
|
92
|
-
__device__ __attribute__((const)) _Float16 __ocml_fmin_f16(_Float16, _Float16);
|
|
93
|
-
__device__ __attribute__((const)) _Float16 __ocml_cvtrtn_f16_f32(float);
|
|
94
|
-
__device__ __attribute__((const)) _Float16 __ocml_cvtrtp_f16_f32(float);
|
|
95
|
-
__device__ __attribute__((const)) _Float16 __ocml_cvtrtz_f16_f32(float);
|
|
96
|
-
}
|