triton-windows 3.3.0.post19__cp312-cp312-win_amd64.whl → 3.3.1.post21__cp312-cp312-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of triton-windows might be problematic. Click here for more details.

Files changed (116) hide show
  1. triton/_C/libtriton.pyd +0 -0
  2. triton/__init__.py +1 -1
  3. triton/backends/amd/driver.py +6 -1
  4. triton/backends/nvidia/compiler.py +1 -3
  5. triton/backends/nvidia/driver.py +7 -3
  6. triton/runtime/autotuner.py +2 -2
  7. triton/runtime/build.py +5 -5
  8. triton/runtime/tcc/lib/python310.def +1610 -0
  9. triton/runtime/tcc/lib/python311.def +1633 -0
  10. triton/runtime/tcc/lib/python312.def +1703 -0
  11. triton/runtime/tcc/lib/python313.def +1651 -0
  12. triton/runtime/tcc/lib/python313t.def +1656 -0
  13. triton/runtime/tcc/lib/python39.def +1644 -0
  14. triton/runtime/tcc/lib/python3t.def +905 -0
  15. triton/windows_utils.py +11 -4
  16. {triton_windows-3.3.0.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/METADATA +1 -1
  17. {triton_windows-3.3.0.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/RECORD +19 -109
  18. {triton_windows-3.3.0.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/WHEEL +1 -1
  19. triton/backends/amd/include/hip/amd_detail/amd_channel_descriptor.h +0 -358
  20. triton/backends/amd/include/hip/amd_detail/amd_device_functions.h +0 -1010
  21. triton/backends/amd/include/hip/amd_detail/amd_hip_atomic.h +0 -1638
  22. triton/backends/amd/include/hip/amd_detail/amd_hip_bf16.h +0 -1814
  23. triton/backends/amd/include/hip/amd_detail/amd_hip_bfloat16.h +0 -293
  24. triton/backends/amd/include/hip/amd_detail/amd_hip_common.h +0 -32
  25. triton/backends/amd/include/hip/amd_detail/amd_hip_complex.h +0 -174
  26. triton/backends/amd/include/hip/amd_detail/amd_hip_cooperative_groups.h +0 -835
  27. triton/backends/amd/include/hip/amd_detail/amd_hip_fp16.h +0 -1809
  28. triton/backends/amd/include/hip/amd_detail/amd_hip_fp8.h +0 -1391
  29. triton/backends/amd/include/hip/amd_detail/amd_hip_gl_interop.h +0 -108
  30. triton/backends/amd/include/hip/amd_detail/amd_hip_math_constants.h +0 -124
  31. triton/backends/amd/include/hip/amd_detail/amd_hip_runtime.h +0 -405
  32. triton/backends/amd/include/hip/amd_detail/amd_hip_runtime_pt_api.h +0 -196
  33. triton/backends/amd/include/hip/amd_detail/amd_hip_unsafe_atomics.h +0 -565
  34. triton/backends/amd/include/hip/amd_detail/amd_hip_vector_types.h +0 -2226
  35. triton/backends/amd/include/hip/amd_detail/amd_math_functions.h +0 -104
  36. triton/backends/amd/include/hip/amd_detail/amd_surface_functions.h +0 -244
  37. triton/backends/amd/include/hip/amd_detail/amd_warp_functions.h +0 -538
  38. triton/backends/amd/include/hip/amd_detail/amd_warp_sync_functions.h +0 -288
  39. triton/backends/amd/include/hip/amd_detail/concepts.hpp +0 -30
  40. triton/backends/amd/include/hip/amd_detail/device_library_decls.h +0 -133
  41. triton/backends/amd/include/hip/amd_detail/functional_grid_launch.hpp +0 -218
  42. triton/backends/amd/include/hip/amd_detail/grid_launch.h +0 -67
  43. triton/backends/amd/include/hip/amd_detail/grid_launch.hpp +0 -50
  44. triton/backends/amd/include/hip/amd_detail/grid_launch_GGL.hpp +0 -26
  45. triton/backends/amd/include/hip/amd_detail/helpers.hpp +0 -137
  46. triton/backends/amd/include/hip/amd_detail/hip_api_trace.hpp +0 -1446
  47. triton/backends/amd/include/hip/amd_detail/hip_assert.h +0 -101
  48. triton/backends/amd/include/hip/amd_detail/hip_cooperative_groups_helper.h +0 -242
  49. triton/backends/amd/include/hip/amd_detail/hip_fp16_gcc.h +0 -254
  50. triton/backends/amd/include/hip/amd_detail/hip_fp16_math_fwd.h +0 -96
  51. triton/backends/amd/include/hip/amd_detail/hip_ldg.h +0 -100
  52. triton/backends/amd/include/hip/amd_detail/hip_prof_str.h +0 -10570
  53. triton/backends/amd/include/hip/amd_detail/hip_runtime_prof.h +0 -78
  54. triton/backends/amd/include/hip/amd_detail/host_defines.h +0 -184
  55. triton/backends/amd/include/hip/amd_detail/hsa_helpers.hpp +0 -102
  56. triton/backends/amd/include/hip/amd_detail/macro_based_grid_launch.hpp +0 -798
  57. triton/backends/amd/include/hip/amd_detail/math_fwd.h +0 -698
  58. triton/backends/amd/include/hip/amd_detail/ockl_image.h +0 -177
  59. triton/backends/amd/include/hip/amd_detail/program_state.hpp +0 -107
  60. triton/backends/amd/include/hip/amd_detail/texture_fetch_functions.h +0 -491
  61. triton/backends/amd/include/hip/amd_detail/texture_indirect_functions.h +0 -478
  62. triton/backends/amd/include/hip/channel_descriptor.h +0 -39
  63. triton/backends/amd/include/hip/device_functions.h +0 -38
  64. triton/backends/amd/include/hip/driver_types.h +0 -468
  65. triton/backends/amd/include/hip/hip_bf16.h +0 -36
  66. triton/backends/amd/include/hip/hip_bfloat16.h +0 -44
  67. triton/backends/amd/include/hip/hip_common.h +0 -100
  68. triton/backends/amd/include/hip/hip_complex.h +0 -38
  69. triton/backends/amd/include/hip/hip_cooperative_groups.h +0 -46
  70. triton/backends/amd/include/hip/hip_deprecated.h +0 -95
  71. triton/backends/amd/include/hip/hip_ext.h +0 -161
  72. triton/backends/amd/include/hip/hip_fp16.h +0 -36
  73. triton/backends/amd/include/hip/hip_fp8.h +0 -33
  74. triton/backends/amd/include/hip/hip_gl_interop.h +0 -32
  75. triton/backends/amd/include/hip/hip_hcc.h +0 -24
  76. triton/backends/amd/include/hip/hip_math_constants.h +0 -36
  77. triton/backends/amd/include/hip/hip_profile.h +0 -27
  78. triton/backends/amd/include/hip/hip_runtime.h +0 -75
  79. triton/backends/amd/include/hip/hip_runtime_api.h +0 -9261
  80. triton/backends/amd/include/hip/hip_texture_types.h +0 -29
  81. triton/backends/amd/include/hip/hip_vector_types.h +0 -41
  82. triton/backends/amd/include/hip/hip_version.h +0 -17
  83. triton/backends/amd/include/hip/hiprtc.h +0 -421
  84. triton/backends/amd/include/hip/library_types.h +0 -78
  85. triton/backends/amd/include/hip/math_functions.h +0 -42
  86. triton/backends/amd/include/hip/surface_types.h +0 -63
  87. triton/backends/amd/include/hip/texture_types.h +0 -194
  88. triton/backends/amd/include/hsa/Brig.h +0 -1131
  89. triton/backends/amd/include/hsa/amd_hsa_common.h +0 -91
  90. triton/backends/amd/include/hsa/amd_hsa_elf.h +0 -462
  91. triton/backends/amd/include/hsa/amd_hsa_kernel_code.h +0 -269
  92. triton/backends/amd/include/hsa/amd_hsa_queue.h +0 -109
  93. triton/backends/amd/include/hsa/amd_hsa_signal.h +0 -80
  94. triton/backends/amd/include/hsa/hsa.h +0 -5738
  95. triton/backends/amd/include/hsa/hsa_amd_tool.h +0 -91
  96. triton/backends/amd/include/hsa/hsa_api_trace.h +0 -579
  97. triton/backends/amd/include/hsa/hsa_api_trace_version.h +0 -68
  98. triton/backends/amd/include/hsa/hsa_ext_amd.h +0 -3146
  99. triton/backends/amd/include/hsa/hsa_ext_finalize.h +0 -531
  100. triton/backends/amd/include/hsa/hsa_ext_image.h +0 -1454
  101. triton/backends/amd/include/hsa/hsa_ven_amd_aqlprofile.h +0 -488
  102. triton/backends/amd/include/hsa/hsa_ven_amd_loader.h +0 -667
  103. triton/backends/amd/include/hsa/hsa_ven_amd_pc_sampling.h +0 -416
  104. triton/backends/amd/include/roctracer/ext/prof_protocol.h +0 -107
  105. triton/backends/amd/include/roctracer/hip_ostream_ops.h +0 -4515
  106. triton/backends/amd/include/roctracer/hsa_ostream_ops.h +0 -1727
  107. triton/backends/amd/include/roctracer/hsa_prof_str.h +0 -3059
  108. triton/backends/amd/include/roctracer/roctracer.h +0 -779
  109. triton/backends/amd/include/roctracer/roctracer_ext.h +0 -81
  110. triton/backends/amd/include/roctracer/roctracer_hcc.h +0 -24
  111. triton/backends/amd/include/roctracer/roctracer_hip.h +0 -37
  112. triton/backends/amd/include/roctracer/roctracer_hsa.h +0 -112
  113. triton/backends/amd/include/roctracer/roctracer_plugin.h +0 -137
  114. triton/backends/amd/include/roctracer/roctracer_roctx.h +0 -67
  115. triton/backends/amd/include/roctracer/roctx.h +0 -229
  116. {triton_windows-3.3.0.post19.dist-info → triton_windows-3.3.1.post21.dist-info}/top_level.txt +0 -0
@@ -1,81 +0,0 @@
1
- /* Copyright (c) 2018-2022 Advanced Micro Devices, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE. */
20
-
21
- ////////////////////////////////////////////////////////////////////////////////
22
- //
23
- // ROC Tracer Extension API
24
- //
25
- // The API provides functionality for application annotation with event and
26
- // external ranges correlation
27
- //
28
- ////////////////////////////////////////////////////////////////////////////////
29
-
30
- #ifndef ROCTRACER_EXT_H_
31
- #define ROCTRACER_EXT_H_
32
-
33
- #include "roctracer.h"
34
-
35
- /* Extension API opcodes */
36
- typedef enum {
37
- ACTIVITY_EXT_OP_MARK = 0,
38
- ACTIVITY_EXT_OP_EXTERN_ID = 1
39
- } activity_ext_op_t;
40
-
41
- typedef void (*roctracer_start_cb_t)();
42
- typedef void (*roctracer_stop_cb_t)();
43
- typedef struct {
44
- roctracer_start_cb_t start_cb;
45
- roctracer_stop_cb_t stop_cb;
46
- } roctracer_ext_properties_t;
47
-
48
- #ifdef __cplusplus
49
- extern "C" {
50
- #endif // __cplusplus
51
-
52
- ////////////////////////////////////////////////////////////////////////////////
53
- // Application annotation API
54
-
55
- // Tracing start API
56
- void ROCTRACER_API roctracer_start() ROCTRACER_VERSION_4_1;
57
-
58
- // Tracing stop API
59
- void ROCTRACER_API roctracer_stop() ROCTRACER_VERSION_4_1;
60
-
61
- ////////////////////////////////////////////////////////////////////////////////
62
- // External correlation id API
63
-
64
- // Notifies that the calling thread is entering an external API region.
65
- // Push an external correlation id for the calling thread.
66
- roctracer_status_t ROCTRACER_API
67
- roctracer_activity_push_external_correlation_id(activity_correlation_id_t id)
68
- ROCTRACER_VERSION_4_1;
69
-
70
- // Notifies that the calling thread is leaving an external API region.
71
- // Pop an external correlation id for the calling thread.
72
- // 'lastId' returns the last external correlation if not NULL
73
- roctracer_status_t ROCTRACER_API
74
- roctracer_activity_pop_external_correlation_id(
75
- activity_correlation_id_t* last_id) ROCTRACER_VERSION_4_1;
76
-
77
- #ifdef __cplusplus
78
- } // extern "C" block
79
- #endif // __cplusplus
80
-
81
- #endif // ROCTRACER_EXT_H_
@@ -1,24 +0,0 @@
1
- /* Copyright (c) 2018-2022 Advanced Micro Devices, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE. */
20
-
21
- #pragma message( \
22
- "This file has been deprecated and marked for removal. Please use roctracer_hip.h instead.")
23
-
24
- #include "roctracer_hip.h"
@@ -1,37 +0,0 @@
1
- /* Copyright (c) 2018-2022 Advanced Micro Devices, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE. */
20
-
21
- #ifndef ROCTRACER_HIP_H_
22
- #define ROCTRACER_HIP_H_
23
-
24
- #include "roctracer.h"
25
-
26
- #include <hip/hip_runtime.h>
27
- #include <hip/hip_deprecated.h>
28
- #include <hip/amd_detail/hip_prof_str.h>
29
-
30
- typedef enum {
31
- HIP_OP_ID_DISPATCH = 0,
32
- HIP_OP_ID_COPY = 1,
33
- HIP_OP_ID_BARRIER = 2,
34
- HIP_OP_ID_NUMBER = 3
35
- } hip_op_id_t;
36
-
37
- #endif // ROCTRACER_HIP_H_
@@ -1,112 +0,0 @@
1
- /* Copyright (c) 2018-2022 Advanced Micro Devices, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE. */
20
-
21
- #ifndef ROCTRACER_HSA_H_
22
- #define ROCTRACER_HSA_H_
23
-
24
- #include "roctracer.h"
25
-
26
- #include <hsa/hsa.h>
27
- #include <hsa/hsa_ext_amd.h>
28
- #include "hsa_ostream_ops.h"
29
- #include "hsa_prof_str.h"
30
-
31
- // HSA OP ID enumeration
32
- enum hsa_op_id_t {
33
- HSA_OP_ID_DISPATCH = 0,
34
- HSA_OP_ID_COPY = 1,
35
- HSA_OP_ID_BARRIER = 2,
36
- HSA_OP_ID_RESERVED1 = 3,
37
- HSA_OP_ID_NUMBER
38
- };
39
-
40
- // HSA EVT ID enumeration
41
- enum hsa_evt_id_t {
42
- HSA_EVT_ID_ALLOCATE = 0, // Memory allocate callback
43
- HSA_EVT_ID_DEVICE = 1, // Device assign callback
44
- HSA_EVT_ID_MEMCOPY = 2, // Memcopy callback
45
- HSA_EVT_ID_SUBMIT = 3, // Packet submission callback
46
- HSA_EVT_ID_KSYMBOL = 4, // Loading/unloading of kernel symbol
47
- HSA_EVT_ID_CODEOBJ = 5, // Loading/unloading of device code object
48
- HSA_EVT_ID_NUMBER
49
- };
50
-
51
- struct hsa_ops_properties_t {
52
- void* reserved1[4];
53
- };
54
-
55
- // HSA EVT data type
56
- typedef struct {
57
- union {
58
- struct {
59
- const void* ptr; // allocated area ptr
60
- size_t size; // allocated area size, zero size means 'free' callback
61
- hsa_amd_segment_t segment; // allocated area's memory segment type
62
- hsa_amd_memory_pool_global_flag_t
63
- global_flag; // allocated area's memory global flag
64
- int is_code; // equal to 1 if code is allocated
65
- } allocate;
66
-
67
- struct {
68
- hsa_device_type_t type; // type of assigned device
69
- uint32_t id; // id of assigned device
70
- hsa_agent_t agent; // device HSA agent handle
71
- const void* ptr; // ptr the device is assigned to
72
- } device;
73
-
74
- struct {
75
- const void* dst; // memcopy dst ptr
76
- const void* src; // memcopy src ptr
77
- size_t size; // memcopy size bytes
78
- } memcopy;
79
-
80
- struct {
81
- const void* packet; // submitted to GPU packet
82
- const char*
83
- kernel_name; // kernel name, NULL if not a kernel dispatch packet
84
- hsa_queue_t* queue; // HSA queue the packet was submitted to
85
- uint32_t device_type; // type of device the packet is submitted to
86
- uint32_t device_id; // id of device the packet is submitted to
87
- } submit;
88
-
89
- struct {
90
- uint64_t object; // kernel symbol object
91
- const char* name; // kernel symbol name
92
- uint32_t name_length; // kernel symbol name length
93
- int unload; // symbol executable destroy
94
- } ksymbol;
95
-
96
- struct {
97
- uint32_t storage_type; // code object storage type
98
- int storage_file; // origin file descriptor
99
- uint64_t memory_base; // origin memory base
100
- uint64_t memory_size; // origin memory size
101
- uint64_t load_base; // code object load base
102
- uint64_t load_size; // code object load size
103
- uint64_t load_delta; // code object load size
104
- uint32_t uri_length; // URI string length (not including the terminating
105
- // NUL character)
106
- const char* uri; // URI string
107
- int unload; // unload flag
108
- } codeobj;
109
- };
110
- } hsa_evt_data_t;
111
-
112
- #endif // ROCTRACER_HSA_H_
@@ -1,137 +0,0 @@
1
- /* Copyright (c) 2022 Advanced Micro Devices, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE. */
20
-
21
- /** \section roctracer_plugin_api ROCtracer Plugin API
22
- *
23
- * The ROCtracer Plugin API is used by the ROCtracer Tool to output all tracing
24
- * information. Different implementations of the ROCtracer Plugin API can be
25
- * developed that output the tracing data in different formats.
26
- * The ROCtracer Tool can be configured to load a specific library that
27
- * supports the user desired format.
28
- *
29
- * The API is not thread safe. It is the responsibility of the ROCtracer Tool
30
- * to ensure the operations are synchronized and not called concurrently. There
31
- * is no requirement for the ROCtracer Tool to report trace data in any
32
- * specific order. If the format supported by plugin requires specific
33
- * ordering, it is the responsibility of the plugin implementation to perform
34
- * any necessary sorting.
35
- */
36
-
37
- /**
38
- * \file
39
- * ROCtracer Tool Plugin API interface.
40
- */
41
-
42
- #ifndef ROCTRACER_PLUGIN_H_
43
- #define ROCTRACER_PLUGIN_H_
44
-
45
- #include "roctracer.h"
46
-
47
- #include <stdint.h>
48
-
49
- #ifdef __cplusplus
50
- extern "C" {
51
- #endif /* __cplusplus */
52
-
53
- /** \defgroup initialization_group Initialization and Finalization
54
- *
55
- * The ROCtracer Plugin API must be initialized before using any of the
56
- * operations to report trace data, and finalized after the last trace data has
57
- * been reported.
58
- *
59
- * @{
60
- */
61
-
62
- /**
63
- * Initialize plugin.
64
- *
65
- * Must be called before any other operation.
66
- *
67
- * @param[in] roctracer_major_version The major version of the ROCtracer API
68
- * being used by the ROCtracer Tool. An error is reported if this does not
69
- * match the major version of the ROCtracer API used to build the plugin
70
- * library. This ensures compatibility of the trace data format.
71
- *
72
- * @param[in] roctracer_minor_version The minor version of the ROCtracer API
73
- * being used by the ROCtracer Tool. An error is reported if the
74
- * \p roctracer_major_version matches and this is greater than the minor
75
- * version of the ROCtracer API used to build the plugin library. This ensures
76
- * compatibility of the trace data format.
77
- *
78
- * @return Returns 0 on success and -1 on error.
79
- */
80
- ROCTRACER_EXPORT int roctracer_plugin_initialize(
81
- uint32_t roctracer_major_version, uint32_t roctracer_minor_version);
82
-
83
- /**
84
- * Finalize plugin.
85
- *
86
- * This must be called after ::roctracer_plugin_initialize and after all trace
87
- * data has been reported by ::roctracer_plugin_write_callback_record and
88
- * ::roctracer_plugin_write_activity_records.
89
- */
90
- ROCTRACER_EXPORT void roctracer_plugin_finalize();
91
-
92
- /** @} */
93
-
94
- /** \defgroup trace_record_write_functions Trace data reporting
95
- *
96
- * Operations to output trace data.
97
- *
98
- * @{
99
- */
100
-
101
- /**
102
- * Report a single callback trace data.
103
- *
104
- * @param[in] record Primarily domain independent trace data.
105
- *
106
- * @param[in] callback_data Domain specific trace data. The type of this
107
- * argument depends on the values of \p record.domain.
108
- *
109
- * @return Returns 0 on success and -1 on error.
110
- */
111
- ROCTRACER_EXPORT int roctracer_plugin_write_callback_record(
112
- const roctracer_record_t* record, const void* callback_data);
113
-
114
- /**
115
- * Report a range of activity trace data.
116
- *
117
- * Reports a range of primarily domain independent trace data. The range is
118
- * specified by a pointer to the first record and a pointer to one past the
119
- * last record. ::roctracer_next_record is used to iterate the range in forward
120
- * order.
121
- *
122
- * @param[in] begin Pointer to the first record.
123
- *
124
- * @param[in] end Pointer to one past the last record.
125
- *
126
- * @return Returns 0 on success and -1 on error.
127
- */
128
- ROCTRACER_EXPORT int roctracer_plugin_write_activity_records(
129
- const roctracer_record_t* begin, const roctracer_record_t* end);
130
-
131
- /** @} */
132
-
133
- #ifdef __cplusplus
134
- } /* extern "C" */
135
- #endif /* __cplusplus */
136
-
137
- #endif /* ROCTRACER_PLUGIN_H_ */
@@ -1,67 +0,0 @@
1
- /* Copyright (c) 2018-2022 Advanced Micro Devices, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE. */
20
-
21
- #ifndef ROCTRACER_ROCTX_H_
22
- #define ROCTRACER_ROCTX_H_
23
-
24
- #include "roctx.h"
25
-
26
- /**
27
- * ROCTX API ID enumeration
28
- */
29
- enum roctx_api_id_t {
30
- ROCTX_API_ID_roctxMarkA = 0,
31
- ROCTX_API_ID_roctxRangePushA = 1,
32
- ROCTX_API_ID_roctxRangePop = 2,
33
- ROCTX_API_ID_roctxRangeStartA = 3,
34
- ROCTX_API_ID_roctxRangeStop = 4,
35
- ROCTX_API_ID_NUMBER,
36
- };
37
-
38
- /**
39
- * ROCTX callbacks data type
40
- */
41
- typedef struct roctx_api_data_s {
42
- union {
43
- struct {
44
- const char* message;
45
- roctx_range_id_t id;
46
- };
47
- struct {
48
- const char* message;
49
- } roctxMarkA;
50
- struct {
51
- const char* message;
52
- } roctxRangePushA;
53
- struct {
54
- const char* message;
55
- } roctxRangePop;
56
- struct {
57
- const char* message;
58
- roctx_range_id_t id;
59
- } roctxRangeStartA;
60
- struct {
61
- const char* message;
62
- roctx_range_id_t id;
63
- } roctxRangeStop;
64
- } args;
65
- } roctx_api_data_t;
66
-
67
- #endif /* ROCTRACER_ROCTX_H_ */
@@ -1,229 +0,0 @@
1
- /* Copyright (c) 2018-2022 Advanced Micro Devices, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE. */
20
-
21
- /** \mainpage ROCTX API Specification
22
- *
23
- * \section introduction Introduction
24
- * ROCTX is a library that implements the AMD code annotation API. It provides
25
- * the support necessary to annotate events and code ranges in applications.
26
- */
27
-
28
- /**
29
- * \file
30
- * ROCTX API interface.
31
- */
32
-
33
- #ifndef ROCTX_H_
34
- #define ROCTX_H_ 1
35
-
36
- /* Placeholder for calling convention and import/export macros */
37
- #if !defined(ROCTX_CALL)
38
- #define ROCTX_CALL
39
- #endif /* !defined (ROCTX_CALL) */
40
-
41
- #if !defined(ROCTX_EXPORT_DECORATOR)
42
- #if defined(__GNUC__)
43
- #define ROCTX_EXPORT_DECORATOR __attribute__((visibility("default")))
44
- #elif defined(_MSC_VER)
45
- #define ROCTX_EXPORT_DECORATOR __declspec(dllexport)
46
- #endif /* defined (_MSC_VER) */
47
- #endif /* !defined (ROCTX_EXPORT_DECORATOR) */
48
-
49
- #if !defined(ROCTX_IMPORT_DECORATOR)
50
- #if defined(__GNUC__)
51
- #define ROCTX_IMPORT_DECORATOR
52
- #elif defined(_MSC_VER)
53
- #define ROCTX_IMPORT_DECORATOR __declspec(dllimport)
54
- #endif /* defined (_MSC_VER) */
55
- #endif /* !defined (ROCTX_IMPORT_DECORATOR) */
56
-
57
- #define ROCTX_EXPORT ROCTX_EXPORT_DECORATOR ROCTX_CALL
58
- #define ROCTX_IMPORT ROCTX_IMPORT_DECORATOR ROCTX_CALL
59
-
60
- #if !defined(ROCTX)
61
- #if defined(ROCTX_EXPORTS)
62
- #define ROCTX_API ROCTX_EXPORT
63
- #else /* !defined (ROCTX_EXPORTS) */
64
- #define ROCTX_API ROCTX_IMPORT
65
- #endif /* !defined (ROCTX_EXPORTS) */
66
- #endif /* !defined (ROCTX) */
67
-
68
- #include <stdint.h>
69
-
70
- #if defined(__cplusplus)
71
- extern "C" {
72
- #endif /* defined(__cplusplus) */
73
-
74
- /** \defgroup symbol_versions_group Symbol Versions
75
- *
76
- * The names used for the shared library versioned symbols.
77
- *
78
- * Every function is annotated with one of the version macros defined in this
79
- * section. Each macro specifies a corresponding symbol version string. After
80
- * dynamically loading the shared library with \p dlopen, the address of each
81
- * function can be obtained using \p dlvsym with the name of the function and
82
- * its corresponding symbol version string. An error will be reported by \p
83
- * dlvsym if the installed library does not support the version for the
84
- * function specified in this version of the interface.
85
- *
86
- * @{
87
- */
88
-
89
- /**
90
- * The function was introduced in version 4.1 of the interface and has the
91
- * symbol version string of ``"ROCTX_4.1"``.
92
- */
93
- #define ROCTX_VERSION_4_1
94
-
95
- /** @} */
96
-
97
- /** \defgroup versioning_group Versioning
98
- *
99
- * Version information about the interface and the associated installed
100
- * library.
101
- *
102
- * @{
103
- */
104
-
105
- /**
106
- * The semantic version of the interface following
107
- * [semver.org][semver] rules.
108
- *
109
- * A client that uses this interface is only compatible with the installed
110
- * library if the major version numbers match and the interface minor version
111
- * number is less than or equal to the installed library minor version number.
112
- */
113
-
114
- /**
115
- * The major version of the interface as a macro so it can be used by the
116
- * preprocessor.
117
- */
118
- #define ROCTX_VERSION_MAJOR 4
119
-
120
- /**
121
- * The minor version of the interface as a macro so it can be used by the
122
- * preprocessor.
123
- */
124
- #define ROCTX_VERSION_MINOR 1
125
-
126
- /**
127
- * Query the major version of the installed library.
128
- *
129
- * Return the major version of the installed library. This can be used to check
130
- * if it is compatible with this interface version.
131
- *
132
- * \return Returns the major version number.
133
- */
134
- ROCTX_API uint32_t roctx_version_major() ROCTX_VERSION_4_1;
135
-
136
- /**
137
- * Query the minor version of the installed library.
138
- *
139
- * Return the minor version of the installed library. This can be used to check
140
- * if it is compatible with this interface version.
141
- *
142
- * \return Returns the minor version number.
143
- */
144
- ROCTX_API uint32_t roctx_version_minor() ROCTX_VERSION_4_1;
145
-
146
- /** @} */
147
-
148
- /** \defgroup marker_group ROCTX Markers
149
- *
150
- * Marker annotations are used to describe events in a ROCm application.
151
- *
152
- * @{
153
- */
154
-
155
- /**
156
- * Mark an event.
157
- *
158
- * \param[in] message The message associated with the event.
159
- */
160
- ROCTX_API void roctxMarkA(const char* message) ROCTX_VERSION_4_1;
161
- #define roctxMark(message) roctxMarkA(message)
162
-
163
- /** @} */
164
-
165
- /** \defgroup range_group ROCTX Ranges
166
- *
167
- * Range annotations are used to describe events in a ROCm application.
168
- *
169
- * @{
170
- */
171
-
172
- /**
173
- * Start a new nested range.
174
- *
175
- * Nested ranges are stacked and local to the current CPU thread.
176
- *
177
- * \param[in] message The message associated with this range.
178
- *
179
- * \return Returns the level this nested range is started at. Nested range
180
- * levels are 0 based.
181
- */
182
- ROCTX_API int roctxRangePushA(const char* message) ROCTX_VERSION_4_1;
183
- #define roctxRangePush(message) roctxRangePushA(message)
184
-
185
- /**
186
- * Stop the current nested range.
187
- *
188
- * Stop the current nested range, and pop it from the stack. If a nested range
189
- * was active before the last one was started, it becomes again the current
190
- * nested range.
191
- *
192
- * \return Returns the level the stopped nested range was started at, or a
193
- * negative value if there was no nested range active.
194
- */
195
- ROCTX_API int roctxRangePop() ROCTX_VERSION_4_1;
196
-
197
- /**
198
- * ROCTX range ID.
199
- *
200
- * This is the range ID used to identify start/end ranges.
201
- */
202
- typedef uint64_t roctx_range_id_t;
203
-
204
- /**
205
- * Starts a process range.
206
- *
207
- * Start/stop ranges can be started and stopped in different threads. Each
208
- * timespan is assigned a unique range ID.
209
- *
210
- * \param[in] message The message associated with this range.
211
- *
212
- * \return Returns the ID of the new range.
213
- */
214
- ROCTX_API roctx_range_id_t roctxRangeStartA(const char* message)
215
- ROCTX_VERSION_4_1;
216
- #define roctxRangeStart(message) roctxRangeStartA(message)
217
-
218
- /**
219
- * Stop a process range.
220
- */
221
- ROCTX_API void roctxRangeStop(roctx_range_id_t id) ROCTX_VERSION_4_1;
222
-
223
- /** @} */
224
-
225
- #if defined(__cplusplus)
226
- } /* extern "C" */
227
- #endif /* defined (__cplusplus) */
228
-
229
- #endif /* ROCTX_H_ */