assassinlike commited on
Commit
72cdeb9
·
verified ·
1 Parent(s): 556f1aa

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/include/tl/expected.hpp +2444 -0
  2. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/about.json +132 -0
  3. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/files +4 -0
  4. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/git +0 -0
  5. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/hash_input.json +6 -0
  6. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/index.json +16 -0
  7. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/licenses/COPYING +121 -0
  8. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/paths.json +29 -0
  9. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/LICENSE +121 -0
  10. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/bld.bat +24 -0
  11. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/build.sh +21 -0
  12. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/catch.hpp +0 -0
  13. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/conda_build_config.yaml +107 -0
  14. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/meta.yaml +95 -0
  15. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/meta.yaml.template +43 -0
  16. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/repodata_record.json +23 -0
  17. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/test/run_test.sh +10 -0
  18. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/share/cmake/tl-expected/tl-expected-config-version.cmake +54 -0
  19. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/share/cmake/tl-expected/tl-expected-config.cmake +27 -0
  20. data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/share/cmake/tl-expected/tl-expected-targets.cmake +106 -0
  21. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/about.json +143 -0
  22. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/files +46 -0
  23. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/git +0 -0
  24. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/index.json +21 -0
  25. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/licenses/LICENSE +1632 -0
  26. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/paths.json +281 -0
  27. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/repodata_record.json +27 -0
  28. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/run_exports.json +1 -0
  29. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/test/run_test.sh +14 -0
  30. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/Openacc/cupti_openacc.h +98 -0
  31. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/Openmp/cupti_openmp.h +100 -0
  32. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/Openmp/omp-tools.h +1083 -0
  33. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cuda_stdint.h +112 -0
  34. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti.h +123 -0
  35. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_activity.h +0 -0
  36. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_activity_deprecated.h +0 -0
  37. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_callbacks.h +863 -0
  38. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_checkpoint.h +127 -0
  39. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_common.h +93 -0
  40. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_driver_cbid.h +799 -0
  41. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_events.h +1349 -0
  42. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_metrics.h +824 -0
  43. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_nvtx_cbid.h +111 -0
  44. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_pcsampling.h +936 -0
  45. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_pcsampling_util.h +402 -0
  46. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_pmsampling.h +490 -0
  47. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_profiler_host.h +541 -0
  48. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_profiler_target.h +602 -0
  49. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_range_profiler.h +465 -0
  50. data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_result.h +360 -0
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/include/tl/expected.hpp ADDED
@@ -0,0 +1,2444 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ///
2
+ // expected - An implementation of std::expected with extensions
3
+ // Written in 2017 by Sy Brand (tartanllama@gmail.com, @TartanLlama)
4
+ //
5
+ // Documentation available at http://tl.tartanllama.xyz/
6
+ //
7
+ // To the extent possible under law, the author(s) have dedicated all
8
+ // copyright and related and neighboring rights to this software to the
9
+ // public domain worldwide. This software is distributed without any warranty.
10
+ //
11
+ // You should have received a copy of the CC0 Public Domain Dedication
12
+ // along with this software. If not, see
13
+ // <http://creativecommons.org/publicdomain/zero/1.0/>.
14
+ ///
15
+
16
+ #ifndef TL_EXPECTED_HPP
17
+ #define TL_EXPECTED_HPP
18
+
19
+ #define TL_EXPECTED_VERSION_MAJOR 1
20
+ #define TL_EXPECTED_VERSION_MINOR 1
21
+ #define TL_EXPECTED_VERSION_PATCH 0
22
+
23
+ #include <exception>
24
+ #include <functional>
25
+ #include <type_traits>
26
+ #include <utility>
27
+
28
+ #if defined(__EXCEPTIONS) || defined(_CPPUNWIND)
29
+ #define TL_EXPECTED_EXCEPTIONS_ENABLED
30
+ #endif
31
+
32
+ #if (defined(_MSC_VER) && _MSC_VER == 1900)
33
+ #define TL_EXPECTED_MSVC2015
34
+ #define TL_EXPECTED_MSVC2015_CONSTEXPR
35
+ #else
36
+ #define TL_EXPECTED_MSVC2015_CONSTEXPR constexpr
37
+ #endif
38
+
39
+ #if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \
40
+ !defined(__clang__))
41
+ #define TL_EXPECTED_GCC49
42
+ #endif
43
+
44
+ #if (defined(__GNUC__) && __GNUC__ == 5 && __GNUC_MINOR__ <= 4 && \
45
+ !defined(__clang__))
46
+ #define TL_EXPECTED_GCC54
47
+ #endif
48
+
49
+ #if (defined(__GNUC__) && __GNUC__ == 5 && __GNUC_MINOR__ <= 5 && \
50
+ !defined(__clang__))
51
+ #define TL_EXPECTED_GCC55
52
+ #endif
53
+
54
+ #if !defined(TL_ASSERT)
55
+ //can't have assert in constexpr in C++11 and GCC 4.9 has a compiler bug
56
+ #if (__cplusplus > 201103L) && !defined(TL_EXPECTED_GCC49)
57
+ #include <cassert>
58
+ #define TL_ASSERT(x) assert(x)
59
+ #else
60
+ #define TL_ASSERT(x)
61
+ #endif
62
+ #endif
63
+
64
+ #if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \
65
+ !defined(__clang__))
66
+ // GCC < 5 doesn't support overloading on const&& for member functions
67
+
68
+ #define TL_EXPECTED_NO_CONSTRR
69
+ // GCC < 5 doesn't support some standard C++11 type traits
70
+ #define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \
71
+ std::has_trivial_copy_constructor<T>
72
+ #define TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \
73
+ std::has_trivial_copy_assign<T>
74
+
75
+ // This one will be different for GCC 5.7 if it's ever supported
76
+ #define TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \
77
+ std::is_trivially_destructible<T>
78
+
79
+ // GCC 5 < v < 8 has a bug in is_trivially_copy_constructible which breaks
80
+ // std::vector for non-copyable types
81
+ #elif (defined(__GNUC__) && __GNUC__ < 8 && !defined(__clang__))
82
+ #ifndef TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX
83
+ #define TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX
84
+ namespace tl {
85
+ namespace detail {
86
+ template <class T>
87
+ struct is_trivially_copy_constructible
88
+ : std::is_trivially_copy_constructible<T> {};
89
+ #ifdef _GLIBCXX_VECTOR
90
+ template <class T, class A>
91
+ struct is_trivially_copy_constructible<std::vector<T, A>> : std::false_type {};
92
+ #endif
93
+ } // namespace detail
94
+ } // namespace tl
95
+ #endif
96
+
97
+ #define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \
98
+ tl::detail::is_trivially_copy_constructible<T>
99
+ #define TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \
100
+ std::is_trivially_copy_assignable<T>
101
+ #define TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \
102
+ std::is_trivially_destructible<T>
103
+ #else
104
+ #define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \
105
+ std::is_trivially_copy_constructible<T>
106
+ #define TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \
107
+ std::is_trivially_copy_assignable<T>
108
+ #define TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \
109
+ std::is_trivially_destructible<T>
110
+ #endif
111
+
112
+ #if __cplusplus > 201103L
113
+ #define TL_EXPECTED_CXX14
114
+ #endif
115
+
116
+ #ifdef TL_EXPECTED_GCC49
117
+ #define TL_EXPECTED_GCC49_CONSTEXPR
118
+ #else
119
+ #define TL_EXPECTED_GCC49_CONSTEXPR constexpr
120
+ #endif
121
+
122
+ #if (__cplusplus == 201103L || defined(TL_EXPECTED_MSVC2015) || \
123
+ defined(TL_EXPECTED_GCC49))
124
+ #define TL_EXPECTED_11_CONSTEXPR
125
+ #else
126
+ #define TL_EXPECTED_11_CONSTEXPR constexpr
127
+ #endif
128
+
129
+ namespace tl {
130
+ template <class T, class E> class expected;
131
+
132
+ #ifndef TL_MONOSTATE_INPLACE_MUTEX
133
+ #define TL_MONOSTATE_INPLACE_MUTEX
134
+ class monostate {};
135
+
136
+ struct in_place_t {
137
+ explicit in_place_t() = default;
138
+ };
139
+ static constexpr in_place_t in_place{};
140
+ #endif
141
+
142
+ template <class E> class unexpected {
143
+ public:
144
+ static_assert(!std::is_same<E, void>::value, "E must not be void");
145
+
146
+ unexpected() = delete;
147
+ constexpr explicit unexpected(const E &e) : m_val(e) {}
148
+
149
+ constexpr explicit unexpected(E &&e) : m_val(std::move(e)) {}
150
+
151
+ template <class... Args, typename std::enable_if<std::is_constructible<
152
+ E, Args &&...>::value>::type * = nullptr>
153
+ constexpr explicit unexpected(Args &&...args)
154
+ : m_val(std::forward<Args>(args)...) {}
155
+ template <
156
+ class U, class... Args,
157
+ typename std::enable_if<std::is_constructible<
158
+ E, std::initializer_list<U> &, Args &&...>::value>::type * = nullptr>
159
+ constexpr explicit unexpected(std::initializer_list<U> l, Args &&...args)
160
+ : m_val(l, std::forward<Args>(args)...) {}
161
+
162
+ constexpr const E &value() const & { return m_val; }
163
+ TL_EXPECTED_11_CONSTEXPR E &value() & { return m_val; }
164
+ TL_EXPECTED_11_CONSTEXPR E &&value() && { return std::move(m_val); }
165
+ constexpr const E &&value() const && { return std::move(m_val); }
166
+
167
+ private:
168
+ E m_val;
169
+ };
170
+
171
+ #ifdef __cpp_deduction_guides
172
+ template <class E> unexpected(E) -> unexpected<E>;
173
+ #endif
174
+
175
+ template <class E>
176
+ constexpr bool operator==(const unexpected<E> &lhs, const unexpected<E> &rhs) {
177
+ return lhs.value() == rhs.value();
178
+ }
179
+ template <class E>
180
+ constexpr bool operator!=(const unexpected<E> &lhs, const unexpected<E> &rhs) {
181
+ return lhs.value() != rhs.value();
182
+ }
183
+ template <class E>
184
+ constexpr bool operator<(const unexpected<E> &lhs, const unexpected<E> &rhs) {
185
+ return lhs.value() < rhs.value();
186
+ }
187
+ template <class E>
188
+ constexpr bool operator<=(const unexpected<E> &lhs, const unexpected<E> &rhs) {
189
+ return lhs.value() <= rhs.value();
190
+ }
191
+ template <class E>
192
+ constexpr bool operator>(const unexpected<E> &lhs, const unexpected<E> &rhs) {
193
+ return lhs.value() > rhs.value();
194
+ }
195
+ template <class E>
196
+ constexpr bool operator>=(const unexpected<E> &lhs, const unexpected<E> &rhs) {
197
+ return lhs.value() >= rhs.value();
198
+ }
199
+
200
+ template <class E>
201
+ unexpected<typename std::decay<E>::type> make_unexpected(E &&e) {
202
+ return unexpected<typename std::decay<E>::type>(std::forward<E>(e));
203
+ }
204
+
205
+ struct unexpect_t {
206
+ unexpect_t() = default;
207
+ };
208
+ static constexpr unexpect_t unexpect{};
209
+
210
+ namespace detail {
211
+ template <typename E>
212
+ [[noreturn]] TL_EXPECTED_11_CONSTEXPR void throw_exception(E &&e) {
213
+ #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
214
+ throw std::forward<E>(e);
215
+ #else
216
+ (void)e;
217
+ #ifdef _MSC_VER
218
+ __assume(0);
219
+ #else
220
+ __builtin_unreachable();
221
+ #endif
222
+ #endif
223
+ }
224
+
225
+ #ifndef TL_TRAITS_MUTEX
226
+ #define TL_TRAITS_MUTEX
227
+ // C++14-style aliases for brevity
228
+ template <class T> using remove_const_t = typename std::remove_const<T>::type;
229
+ template <class T>
230
+ using remove_reference_t = typename std::remove_reference<T>::type;
231
+ template <class T> using decay_t = typename std::decay<T>::type;
232
+ template <bool E, class T = void>
233
+ using enable_if_t = typename std::enable_if<E, T>::type;
234
+ template <bool B, class T, class F>
235
+ using conditional_t = typename std::conditional<B, T, F>::type;
236
+
237
+ // std::conjunction from C++17
238
+ template <class...> struct conjunction : std::true_type {};
239
+ template <class B> struct conjunction<B> : B {};
240
+ template <class B, class... Bs>
241
+ struct conjunction<B, Bs...>
242
+ : std::conditional<bool(B::value), conjunction<Bs...>, B>::type {};
243
+
244
+ #if defined(_LIBCPP_VERSION) && __cplusplus == 201103L
245
+ #define TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND
246
+ #endif
247
+
248
+ // In C++11 mode, there's an issue in libc++'s std::mem_fn
249
+ // which results in a hard-error when using it in a noexcept expression
250
+ // in some cases. This is a check to workaround the common failing case.
251
+ #ifdef TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND
252
+ template <class T>
253
+ struct is_pointer_to_non_const_member_func : std::false_type {};
254
+ template <class T, class Ret, class... Args>
255
+ struct is_pointer_to_non_const_member_func<Ret (T::*)(Args...)>
256
+ : std::true_type {};
257
+ template <class T, class Ret, class... Args>
258
+ struct is_pointer_to_non_const_member_func<Ret (T::*)(Args...) &>
259
+ : std::true_type {};
260
+ template <class T, class Ret, class... Args>
261
+ struct is_pointer_to_non_const_member_func<Ret (T::*)(Args...) &&>
262
+ : std::true_type {};
263
+ template <class T, class Ret, class... Args>
264
+ struct is_pointer_to_non_const_member_func<Ret (T::*)(Args...) volatile>
265
+ : std::true_type {};
266
+ template <class T, class Ret, class... Args>
267
+ struct is_pointer_to_non_const_member_func<Ret (T::*)(Args...) volatile &>
268
+ : std::true_type {};
269
+ template <class T, class Ret, class... Args>
270
+ struct is_pointer_to_non_const_member_func<Ret (T::*)(Args...) volatile &&>
271
+ : std::true_type {};
272
+
273
+ template <class T> struct is_const_or_const_ref : std::false_type {};
274
+ template <class T> struct is_const_or_const_ref<T const &> : std::true_type {};
275
+ template <class T> struct is_const_or_const_ref<T const> : std::true_type {};
276
+ #endif
277
+
278
+ // std::invoke from C++17
279
+ // https://stackoverflow.com/questions/38288042/c11-14-invoke-workaround
280
+ template <
281
+ typename Fn, typename... Args,
282
+ #ifdef TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND
283
+ typename = enable_if_t<!(is_pointer_to_non_const_member_func<Fn>::value &&
284
+ is_const_or_const_ref<Args...>::value)>,
285
+ #endif
286
+ typename = enable_if_t<std::is_member_pointer<decay_t<Fn>>::value>, int = 0>
287
+ constexpr auto invoke(Fn &&f, Args &&...args) noexcept(
288
+ noexcept(std::mem_fn(f)(std::forward<Args>(args)...)))
289
+ -> decltype(std::mem_fn(f)(std::forward<Args>(args)...)) {
290
+ return std::mem_fn(f)(std::forward<Args>(args)...);
291
+ }
292
+
293
+ template <typename Fn, typename... Args,
294
+ typename = enable_if_t<!std::is_member_pointer<decay_t<Fn>>::value>>
295
+ constexpr auto invoke(Fn &&f, Args &&...args) noexcept(
296
+ noexcept(std::forward<Fn>(f)(std::forward<Args>(args)...)))
297
+ -> decltype(std::forward<Fn>(f)(std::forward<Args>(args)...)) {
298
+ return std::forward<Fn>(f)(std::forward<Args>(args)...);
299
+ }
300
+
301
+ // std::invoke_result from C++17
302
+ template <class F, class, class... Us> struct invoke_result_impl;
303
+
304
+ template <class F, class... Us>
305
+ struct invoke_result_impl<
306
+ F,
307
+ decltype(detail::invoke(std::declval<F>(), std::declval<Us>()...), void()),
308
+ Us...> {
309
+ using type =
310
+ decltype(detail::invoke(std::declval<F>(), std::declval<Us>()...));
311
+ };
312
+
313
+ template <class F, class... Us>
314
+ using invoke_result = invoke_result_impl<F, void, Us...>;
315
+
316
+ template <class F, class... Us>
317
+ using invoke_result_t = typename invoke_result<F, Us...>::type;
318
+
319
+ #if defined(_MSC_VER) && _MSC_VER <= 1900
320
+ // TODO make a version which works with MSVC 2015
321
+ template <class T, class U = T> struct is_swappable : std::true_type {};
322
+
323
+ template <class T, class U = T> struct is_nothrow_swappable : std::true_type {};
324
+ #else
325
+ // https://stackoverflow.com/questions/26744589/what-is-a-proper-way-to-implement-is-swappable-to-test-for-the-swappable-concept
326
+ namespace swap_adl_tests {
327
+ // if swap ADL finds this then it would call std::swap otherwise (same
328
+ // signature)
329
+ struct tag {};
330
+
331
+ template <class T> tag swap(T &, T &);
332
+ template <class T, std::size_t N> tag swap(T (&a)[N], T (&b)[N]);
333
+
334
+ // helper functions to test if an unqualified swap is possible, and if it
335
+ // becomes std::swap
336
+ template <class, class> std::false_type can_swap(...) noexcept(false);
337
+ template <class T, class U,
338
+ class = decltype(swap(std::declval<T &>(), std::declval<U &>()))>
339
+ std::true_type can_swap(int) noexcept(noexcept(swap(std::declval<T &>(),
340
+ std::declval<U &>())));
341
+
342
+ template <class, class> std::false_type uses_std(...);
343
+ template <class T, class U>
344
+ std::is_same<decltype(swap(std::declval<T &>(), std::declval<U &>())), tag>
345
+ uses_std(int);
346
+
347
+ template <class T>
348
+ struct is_std_swap_noexcept
349
+ : std::integral_constant<bool,
350
+ std::is_nothrow_move_constructible<T>::value &&
351
+ std::is_nothrow_move_assignable<T>::value> {};
352
+
353
+ template <class T, std::size_t N>
354
+ struct is_std_swap_noexcept<T[N]> : is_std_swap_noexcept<T> {};
355
+
356
+ template <class T, class U>
357
+ struct is_adl_swap_noexcept
358
+ : std::integral_constant<bool, noexcept(can_swap<T, U>(0))> {};
359
+ } // namespace swap_adl_tests
360
+
361
+ template <class T, class U = T>
362
+ struct is_swappable
363
+ : std::integral_constant<
364
+ bool,
365
+ decltype(detail::swap_adl_tests::can_swap<T, U>(0))::value &&
366
+ (!decltype(detail::swap_adl_tests::uses_std<T, U>(0))::value ||
367
+ (std::is_move_assignable<T>::value &&
368
+ std::is_move_constructible<T>::value))> {};
369
+
370
+ template <class T, std::size_t N>
371
+ struct is_swappable<T[N], T[N]>
372
+ : std::integral_constant<
373
+ bool,
374
+ decltype(detail::swap_adl_tests::can_swap<T[N], T[N]>(0))::value &&
375
+ (!decltype(detail::swap_adl_tests::uses_std<T[N], T[N]>(
376
+ 0))::value ||
377
+ is_swappable<T, T>::value)> {};
378
+
379
+ template <class T, class U = T>
380
+ struct is_nothrow_swappable
381
+ : std::integral_constant<
382
+ bool,
383
+ is_swappable<T, U>::value &&
384
+ ((decltype(detail::swap_adl_tests::uses_std<T, U>(0))::value &&
385
+ detail::swap_adl_tests::is_std_swap_noexcept<T>::value) ||
386
+ (!decltype(detail::swap_adl_tests::uses_std<T, U>(0))::value &&
387
+ detail::swap_adl_tests::is_adl_swap_noexcept<T, U>::value))> {};
388
+ #endif
389
+ #endif
390
+
391
+ // Trait for checking if a type is a tl::expected
392
+ template <class T> struct is_expected_impl : std::false_type {};
393
+ template <class T, class E>
394
+ struct is_expected_impl<expected<T, E>> : std::true_type {};
395
+ template <class T> using is_expected = is_expected_impl<decay_t<T>>;
396
+
397
+ template <class T, class E, class U>
398
+ using expected_enable_forward_value = detail::enable_if_t<
399
+ std::is_constructible<T, U &&>::value &&
400
+ !std::is_same<detail::decay_t<U>, in_place_t>::value &&
401
+ !std::is_same<expected<T, E>, detail::decay_t<U>>::value &&
402
+ !std::is_same<unexpected<E>, detail::decay_t<U>>::value>;
403
+
404
+ template <class T, class E, class U, class G, class UR, class GR>
405
+ using expected_enable_from_other = detail::enable_if_t<
406
+ std::is_constructible<T, UR>::value &&
407
+ std::is_constructible<E, GR>::value &&
408
+ !std::is_constructible<T, expected<U, G> &>::value &&
409
+ !std::is_constructible<T, expected<U, G> &&>::value &&
410
+ !std::is_constructible<T, const expected<U, G> &>::value &&
411
+ !std::is_constructible<T, const expected<U, G> &&>::value &&
412
+ !std::is_convertible<expected<U, G> &, T>::value &&
413
+ !std::is_convertible<expected<U, G> &&, T>::value &&
414
+ !std::is_convertible<const expected<U, G> &, T>::value &&
415
+ !std::is_convertible<const expected<U, G> &&, T>::value>;
416
+
417
+ template <class T, class U>
418
+ using is_void_or = conditional_t<std::is_void<T>::value, std::true_type, U>;
419
+
420
+ template <class T>
421
+ using is_copy_constructible_or_void =
422
+ is_void_or<T, std::is_copy_constructible<T>>;
423
+
424
+ template <class T>
425
+ using is_move_constructible_or_void =
426
+ is_void_or<T, std::is_move_constructible<T>>;
427
+
428
+ template <class T>
429
+ using is_copy_assignable_or_void = is_void_or<T, std::is_copy_assignable<T>>;
430
+
431
+ template <class T>
432
+ using is_move_assignable_or_void = is_void_or<T, std::is_move_assignable<T>>;
433
+
434
+ } // namespace detail
435
+
436
+ namespace detail {
437
+ struct no_init_t {};
438
+ static constexpr no_init_t no_init{};
439
+
440
+ // Implements the storage of the values, and ensures that the destructor is
441
+ // trivial if it can be.
442
+ //
443
+ // This specialization is for where neither `T` or `E` is trivially
444
+ // destructible, so the destructors must be called on destruction of the
445
+ // `expected`
446
+ template <class T, class E, bool = std::is_trivially_destructible<T>::value,
447
+ bool = std::is_trivially_destructible<E>::value>
448
+ struct expected_storage_base {
449
+ constexpr expected_storage_base() : m_val(T{}), m_has_val(true) {}
450
+ constexpr expected_storage_base(no_init_t) : m_no_init(), m_has_val(false) {}
451
+
452
+ template <class... Args,
453
+ detail::enable_if_t<std::is_constructible<T, Args &&...>::value> * =
454
+ nullptr>
455
+ constexpr expected_storage_base(in_place_t, Args &&...args)
456
+ : m_val(std::forward<Args>(args)...), m_has_val(true) {}
457
+
458
+ template <class U, class... Args,
459
+ detail::enable_if_t<std::is_constructible<
460
+ T, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
461
+ constexpr expected_storage_base(in_place_t, std::initializer_list<U> il,
462
+ Args &&...args)
463
+ : m_val(il, std::forward<Args>(args)...), m_has_val(true) {}
464
+ template <class... Args,
465
+ detail::enable_if_t<std::is_constructible<E, Args &&...>::value> * =
466
+ nullptr>
467
+ constexpr explicit expected_storage_base(unexpect_t, Args &&...args)
468
+ : m_unexpect(std::forward<Args>(args)...), m_has_val(false) {}
469
+
470
+ template <class U, class... Args,
471
+ detail::enable_if_t<std::is_constructible<
472
+ E, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
473
+ constexpr explicit expected_storage_base(unexpect_t,
474
+ std::initializer_list<U> il,
475
+ Args &&...args)
476
+ : m_unexpect(il, std::forward<Args>(args)...), m_has_val(false) {}
477
+
478
+ ~expected_storage_base() {
479
+ if (m_has_val) {
480
+ m_val.~T();
481
+ } else {
482
+ m_unexpect.~unexpected<E>();
483
+ }
484
+ }
485
+ union {
486
+ T m_val;
487
+ unexpected<E> m_unexpect;
488
+ char m_no_init;
489
+ };
490
+ bool m_has_val;
491
+ };
492
+
493
+ // This specialization is for when both `T` and `E` are trivially-destructible,
494
+ // so the destructor of the `expected` can be trivial.
495
+ template <class T, class E> struct expected_storage_base<T, E, true, true> {
496
+ constexpr expected_storage_base() : m_val(T{}), m_has_val(true) {}
497
+ constexpr expected_storage_base(no_init_t) : m_no_init(), m_has_val(false) {}
498
+
499
+ template <class... Args,
500
+ detail::enable_if_t<std::is_constructible<T, Args &&...>::value> * =
501
+ nullptr>
502
+ constexpr expected_storage_base(in_place_t, Args &&...args)
503
+ : m_val(std::forward<Args>(args)...), m_has_val(true) {}
504
+
505
+ template <class U, class... Args,
506
+ detail::enable_if_t<std::is_constructible<
507
+ T, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
508
+ constexpr expected_storage_base(in_place_t, std::initializer_list<U> il,
509
+ Args &&...args)
510
+ : m_val(il, std::forward<Args>(args)...), m_has_val(true) {}
511
+ template <class... Args,
512
+ detail::enable_if_t<std::is_constructible<E, Args &&...>::value> * =
513
+ nullptr>
514
+ constexpr explicit expected_storage_base(unexpect_t, Args &&...args)
515
+ : m_unexpect(std::forward<Args>(args)...), m_has_val(false) {}
516
+
517
+ template <class U, class... Args,
518
+ detail::enable_if_t<std::is_constructible<
519
+ E, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
520
+ constexpr explicit expected_storage_base(unexpect_t,
521
+ std::initializer_list<U> il,
522
+ Args &&...args)
523
+ : m_unexpect(il, std::forward<Args>(args)...), m_has_val(false) {}
524
+
525
+ ~expected_storage_base() = default;
526
+ union {
527
+ T m_val;
528
+ unexpected<E> m_unexpect;
529
+ char m_no_init;
530
+ };
531
+ bool m_has_val;
532
+ };
533
+
534
+ // T is trivial, E is not.
535
+ template <class T, class E> struct expected_storage_base<T, E, true, false> {
536
+ constexpr expected_storage_base() : m_val(T{}), m_has_val(true) {}
537
+ TL_EXPECTED_MSVC2015_CONSTEXPR expected_storage_base(no_init_t)
538
+ : m_no_init(), m_has_val(false) {}
539
+
540
+ template <class... Args,
541
+ detail::enable_if_t<std::is_constructible<T, Args &&...>::value> * =
542
+ nullptr>
543
+ constexpr expected_storage_base(in_place_t, Args &&...args)
544
+ : m_val(std::forward<Args>(args)...), m_has_val(true) {}
545
+
546
+ template <class U, class... Args,
547
+ detail::enable_if_t<std::is_constructible<
548
+ T, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
549
+ constexpr expected_storage_base(in_place_t, std::initializer_list<U> il,
550
+ Args &&...args)
551
+ : m_val(il, std::forward<Args>(args)...), m_has_val(true) {}
552
+ template <class... Args,
553
+ detail::enable_if_t<std::is_constructible<E, Args &&...>::value> * =
554
+ nullptr>
555
+ constexpr explicit expected_storage_base(unexpect_t, Args &&...args)
556
+ : m_unexpect(std::forward<Args>(args)...), m_has_val(false) {}
557
+
558
+ template <class U, class... Args,
559
+ detail::enable_if_t<std::is_constructible<
560
+ E, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
561
+ constexpr explicit expected_storage_base(unexpect_t,
562
+ std::initializer_list<U> il,
563
+ Args &&...args)
564
+ : m_unexpect(il, std::forward<Args>(args)...), m_has_val(false) {}
565
+
566
+ ~expected_storage_base() {
567
+ if (!m_has_val) {
568
+ m_unexpect.~unexpected<E>();
569
+ }
570
+ }
571
+
572
+ union {
573
+ T m_val;
574
+ unexpected<E> m_unexpect;
575
+ char m_no_init;
576
+ };
577
+ bool m_has_val;
578
+ };
579
+
580
+ // E is trivial, T is not.
581
+ template <class T, class E> struct expected_storage_base<T, E, false, true> {
582
+ constexpr expected_storage_base() : m_val(T{}), m_has_val(true) {}
583
+ constexpr expected_storage_base(no_init_t) : m_no_init(), m_has_val(false) {}
584
+
585
+ template <class... Args,
586
+ detail::enable_if_t<std::is_constructible<T, Args &&...>::value> * =
587
+ nullptr>
588
+ constexpr expected_storage_base(in_place_t, Args &&...args)
589
+ : m_val(std::forward<Args>(args)...), m_has_val(true) {}
590
+
591
+ template <class U, class... Args,
592
+ detail::enable_if_t<std::is_constructible<
593
+ T, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
594
+ constexpr expected_storage_base(in_place_t, std::initializer_list<U> il,
595
+ Args &&...args)
596
+ : m_val(il, std::forward<Args>(args)...), m_has_val(true) {}
597
+ template <class... Args,
598
+ detail::enable_if_t<std::is_constructible<E, Args &&...>::value> * =
599
+ nullptr>
600
+ constexpr explicit expected_storage_base(unexpect_t, Args &&...args)
601
+ : m_unexpect(std::forward<Args>(args)...), m_has_val(false) {}
602
+
603
+ template <class U, class... Args,
604
+ detail::enable_if_t<std::is_constructible<
605
+ E, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
606
+ constexpr explicit expected_storage_base(unexpect_t,
607
+ std::initializer_list<U> il,
608
+ Args &&...args)
609
+ : m_unexpect(il, std::forward<Args>(args)...), m_has_val(false) {}
610
+
611
+ ~expected_storage_base() {
612
+ if (m_has_val) {
613
+ m_val.~T();
614
+ }
615
+ }
616
+ union {
617
+ T m_val;
618
+ unexpected<E> m_unexpect;
619
+ char m_no_init;
620
+ };
621
+ bool m_has_val;
622
+ };
623
+
624
+ // `T` is `void`, `E` is trivially-destructible
625
+ template <class E> struct expected_storage_base<void, E, false, true> {
626
+ #if __GNUC__ <= 5
627
+ //no constexpr for GCC 4/5 bug
628
+ #else
629
+ TL_EXPECTED_MSVC2015_CONSTEXPR
630
+ #endif
631
+ expected_storage_base() : m_has_val(true) {}
632
+
633
+ constexpr expected_storage_base(no_init_t) : m_val(), m_has_val(false) {}
634
+
635
+ constexpr expected_storage_base(in_place_t) : m_has_val(true) {}
636
+
637
+ template <class... Args,
638
+ detail::enable_if_t<std::is_constructible<E, Args &&...>::value> * =
639
+ nullptr>
640
+ constexpr explicit expected_storage_base(unexpect_t, Args &&...args)
641
+ : m_unexpect(std::forward<Args>(args)...), m_has_val(false) {}
642
+
643
+ template <class U, class... Args,
644
+ detail::enable_if_t<std::is_constructible<
645
+ E, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
646
+ constexpr explicit expected_storage_base(unexpect_t,
647
+ std::initializer_list<U> il,
648
+ Args &&...args)
649
+ : m_unexpect(il, std::forward<Args>(args)...), m_has_val(false) {}
650
+
651
+ ~expected_storage_base() = default;
652
+ struct dummy {};
653
+ union {
654
+ unexpected<E> m_unexpect;
655
+ dummy m_val;
656
+ };
657
+ bool m_has_val;
658
+ };
659
+
660
+ // `T` is `void`, `E` is not trivially-destructible
661
+ template <class E> struct expected_storage_base<void, E, false, false> {
662
+ constexpr expected_storage_base() : m_dummy(), m_has_val(true) {}
663
+ constexpr expected_storage_base(no_init_t) : m_dummy(), m_has_val(false) {}
664
+
665
+ constexpr expected_storage_base(in_place_t) : m_dummy(), m_has_val(true) {}
666
+
667
+ template <class... Args,
668
+ detail::enable_if_t<std::is_constructible<E, Args &&...>::value> * =
669
+ nullptr>
670
+ constexpr explicit expected_storage_base(unexpect_t, Args &&...args)
671
+ : m_unexpect(std::forward<Args>(args)...), m_has_val(false) {}
672
+
673
+ template <class U, class... Args,
674
+ detail::enable_if_t<std::is_constructible<
675
+ E, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
676
+ constexpr explicit expected_storage_base(unexpect_t,
677
+ std::initializer_list<U> il,
678
+ Args &&...args)
679
+ : m_unexpect(il, std::forward<Args>(args)...), m_has_val(false) {}
680
+
681
+ ~expected_storage_base() {
682
+ if (!m_has_val) {
683
+ m_unexpect.~unexpected<E>();
684
+ }
685
+ }
686
+
687
+ union {
688
+ unexpected<E> m_unexpect;
689
+ char m_dummy;
690
+ };
691
+ bool m_has_val;
692
+ };
693
+
694
+ // This base class provides some handy member functions which can be used in
695
+ // further derived classes
696
+ template <class T, class E>
697
+ struct expected_operations_base : expected_storage_base<T, E> {
698
+ using expected_storage_base<T, E>::expected_storage_base;
699
+
700
+ template <class... Args> void construct(Args &&...args) noexcept {
701
+ new (std::addressof(this->m_val)) T(std::forward<Args>(args)...);
702
+ this->m_has_val = true;
703
+ }
704
+
705
+ template <class Rhs> void construct_with(Rhs &&rhs) noexcept {
706
+ new (std::addressof(this->m_val)) T(std::forward<Rhs>(rhs).get());
707
+ this->m_has_val = true;
708
+ }
709
+
710
+ template <class... Args> void construct_error(Args &&...args) noexcept {
711
+ new (std::addressof(this->m_unexpect))
712
+ unexpected<E>(std::forward<Args>(args)...);
713
+ this->m_has_val = false;
714
+ }
715
+
716
+ #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
717
+
718
+ // These assign overloads ensure that the most efficient assignment
719
+ // implementation is used while maintaining the strong exception guarantee.
720
+ // The problematic case is where rhs has a value, but *this does not.
721
+ //
722
+ // This overload handles the case where we can just copy-construct `T`
723
+ // directly into place without throwing.
724
+ template <class U = T,
725
+ detail::enable_if_t<std::is_nothrow_copy_constructible<U>::value>
726
+ * = nullptr>
727
+ void assign(const expected_operations_base &rhs) noexcept {
728
+ if (!this->m_has_val && rhs.m_has_val) {
729
+ geterr().~unexpected<E>();
730
+ construct(rhs.get());
731
+ } else {
732
+ assign_common(rhs);
733
+ }
734
+ }
735
+
736
+ // This overload handles the case where we can attempt to create a copy of
737
+ // `T`, then no-throw move it into place if the copy was successful.
738
+ template <class U = T,
739
+ detail::enable_if_t<!std::is_nothrow_copy_constructible<U>::value &&
740
+ std::is_nothrow_move_constructible<U>::value>
741
+ * = nullptr>
742
+ void assign(const expected_operations_base &rhs) noexcept {
743
+ if (!this->m_has_val && rhs.m_has_val) {
744
+ T tmp = rhs.get();
745
+ geterr().~unexpected<E>();
746
+ construct(std::move(tmp));
747
+ } else {
748
+ assign_common(rhs);
749
+ }
750
+ }
751
+
752
+ // This overload is the worst-case, where we have to move-construct the
753
+ // unexpected value into temporary storage, then try to copy the T into place.
754
+ // If the construction succeeds, then everything is fine, but if it throws,
755
+ // then we move the old unexpected value back into place before rethrowing the
756
+ // exception.
757
+ template <class U = T,
758
+ detail::enable_if_t<!std::is_nothrow_copy_constructible<U>::value &&
759
+ !std::is_nothrow_move_constructible<U>::value>
760
+ * = nullptr>
761
+ void assign(const expected_operations_base &rhs) {
762
+ if (!this->m_has_val && rhs.m_has_val) {
763
+ auto tmp = std::move(geterr());
764
+ geterr().~unexpected<E>();
765
+
766
+ #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
767
+ try {
768
+ construct(rhs.get());
769
+ } catch (...) {
770
+ geterr() = std::move(tmp);
771
+ throw;
772
+ }
773
+ #else
774
+ construct(rhs.get());
775
+ #endif
776
+ } else {
777
+ assign_common(rhs);
778
+ }
779
+ }
780
+
781
+ // These overloads do the same as above, but for rvalues
782
+ template <class U = T,
783
+ detail::enable_if_t<std::is_nothrow_move_constructible<U>::value>
784
+ * = nullptr>
785
+ void assign(expected_operations_base &&rhs) noexcept {
786
+ if (!this->m_has_val && rhs.m_has_val) {
787
+ geterr().~unexpected<E>();
788
+ construct(std::move(rhs).get());
789
+ } else {
790
+ assign_common(std::move(rhs));
791
+ }
792
+ }
793
+
794
+ template <class U = T,
795
+ detail::enable_if_t<!std::is_nothrow_move_constructible<U>::value>
796
+ * = nullptr>
797
+ void assign(expected_operations_base &&rhs) {
798
+ if (!this->m_has_val && rhs.m_has_val) {
799
+ auto tmp = std::move(geterr());
800
+ geterr().~unexpected<E>();
801
+ #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
802
+ try {
803
+ construct(std::move(rhs).get());
804
+ } catch (...) {
805
+ geterr() = std::move(tmp);
806
+ throw;
807
+ }
808
+ #else
809
+ construct(std::move(rhs).get());
810
+ #endif
811
+ } else {
812
+ assign_common(std::move(rhs));
813
+ }
814
+ }
815
+
816
+ #else
817
+
818
+ // If exceptions are disabled then we can just copy-construct
819
+ void assign(const expected_operations_base &rhs) noexcept {
820
+ if (!this->m_has_val && rhs.m_has_val) {
821
+ geterr().~unexpected<E>();
822
+ construct(rhs.get());
823
+ } else {
824
+ assign_common(rhs);
825
+ }
826
+ }
827
+
828
+ void assign(expected_operations_base &&rhs) noexcept {
829
+ if (!this->m_has_val && rhs.m_has_val) {
830
+ geterr().~unexpected<E>();
831
+ construct(std::move(rhs).get());
832
+ } else {
833
+ assign_common(std::move(rhs));
834
+ }
835
+ }
836
+
837
+ #endif
838
+
839
+ // The common part of move/copy assigning
840
+ template <class Rhs> void assign_common(Rhs &&rhs) {
841
+ if (this->m_has_val) {
842
+ if (rhs.m_has_val) {
843
+ get() = std::forward<Rhs>(rhs).get();
844
+ } else {
845
+ destroy_val();
846
+ construct_error(std::forward<Rhs>(rhs).geterr());
847
+ }
848
+ } else {
849
+ if (!rhs.m_has_val) {
850
+ geterr() = std::forward<Rhs>(rhs).geterr();
851
+ }
852
+ }
853
+ }
854
+
855
+ bool has_value() const { return this->m_has_val; }
856
+
857
+ TL_EXPECTED_11_CONSTEXPR T &get() & { return this->m_val; }
858
+ constexpr const T &get() const & { return this->m_val; }
859
+ TL_EXPECTED_11_CONSTEXPR T &&get() && { return std::move(this->m_val); }
860
+ #ifndef TL_EXPECTED_NO_CONSTRR
861
+ constexpr const T &&get() const && { return std::move(this->m_val); }
862
+ #endif
863
+
864
+ TL_EXPECTED_11_CONSTEXPR unexpected<E> &geterr() & {
865
+ return this->m_unexpect;
866
+ }
867
+ constexpr const unexpected<E> &geterr() const & { return this->m_unexpect; }
868
+ TL_EXPECTED_11_CONSTEXPR unexpected<E> &&geterr() && {
869
+ return std::move(this->m_unexpect);
870
+ }
871
+ #ifndef TL_EXPECTED_NO_CONSTRR
872
+ constexpr const unexpected<E> &&geterr() const && {
873
+ return std::move(this->m_unexpect);
874
+ }
875
+ #endif
876
+
877
+ TL_EXPECTED_11_CONSTEXPR void destroy_val() { get().~T(); }
878
+ };
879
+
880
+ // This base class provides some handy member functions which can be used in
881
+ // further derived classes
882
+ template <class E>
883
+ struct expected_operations_base<void, E> : expected_storage_base<void, E> {
884
+ using expected_storage_base<void, E>::expected_storage_base;
885
+
886
+ template <class... Args> void construct() noexcept { this->m_has_val = true; }
887
+
888
+ // This function doesn't use its argument, but needs it so that code in
889
+ // levels above this can work independently of whether T is void
890
+ template <class Rhs> void construct_with(Rhs &&) noexcept {
891
+ this->m_has_val = true;
892
+ }
893
+
894
+ template <class... Args> void construct_error(Args &&...args) noexcept {
895
+ new (std::addressof(this->m_unexpect))
896
+ unexpected<E>(std::forward<Args>(args)...);
897
+ this->m_has_val = false;
898
+ }
899
+
900
+ template <class Rhs> void assign(Rhs &&rhs) noexcept {
901
+ if (!this->m_has_val) {
902
+ if (rhs.m_has_val) {
903
+ geterr().~unexpected<E>();
904
+ construct();
905
+ } else {
906
+ geterr() = std::forward<Rhs>(rhs).geterr();
907
+ }
908
+ } else {
909
+ if (!rhs.m_has_val) {
910
+ construct_error(std::forward<Rhs>(rhs).geterr());
911
+ }
912
+ }
913
+ }
914
+
915
+ bool has_value() const { return this->m_has_val; }
916
+
917
+ TL_EXPECTED_11_CONSTEXPR unexpected<E> &geterr() & {
918
+ return this->m_unexpect;
919
+ }
920
+ constexpr const unexpected<E> &geterr() const & { return this->m_unexpect; }
921
+ TL_EXPECTED_11_CONSTEXPR unexpected<E> &&geterr() && {
922
+ return std::move(this->m_unexpect);
923
+ }
924
+ #ifndef TL_EXPECTED_NO_CONSTRR
925
+ constexpr const unexpected<E> &&geterr() const && {
926
+ return std::move(this->m_unexpect);
927
+ }
928
+ #endif
929
+
930
+ TL_EXPECTED_11_CONSTEXPR void destroy_val() {
931
+ // no-op
932
+ }
933
+ };
934
+
935
+ // This class manages conditionally having a trivial copy constructor
936
+ // This specialization is for when T and E are trivially copy constructible
937
+ template <class T, class E,
938
+ bool = is_void_or<T, TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T)>::
939
+ value &&TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(E)::value>
940
+ struct expected_copy_base : expected_operations_base<T, E> {
941
+ using expected_operations_base<T, E>::expected_operations_base;
942
+ };
943
+
944
+ // This specialization is for when T or E are not trivially copy constructible
945
+ template <class T, class E>
946
+ struct expected_copy_base<T, E, false> : expected_operations_base<T, E> {
947
+ using expected_operations_base<T, E>::expected_operations_base;
948
+
949
+ expected_copy_base() = default;
950
+ expected_copy_base(const expected_copy_base &rhs)
951
+ : expected_operations_base<T, E>(no_init) {
952
+ if (rhs.has_value()) {
953
+ this->construct_with(rhs);
954
+ } else {
955
+ this->construct_error(rhs.geterr());
956
+ }
957
+ }
958
+
959
+ expected_copy_base(expected_copy_base &&rhs) = default;
960
+ expected_copy_base &operator=(const expected_copy_base &rhs) = default;
961
+ expected_copy_base &operator=(expected_copy_base &&rhs) = default;
962
+ };
963
+
964
+ // This class manages conditionally having a trivial move constructor
965
+ // Unfortunately there's no way to achieve this in GCC < 5 AFAIK, since it
966
+ // doesn't implement an analogue to std::is_trivially_move_constructible. We
967
+ // have to make do with a non-trivial move constructor even if T is trivially
968
+ // move constructible
969
+ #ifndef TL_EXPECTED_GCC49
970
+ template <class T, class E,
971
+ bool = is_void_or<T, std::is_trivially_move_constructible<T>>::value
972
+ &&std::is_trivially_move_constructible<E>::value>
973
+ struct expected_move_base : expected_copy_base<T, E> {
974
+ using expected_copy_base<T, E>::expected_copy_base;
975
+ };
976
+ #else
977
+ template <class T, class E, bool = false> struct expected_move_base;
978
+ #endif
979
+ template <class T, class E>
980
+ struct expected_move_base<T, E, false> : expected_copy_base<T, E> {
981
+ using expected_copy_base<T, E>::expected_copy_base;
982
+
983
+ expected_move_base() = default;
984
+ expected_move_base(const expected_move_base &rhs) = default;
985
+
986
+ expected_move_base(expected_move_base &&rhs) noexcept(
987
+ std::is_nothrow_move_constructible<T>::value)
988
+ : expected_copy_base<T, E>(no_init) {
989
+ if (rhs.has_value()) {
990
+ this->construct_with(std::move(rhs));
991
+ } else {
992
+ this->construct_error(std::move(rhs.geterr()));
993
+ }
994
+ }
995
+ expected_move_base &operator=(const expected_move_base &rhs) = default;
996
+ expected_move_base &operator=(expected_move_base &&rhs) = default;
997
+ };
998
+
999
+ // This class manages conditionally having a trivial copy assignment operator
1000
+ template <class T, class E,
1001
+ bool = is_void_or<
1002
+ T, conjunction<TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T),
1003
+ TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T),
1004
+ TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T)>>::value
1005
+ &&TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(E)::value
1006
+ &&TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(E)::value
1007
+ &&TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(E)::value>
1008
+ struct expected_copy_assign_base : expected_move_base<T, E> {
1009
+ using expected_move_base<T, E>::expected_move_base;
1010
+ };
1011
+
1012
+ template <class T, class E>
1013
+ struct expected_copy_assign_base<T, E, false> : expected_move_base<T, E> {
1014
+ using expected_move_base<T, E>::expected_move_base;
1015
+
1016
+ expected_copy_assign_base() = default;
1017
+ expected_copy_assign_base(const expected_copy_assign_base &rhs) = default;
1018
+
1019
+ expected_copy_assign_base(expected_copy_assign_base &&rhs) = default;
1020
+ expected_copy_assign_base &operator=(const expected_copy_assign_base &rhs) {
1021
+ this->assign(rhs);
1022
+ return *this;
1023
+ }
1024
+ expected_copy_assign_base &
1025
+ operator=(expected_copy_assign_base &&rhs) = default;
1026
+ };
1027
+
1028
+ // This class manages conditionally having a trivial move assignment operator
1029
+ // Unfortunately there's no way to achieve this in GCC < 5 AFAIK, since it
1030
+ // doesn't implement an analogue to std::is_trivially_move_assignable. We have
1031
+ // to make do with a non-trivial move assignment operator even if T is trivially
1032
+ // move assignable
1033
+ #ifndef TL_EXPECTED_GCC49
1034
+ template <class T, class E,
1035
+ bool =
1036
+ is_void_or<T, conjunction<std::is_trivially_destructible<T>,
1037
+ std::is_trivially_move_constructible<T>,
1038
+ std::is_trivially_move_assignable<T>>>::
1039
+ value &&std::is_trivially_destructible<E>::value
1040
+ &&std::is_trivially_move_constructible<E>::value
1041
+ &&std::is_trivially_move_assignable<E>::value>
1042
+ struct expected_move_assign_base : expected_copy_assign_base<T, E> {
1043
+ using expected_copy_assign_base<T, E>::expected_copy_assign_base;
1044
+ };
1045
+ #else
1046
+ template <class T, class E, bool = false> struct expected_move_assign_base;
1047
+ #endif
1048
+
1049
+ template <class T, class E>
1050
+ struct expected_move_assign_base<T, E, false>
1051
+ : expected_copy_assign_base<T, E> {
1052
+ using expected_copy_assign_base<T, E>::expected_copy_assign_base;
1053
+
1054
+ expected_move_assign_base() = default;
1055
+ expected_move_assign_base(const expected_move_assign_base &rhs) = default;
1056
+
1057
+ expected_move_assign_base(expected_move_assign_base &&rhs) = default;
1058
+
1059
+ expected_move_assign_base &
1060
+ operator=(const expected_move_assign_base &rhs) = default;
1061
+
1062
+ expected_move_assign_base &
1063
+ operator=(expected_move_assign_base &&rhs) noexcept(
1064
+ std::is_nothrow_move_constructible<T>::value
1065
+ &&std::is_nothrow_move_assignable<T>::value) {
1066
+ this->assign(std::move(rhs));
1067
+ return *this;
1068
+ }
1069
+ };
1070
+
1071
+ // expected_delete_ctor_base will conditionally delete copy and move
1072
+ // constructors depending on whether T is copy/move constructible
1073
+ template <class T, class E,
1074
+ bool EnableCopy = (is_copy_constructible_or_void<T>::value &&
1075
+ std::is_copy_constructible<E>::value),
1076
+ bool EnableMove = (is_move_constructible_or_void<T>::value &&
1077
+ std::is_move_constructible<E>::value)>
1078
+ struct expected_delete_ctor_base {
1079
+ expected_delete_ctor_base() = default;
1080
+ expected_delete_ctor_base(const expected_delete_ctor_base &) = default;
1081
+ expected_delete_ctor_base(expected_delete_ctor_base &&) noexcept = default;
1082
+ expected_delete_ctor_base &
1083
+ operator=(const expected_delete_ctor_base &) = default;
1084
+ expected_delete_ctor_base &
1085
+ operator=(expected_delete_ctor_base &&) noexcept = default;
1086
+ };
1087
+
1088
+ template <class T, class E>
1089
+ struct expected_delete_ctor_base<T, E, true, false> {
1090
+ expected_delete_ctor_base() = default;
1091
+ expected_delete_ctor_base(const expected_delete_ctor_base &) = default;
1092
+ expected_delete_ctor_base(expected_delete_ctor_base &&) noexcept = delete;
1093
+ expected_delete_ctor_base &
1094
+ operator=(const expected_delete_ctor_base &) = default;
1095
+ expected_delete_ctor_base &
1096
+ operator=(expected_delete_ctor_base &&) noexcept = default;
1097
+ };
1098
+
1099
+ template <class T, class E>
1100
+ struct expected_delete_ctor_base<T, E, false, true> {
1101
+ expected_delete_ctor_base() = default;
1102
+ expected_delete_ctor_base(const expected_delete_ctor_base &) = delete;
1103
+ expected_delete_ctor_base(expected_delete_ctor_base &&) noexcept = default;
1104
+ expected_delete_ctor_base &
1105
+ operator=(const expected_delete_ctor_base &) = default;
1106
+ expected_delete_ctor_base &
1107
+ operator=(expected_delete_ctor_base &&) noexcept = default;
1108
+ };
1109
+
1110
+ template <class T, class E>
1111
+ struct expected_delete_ctor_base<T, E, false, false> {
1112
+ expected_delete_ctor_base() = default;
1113
+ expected_delete_ctor_base(const expected_delete_ctor_base &) = delete;
1114
+ expected_delete_ctor_base(expected_delete_ctor_base &&) noexcept = delete;
1115
+ expected_delete_ctor_base &
1116
+ operator=(const expected_delete_ctor_base &) = default;
1117
+ expected_delete_ctor_base &
1118
+ operator=(expected_delete_ctor_base &&) noexcept = default;
1119
+ };
1120
+
1121
+ // expected_delete_assign_base will conditionally delete copy and move
1122
+ // constructors depending on whether T and E are copy/move constructible +
1123
+ // assignable
1124
+ template <class T, class E,
1125
+ bool EnableCopy = (is_copy_constructible_or_void<T>::value &&
1126
+ std::is_copy_constructible<E>::value &&
1127
+ is_copy_assignable_or_void<T>::value &&
1128
+ std::is_copy_assignable<E>::value),
1129
+ bool EnableMove = (is_move_constructible_or_void<T>::value &&
1130
+ std::is_move_constructible<E>::value &&
1131
+ is_move_assignable_or_void<T>::value &&
1132
+ std::is_move_assignable<E>::value)>
1133
+ struct expected_delete_assign_base {
1134
+ expected_delete_assign_base() = default;
1135
+ expected_delete_assign_base(const expected_delete_assign_base &) = default;
1136
+ expected_delete_assign_base(expected_delete_assign_base &&) noexcept =
1137
+ default;
1138
+ expected_delete_assign_base &
1139
+ operator=(const expected_delete_assign_base &) = default;
1140
+ expected_delete_assign_base &
1141
+ operator=(expected_delete_assign_base &&) noexcept = default;
1142
+ };
1143
+
1144
+ template <class T, class E>
1145
+ struct expected_delete_assign_base<T, E, true, false> {
1146
+ expected_delete_assign_base() = default;
1147
+ expected_delete_assign_base(const expected_delete_assign_base &) = default;
1148
+ expected_delete_assign_base(expected_delete_assign_base &&) noexcept =
1149
+ default;
1150
+ expected_delete_assign_base &
1151
+ operator=(const expected_delete_assign_base &) = default;
1152
+ expected_delete_assign_base &
1153
+ operator=(expected_delete_assign_base &&) noexcept = delete;
1154
+ };
1155
+
1156
+ template <class T, class E>
1157
+ struct expected_delete_assign_base<T, E, false, true> {
1158
+ expected_delete_assign_base() = default;
1159
+ expected_delete_assign_base(const expected_delete_assign_base &) = default;
1160
+ expected_delete_assign_base(expected_delete_assign_base &&) noexcept =
1161
+ default;
1162
+ expected_delete_assign_base &
1163
+ operator=(const expected_delete_assign_base &) = delete;
1164
+ expected_delete_assign_base &
1165
+ operator=(expected_delete_assign_base &&) noexcept = default;
1166
+ };
1167
+
1168
+ template <class T, class E>
1169
+ struct expected_delete_assign_base<T, E, false, false> {
1170
+ expected_delete_assign_base() = default;
1171
+ expected_delete_assign_base(const expected_delete_assign_base &) = default;
1172
+ expected_delete_assign_base(expected_delete_assign_base &&) noexcept =
1173
+ default;
1174
+ expected_delete_assign_base &
1175
+ operator=(const expected_delete_assign_base &) = delete;
1176
+ expected_delete_assign_base &
1177
+ operator=(expected_delete_assign_base &&) noexcept = delete;
1178
+ };
1179
+
1180
+ // This is needed to be able to construct the expected_default_ctor_base which
1181
+ // follows, while still conditionally deleting the default constructor.
1182
+ struct default_constructor_tag {
1183
+ explicit constexpr default_constructor_tag() = default;
1184
+ };
1185
+
1186
+ // expected_default_ctor_base will ensure that expected has a deleted default
1187
+ // consturctor if T is not default constructible.
1188
+ // This specialization is for when T is default constructible
1189
+ template <class T, class E,
1190
+ bool Enable =
1191
+ std::is_default_constructible<T>::value || std::is_void<T>::value>
1192
+ struct expected_default_ctor_base {
1193
+ constexpr expected_default_ctor_base() noexcept = default;
1194
+ constexpr expected_default_ctor_base(
1195
+ expected_default_ctor_base const &) noexcept = default;
1196
+ constexpr expected_default_ctor_base(expected_default_ctor_base &&) noexcept =
1197
+ default;
1198
+ expected_default_ctor_base &
1199
+ operator=(expected_default_ctor_base const &) noexcept = default;
1200
+ expected_default_ctor_base &
1201
+ operator=(expected_default_ctor_base &&) noexcept = default;
1202
+
1203
+ constexpr explicit expected_default_ctor_base(default_constructor_tag) {}
1204
+ };
1205
+
1206
+ // This specialization is for when T is not default constructible
1207
+ template <class T, class E> struct expected_default_ctor_base<T, E, false> {
1208
+ constexpr expected_default_ctor_base() noexcept = delete;
1209
+ constexpr expected_default_ctor_base(
1210
+ expected_default_ctor_base const &) noexcept = default;
1211
+ constexpr expected_default_ctor_base(expected_default_ctor_base &&) noexcept =
1212
+ default;
1213
+ expected_default_ctor_base &
1214
+ operator=(expected_default_ctor_base const &) noexcept = default;
1215
+ expected_default_ctor_base &
1216
+ operator=(expected_default_ctor_base &&) noexcept = default;
1217
+
1218
+ constexpr explicit expected_default_ctor_base(default_constructor_tag) {}
1219
+ };
1220
+ } // namespace detail
1221
+
1222
+ template <class E> class bad_expected_access : public std::exception {
1223
+ public:
1224
+ explicit bad_expected_access(E e) : m_val(std::move(e)) {}
1225
+
1226
+ virtual const char *what() const noexcept override {
1227
+ return "Bad expected access";
1228
+ }
1229
+
1230
+ const E &error() const & { return m_val; }
1231
+ E &error() & { return m_val; }
1232
+ const E &&error() const && { return std::move(m_val); }
1233
+ E &&error() && { return std::move(m_val); }
1234
+
1235
+ private:
1236
+ E m_val;
1237
+ };
1238
+
1239
+ /// An `expected<T, E>` object is an object that contains the storage for
1240
+ /// another object and manages the lifetime of this contained object `T`.
1241
+ /// Alternatively it could contain the storage for another unexpected object
1242
+ /// `E`. The contained object may not be initialized after the expected object
1243
+ /// has been initialized, and may not be destroyed before the expected object
1244
+ /// has been destroyed. The initialization state of the contained object is
1245
+ /// tracked by the expected object.
1246
+ template <class T, class E>
1247
+ class expected : private detail::expected_move_assign_base<T, E>,
1248
+ private detail::expected_delete_ctor_base<T, E>,
1249
+ private detail::expected_delete_assign_base<T, E>,
1250
+ private detail::expected_default_ctor_base<T, E> {
1251
+ static_assert(!std::is_reference<T>::value, "T must not be a reference");
1252
+ static_assert(!std::is_same<T, std::remove_cv<in_place_t>::type>::value,
1253
+ "T must not be in_place_t");
1254
+ static_assert(!std::is_same<T, std::remove_cv<unexpect_t>::type>::value,
1255
+ "T must not be unexpect_t");
1256
+ static_assert(
1257
+ !std::is_same<T, typename std::remove_cv<unexpected<E>>::type>::value,
1258
+ "T must not be unexpected<E>");
1259
+ static_assert(!std::is_reference<E>::value, "E must not be a reference");
1260
+
1261
+ T *valptr() { return std::addressof(this->m_val); }
1262
+ const T *valptr() const { return std::addressof(this->m_val); }
1263
+ unexpected<E> *errptr() { return std::addressof(this->m_unexpect); }
1264
+ const unexpected<E> *errptr() const {
1265
+ return std::addressof(this->m_unexpect);
1266
+ }
1267
+
1268
+ template <class U = T,
1269
+ detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
1270
+ TL_EXPECTED_11_CONSTEXPR U &val() {
1271
+ return this->m_val;
1272
+ }
1273
+ TL_EXPECTED_11_CONSTEXPR unexpected<E> &err() { return this->m_unexpect; }
1274
+
1275
+ template <class U = T,
1276
+ detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
1277
+ constexpr const U &val() const {
1278
+ return this->m_val;
1279
+ }
1280
+ constexpr const unexpected<E> &err() const { return this->m_unexpect; }
1281
+
1282
+ using impl_base = detail::expected_move_assign_base<T, E>;
1283
+ using ctor_base = detail::expected_default_ctor_base<T, E>;
1284
+
1285
+ public:
1286
+ typedef T value_type;
1287
+ typedef E error_type;
1288
+ typedef unexpected<E> unexpected_type;
1289
+
1290
+ #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
1291
+ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
1292
+ template <class F> TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) & {
1293
+ return and_then_impl(*this, std::forward<F>(f));
1294
+ }
1295
+ template <class F> TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) && {
1296
+ return and_then_impl(std::move(*this), std::forward<F>(f));
1297
+ }
1298
+ template <class F> constexpr auto and_then(F &&f) const & {
1299
+ return and_then_impl(*this, std::forward<F>(f));
1300
+ }
1301
+
1302
+ #ifndef TL_EXPECTED_NO_CONSTRR
1303
+ template <class F> constexpr auto and_then(F &&f) const && {
1304
+ return and_then_impl(std::move(*this), std::forward<F>(f));
1305
+ }
1306
+ #endif
1307
+
1308
+ #else
1309
+ template <class F>
1310
+ TL_EXPECTED_11_CONSTEXPR auto
1311
+ and_then(F &&f) & -> decltype(and_then_impl(std::declval<expected &>(),
1312
+ std::forward<F>(f))) {
1313
+ return and_then_impl(*this, std::forward<F>(f));
1314
+ }
1315
+ template <class F>
1316
+ TL_EXPECTED_11_CONSTEXPR auto
1317
+ and_then(F &&f) && -> decltype(and_then_impl(std::declval<expected &&>(),
1318
+ std::forward<F>(f))) {
1319
+ return and_then_impl(std::move(*this), std::forward<F>(f));
1320
+ }
1321
+ template <class F>
1322
+ constexpr auto and_then(F &&f) const & -> decltype(and_then_impl(
1323
+ std::declval<expected const &>(), std::forward<F>(f))) {
1324
+ return and_then_impl(*this, std::forward<F>(f));
1325
+ }
1326
+
1327
+ #ifndef TL_EXPECTED_NO_CONSTRR
1328
+ template <class F>
1329
+ constexpr auto and_then(F &&f) const && -> decltype(and_then_impl(
1330
+ std::declval<expected const &&>(), std::forward<F>(f))) {
1331
+ return and_then_impl(std::move(*this), std::forward<F>(f));
1332
+ }
1333
+ #endif
1334
+ #endif
1335
+
1336
+ #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
1337
+ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
1338
+ template <class F> TL_EXPECTED_11_CONSTEXPR auto map(F &&f) & {
1339
+ return expected_map_impl(*this, std::forward<F>(f));
1340
+ }
1341
+ template <class F> TL_EXPECTED_11_CONSTEXPR auto map(F &&f) && {
1342
+ return expected_map_impl(std::move(*this), std::forward<F>(f));
1343
+ }
1344
+ template <class F> constexpr auto map(F &&f) const & {
1345
+ return expected_map_impl(*this, std::forward<F>(f));
1346
+ }
1347
+ template <class F> constexpr auto map(F &&f) const && {
1348
+ return expected_map_impl(std::move(*this), std::forward<F>(f));
1349
+ }
1350
+ #else
1351
+ template <class F>
1352
+ TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(
1353
+ std::declval<expected &>(), std::declval<F &&>()))
1354
+ map(F &&f) & {
1355
+ return expected_map_impl(*this, std::forward<F>(f));
1356
+ }
1357
+ template <class F>
1358
+ TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval<expected>(),
1359
+ std::declval<F &&>()))
1360
+ map(F &&f) && {
1361
+ return expected_map_impl(std::move(*this), std::forward<F>(f));
1362
+ }
1363
+ template <class F>
1364
+ constexpr decltype(expected_map_impl(std::declval<const expected &>(),
1365
+ std::declval<F &&>()))
1366
+ map(F &&f) const & {
1367
+ return expected_map_impl(*this, std::forward<F>(f));
1368
+ }
1369
+
1370
+ #ifndef TL_EXPECTED_NO_CONSTRR
1371
+ template <class F>
1372
+ constexpr decltype(expected_map_impl(std::declval<const expected &&>(),
1373
+ std::declval<F &&>()))
1374
+ map(F &&f) const && {
1375
+ return expected_map_impl(std::move(*this), std::forward<F>(f));
1376
+ }
1377
+ #endif
1378
+ #endif
1379
+
1380
+ #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
1381
+ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
1382
+ template <class F> TL_EXPECTED_11_CONSTEXPR auto transform(F &&f) & {
1383
+ return expected_map_impl(*this, std::forward<F>(f));
1384
+ }
1385
+ template <class F> TL_EXPECTED_11_CONSTEXPR auto transform(F &&f) && {
1386
+ return expected_map_impl(std::move(*this), std::forward<F>(f));
1387
+ }
1388
+ template <class F> constexpr auto transform(F &&f) const & {
1389
+ return expected_map_impl(*this, std::forward<F>(f));
1390
+ }
1391
+ template <class F> constexpr auto transform(F &&f) const && {
1392
+ return expected_map_impl(std::move(*this), std::forward<F>(f));
1393
+ }
1394
+ #else
1395
+ template <class F>
1396
+ TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(
1397
+ std::declval<expected &>(), std::declval<F &&>()))
1398
+ transform(F &&f) & {
1399
+ return expected_map_impl(*this, std::forward<F>(f));
1400
+ }
1401
+ template <class F>
1402
+ TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval<expected>(),
1403
+ std::declval<F &&>()))
1404
+ transform(F &&f) && {
1405
+ return expected_map_impl(std::move(*this), std::forward<F>(f));
1406
+ }
1407
+ template <class F>
1408
+ constexpr decltype(expected_map_impl(std::declval<const expected &>(),
1409
+ std::declval<F &&>()))
1410
+ transform(F &&f) const & {
1411
+ return expected_map_impl(*this, std::forward<F>(f));
1412
+ }
1413
+
1414
+ #ifndef TL_EXPECTED_NO_CONSTRR
1415
+ template <class F>
1416
+ constexpr decltype(expected_map_impl(std::declval<const expected &&>(),
1417
+ std::declval<F &&>()))
1418
+ transform(F &&f) const && {
1419
+ return expected_map_impl(std::move(*this), std::forward<F>(f));
1420
+ }
1421
+ #endif
1422
+ #endif
1423
+
1424
+ #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
1425
+ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
1426
+ template <class F> TL_EXPECTED_11_CONSTEXPR auto map_error(F &&f) & {
1427
+ return map_error_impl(*this, std::forward<F>(f));
1428
+ }
1429
+ template <class F> TL_EXPECTED_11_CONSTEXPR auto map_error(F &&f) && {
1430
+ return map_error_impl(std::move(*this), std::forward<F>(f));
1431
+ }
1432
+ template <class F> constexpr auto map_error(F &&f) const & {
1433
+ return map_error_impl(*this, std::forward<F>(f));
1434
+ }
1435
+ template <class F> constexpr auto map_error(F &&f) const && {
1436
+ return map_error_impl(std::move(*this), std::forward<F>(f));
1437
+ }
1438
+ #else
1439
+ template <class F>
1440
+ TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &>(),
1441
+ std::declval<F &&>()))
1442
+ map_error(F &&f) & {
1443
+ return map_error_impl(*this, std::forward<F>(f));
1444
+ }
1445
+ template <class F>
1446
+ TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &&>(),
1447
+ std::declval<F &&>()))
1448
+ map_error(F &&f) && {
1449
+ return map_error_impl(std::move(*this), std::forward<F>(f));
1450
+ }
1451
+ template <class F>
1452
+ constexpr decltype(map_error_impl(std::declval<const expected &>(),
1453
+ std::declval<F &&>()))
1454
+ map_error(F &&f) const & {
1455
+ return map_error_impl(*this, std::forward<F>(f));
1456
+ }
1457
+
1458
+ #ifndef TL_EXPECTED_NO_CONSTRR
1459
+ template <class F>
1460
+ constexpr decltype(map_error_impl(std::declval<const expected &&>(),
1461
+ std::declval<F &&>()))
1462
+ map_error(F &&f) const && {
1463
+ return map_error_impl(std::move(*this), std::forward<F>(f));
1464
+ }
1465
+ #endif
1466
+ #endif
1467
+ #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
1468
+ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
1469
+ template <class F> TL_EXPECTED_11_CONSTEXPR auto transform_error(F &&f) & {
1470
+ return map_error_impl(*this, std::forward<F>(f));
1471
+ }
1472
+ template <class F> TL_EXPECTED_11_CONSTEXPR auto transform_error(F &&f) && {
1473
+ return map_error_impl(std::move(*this), std::forward<F>(f));
1474
+ }
1475
+ template <class F> constexpr auto transform_error(F &&f) const & {
1476
+ return map_error_impl(*this, std::forward<F>(f));
1477
+ }
1478
+ template <class F> constexpr auto transform_error(F &&f) const && {
1479
+ return map_error_impl(std::move(*this), std::forward<F>(f));
1480
+ }
1481
+ #else
1482
+ template <class F>
1483
+ TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &>(),
1484
+ std::declval<F &&>()))
1485
+ transform_error(F &&f) & {
1486
+ return map_error_impl(*this, std::forward<F>(f));
1487
+ }
1488
+ template <class F>
1489
+ TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &&>(),
1490
+ std::declval<F &&>()))
1491
+ transform_error(F &&f) && {
1492
+ return map_error_impl(std::move(*this), std::forward<F>(f));
1493
+ }
1494
+ template <class F>
1495
+ constexpr decltype(map_error_impl(std::declval<const expected &>(),
1496
+ std::declval<F &&>()))
1497
+ transform_error(F &&f) const & {
1498
+ return map_error_impl(*this, std::forward<F>(f));
1499
+ }
1500
+
1501
+ #ifndef TL_EXPECTED_NO_CONSTRR
1502
+ template <class F>
1503
+ constexpr decltype(map_error_impl(std::declval<const expected &&>(),
1504
+ std::declval<F &&>()))
1505
+ transform_error(F &&f) const && {
1506
+ return map_error_impl(std::move(*this), std::forward<F>(f));
1507
+ }
1508
+ #endif
1509
+ #endif
1510
+ template <class F> expected TL_EXPECTED_11_CONSTEXPR or_else(F &&f) & {
1511
+ return or_else_impl(*this, std::forward<F>(f));
1512
+ }
1513
+
1514
+ template <class F> expected TL_EXPECTED_11_CONSTEXPR or_else(F &&f) && {
1515
+ return or_else_impl(std::move(*this), std::forward<F>(f));
1516
+ }
1517
+
1518
+ template <class F> expected constexpr or_else(F &&f) const & {
1519
+ return or_else_impl(*this, std::forward<F>(f));
1520
+ }
1521
+
1522
+ #ifndef TL_EXPECTED_NO_CONSTRR
1523
+ template <class F> expected constexpr or_else(F &&f) const && {
1524
+ return or_else_impl(std::move(*this), std::forward<F>(f));
1525
+ }
1526
+ #endif
1527
+ constexpr expected() = default;
1528
+ constexpr expected(const expected &rhs) = default;
1529
+ constexpr expected(expected &&rhs) = default;
1530
+ expected &operator=(const expected &rhs) = default;
1531
+ expected &operator=(expected &&rhs) = default;
1532
+
1533
+ template <class... Args,
1534
+ detail::enable_if_t<std::is_constructible<T, Args &&...>::value> * =
1535
+ nullptr>
1536
+ constexpr expected(in_place_t, Args &&...args)
1537
+ : impl_base(in_place, std::forward<Args>(args)...),
1538
+ ctor_base(detail::default_constructor_tag{}) {}
1539
+
1540
+ template <class U, class... Args,
1541
+ detail::enable_if_t<std::is_constructible<
1542
+ T, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
1543
+ constexpr expected(in_place_t, std::initializer_list<U> il, Args &&...args)
1544
+ : impl_base(in_place, il, std::forward<Args>(args)...),
1545
+ ctor_base(detail::default_constructor_tag{}) {}
1546
+
1547
+ template <class G = E,
1548
+ detail::enable_if_t<std::is_constructible<E, const G &>::value> * =
1549
+ nullptr,
1550
+ detail::enable_if_t<!std::is_convertible<const G &, E>::value> * =
1551
+ nullptr>
1552
+ explicit constexpr expected(const unexpected<G> &e)
1553
+ : impl_base(unexpect, e.value()),
1554
+ ctor_base(detail::default_constructor_tag{}) {}
1555
+
1556
+ template <
1557
+ class G = E,
1558
+ detail::enable_if_t<std::is_constructible<E, const G &>::value> * =
1559
+ nullptr,
1560
+ detail::enable_if_t<std::is_convertible<const G &, E>::value> * = nullptr>
1561
+ constexpr expected(unexpected<G> const &e)
1562
+ : impl_base(unexpect, e.value()),
1563
+ ctor_base(detail::default_constructor_tag{}) {}
1564
+
1565
+ template <
1566
+ class G = E,
1567
+ detail::enable_if_t<std::is_constructible<E, G &&>::value> * = nullptr,
1568
+ detail::enable_if_t<!std::is_convertible<G &&, E>::value> * = nullptr>
1569
+ explicit constexpr expected(unexpected<G> &&e) noexcept(
1570
+ std::is_nothrow_constructible<E, G &&>::value)
1571
+ : impl_base(unexpect, std::move(e.value())),
1572
+ ctor_base(detail::default_constructor_tag{}) {}
1573
+
1574
+ template <
1575
+ class G = E,
1576
+ detail::enable_if_t<std::is_constructible<E, G &&>::value> * = nullptr,
1577
+ detail::enable_if_t<std::is_convertible<G &&, E>::value> * = nullptr>
1578
+ constexpr expected(unexpected<G> &&e) noexcept(
1579
+ std::is_nothrow_constructible<E, G &&>::value)
1580
+ : impl_base(unexpect, std::move(e.value())),
1581
+ ctor_base(detail::default_constructor_tag{}) {}
1582
+
1583
+ template <class... Args,
1584
+ detail::enable_if_t<std::is_constructible<E, Args &&...>::value> * =
1585
+ nullptr>
1586
+ constexpr explicit expected(unexpect_t, Args &&...args)
1587
+ : impl_base(unexpect, std::forward<Args>(args)...),
1588
+ ctor_base(detail::default_constructor_tag{}) {}
1589
+
1590
+ template <class U, class... Args,
1591
+ detail::enable_if_t<std::is_constructible<
1592
+ E, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
1593
+ constexpr explicit expected(unexpect_t, std::initializer_list<U> il,
1594
+ Args &&...args)
1595
+ : impl_base(unexpect, il, std::forward<Args>(args)...),
1596
+ ctor_base(detail::default_constructor_tag{}) {}
1597
+
1598
+ template <class U, class G,
1599
+ detail::enable_if_t<!(std::is_convertible<U const &, T>::value &&
1600
+ std::is_convertible<G const &, E>::value)> * =
1601
+ nullptr,
1602
+ detail::expected_enable_from_other<T, E, U, G, const U &, const G &>
1603
+ * = nullptr>
1604
+ explicit TL_EXPECTED_11_CONSTEXPR expected(const expected<U, G> &rhs)
1605
+ : ctor_base(detail::default_constructor_tag{}) {
1606
+ if (rhs.has_value()) {
1607
+ this->construct(*rhs);
1608
+ } else {
1609
+ this->construct_error(rhs.error());
1610
+ }
1611
+ }
1612
+
1613
+ template <class U, class G,
1614
+ detail::enable_if_t<(std::is_convertible<U const &, T>::value &&
1615
+ std::is_convertible<G const &, E>::value)> * =
1616
+ nullptr,
1617
+ detail::expected_enable_from_other<T, E, U, G, const U &, const G &>
1618
+ * = nullptr>
1619
+ TL_EXPECTED_11_CONSTEXPR expected(const expected<U, G> &rhs)
1620
+ : ctor_base(detail::default_constructor_tag{}) {
1621
+ if (rhs.has_value()) {
1622
+ this->construct(*rhs);
1623
+ } else {
1624
+ this->construct_error(rhs.error());
1625
+ }
1626
+ }
1627
+
1628
+ template <
1629
+ class U, class G,
1630
+ detail::enable_if_t<!(std::is_convertible<U &&, T>::value &&
1631
+ std::is_convertible<G &&, E>::value)> * = nullptr,
1632
+ detail::expected_enable_from_other<T, E, U, G, U &&, G &&> * = nullptr>
1633
+ explicit TL_EXPECTED_11_CONSTEXPR expected(expected<U, G> &&rhs)
1634
+ : ctor_base(detail::default_constructor_tag{}) {
1635
+ if (rhs.has_value()) {
1636
+ this->construct(std::move(*rhs));
1637
+ } else {
1638
+ this->construct_error(std::move(rhs.error()));
1639
+ }
1640
+ }
1641
+
1642
+ template <
1643
+ class U, class G,
1644
+ detail::enable_if_t<(std::is_convertible<U &&, T>::value &&
1645
+ std::is_convertible<G &&, E>::value)> * = nullptr,
1646
+ detail::expected_enable_from_other<T, E, U, G, U &&, G &&> * = nullptr>
1647
+ TL_EXPECTED_11_CONSTEXPR expected(expected<U, G> &&rhs)
1648
+ : ctor_base(detail::default_constructor_tag{}) {
1649
+ if (rhs.has_value()) {
1650
+ this->construct(std::move(*rhs));
1651
+ } else {
1652
+ this->construct_error(std::move(rhs.error()));
1653
+ }
1654
+ }
1655
+
1656
+ template <
1657
+ class U = T,
1658
+ detail::enable_if_t<!std::is_convertible<U &&, T>::value> * = nullptr,
1659
+ detail::expected_enable_forward_value<T, E, U> * = nullptr>
1660
+ explicit TL_EXPECTED_MSVC2015_CONSTEXPR expected(U &&v)
1661
+ : expected(in_place, std::forward<U>(v)) {}
1662
+
1663
+ template <
1664
+ class U = T,
1665
+ detail::enable_if_t<std::is_convertible<U &&, T>::value> * = nullptr,
1666
+ detail::expected_enable_forward_value<T, E, U> * = nullptr>
1667
+ TL_EXPECTED_MSVC2015_CONSTEXPR expected(U &&v)
1668
+ : expected(in_place, std::forward<U>(v)) {}
1669
+
1670
+ template <
1671
+ class U = T, class G = T,
1672
+ detail::enable_if_t<std::is_nothrow_constructible<T, U &&>::value> * =
1673
+ nullptr,
1674
+ detail::enable_if_t<!std::is_void<G>::value> * = nullptr,
1675
+ detail::enable_if_t<
1676
+ (!std::is_same<expected<T, E>, detail::decay_t<U>>::value &&
1677
+ !detail::conjunction<std::is_scalar<T>,
1678
+ std::is_same<T, detail::decay_t<U>>>::value &&
1679
+ std::is_constructible<T, U>::value &&
1680
+ std::is_assignable<G &, U>::value &&
1681
+ std::is_nothrow_move_constructible<E>::value)> * = nullptr>
1682
+ expected &operator=(U &&v) {
1683
+ if (has_value()) {
1684
+ val() = std::forward<U>(v);
1685
+ } else {
1686
+ err().~unexpected<E>();
1687
+ ::new (valptr()) T(std::forward<U>(v));
1688
+ this->m_has_val = true;
1689
+ }
1690
+
1691
+ return *this;
1692
+ }
1693
+
1694
+ template <
1695
+ class U = T, class G = T,
1696
+ detail::enable_if_t<!std::is_nothrow_constructible<T, U &&>::value> * =
1697
+ nullptr,
1698
+ detail::enable_if_t<!std::is_void<U>::value> * = nullptr,
1699
+ detail::enable_if_t<
1700
+ (!std::is_same<expected<T, E>, detail::decay_t<U>>::value &&
1701
+ !detail::conjunction<std::is_scalar<T>,
1702
+ std::is_same<T, detail::decay_t<U>>>::value &&
1703
+ std::is_constructible<T, U>::value &&
1704
+ std::is_assignable<G &, U>::value &&
1705
+ std::is_nothrow_move_constructible<E>::value)> * = nullptr>
1706
+ expected &operator=(U &&v) {
1707
+ if (has_value()) {
1708
+ val() = std::forward<U>(v);
1709
+ } else {
1710
+ auto tmp = std::move(err());
1711
+ err().~unexpected<E>();
1712
+
1713
+ #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
1714
+ try {
1715
+ ::new (valptr()) T(std::forward<U>(v));
1716
+ this->m_has_val = true;
1717
+ } catch (...) {
1718
+ err() = std::move(tmp);
1719
+ throw;
1720
+ }
1721
+ #else
1722
+ ::new (valptr()) T(std::forward<U>(v));
1723
+ this->m_has_val = true;
1724
+ #endif
1725
+ }
1726
+
1727
+ return *this;
1728
+ }
1729
+
1730
+ template <class G = E,
1731
+ detail::enable_if_t<std::is_nothrow_copy_constructible<G>::value &&
1732
+ std::is_assignable<G &, G>::value> * = nullptr>
1733
+ expected &operator=(const unexpected<G> &rhs) {
1734
+ if (!has_value()) {
1735
+ err() = rhs;
1736
+ } else {
1737
+ this->destroy_val();
1738
+ ::new (errptr()) unexpected<E>(rhs);
1739
+ this->m_has_val = false;
1740
+ }
1741
+
1742
+ return *this;
1743
+ }
1744
+
1745
+ template <class G = E,
1746
+ detail::enable_if_t<std::is_nothrow_move_constructible<G>::value &&
1747
+ std::is_move_assignable<G>::value> * = nullptr>
1748
+ expected &operator=(unexpected<G> &&rhs) noexcept {
1749
+ if (!has_value()) {
1750
+ err() = std::move(rhs);
1751
+ } else {
1752
+ this->destroy_val();
1753
+ ::new (errptr()) unexpected<E>(std::move(rhs));
1754
+ this->m_has_val = false;
1755
+ }
1756
+
1757
+ return *this;
1758
+ }
1759
+
1760
+ template <class... Args, detail::enable_if_t<std::is_nothrow_constructible<
1761
+ T, Args &&...>::value> * = nullptr>
1762
+ void emplace(Args &&...args) {
1763
+ if (has_value()) {
1764
+ val().~T();
1765
+ } else {
1766
+ err().~unexpected<E>();
1767
+ this->m_has_val = true;
1768
+ }
1769
+ ::new (valptr()) T(std::forward<Args>(args)...);
1770
+ }
1771
+
1772
+ template <class... Args, detail::enable_if_t<!std::is_nothrow_constructible<
1773
+ T, Args &&...>::value> * = nullptr>
1774
+ void emplace(Args &&...args) {
1775
+ if (has_value()) {
1776
+ val().~T();
1777
+ ::new (valptr()) T(std::forward<Args>(args)...);
1778
+ } else {
1779
+ auto tmp = std::move(err());
1780
+ err().~unexpected<E>();
1781
+
1782
+ #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
1783
+ try {
1784
+ ::new (valptr()) T(std::forward<Args>(args)...);
1785
+ this->m_has_val = true;
1786
+ } catch (...) {
1787
+ err() = std::move(tmp);
1788
+ throw;
1789
+ }
1790
+ #else
1791
+ ::new (valptr()) T(std::forward<Args>(args)...);
1792
+ this->m_has_val = true;
1793
+ #endif
1794
+ }
1795
+ }
1796
+
1797
+ template <class U, class... Args,
1798
+ detail::enable_if_t<std::is_nothrow_constructible<
1799
+ T, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
1800
+ void emplace(std::initializer_list<U> il, Args &&...args) {
1801
+ if (has_value()) {
1802
+ T t(il, std::forward<Args>(args)...);
1803
+ val() = std::move(t);
1804
+ } else {
1805
+ err().~unexpected<E>();
1806
+ ::new (valptr()) T(il, std::forward<Args>(args)...);
1807
+ this->m_has_val = true;
1808
+ }
1809
+ }
1810
+
1811
+ template <class U, class... Args,
1812
+ detail::enable_if_t<!std::is_nothrow_constructible<
1813
+ T, std::initializer_list<U> &, Args &&...>::value> * = nullptr>
1814
+ void emplace(std::initializer_list<U> il, Args &&...args) {
1815
+ if (has_value()) {
1816
+ T t(il, std::forward<Args>(args)...);
1817
+ val() = std::move(t);
1818
+ } else {
1819
+ auto tmp = std::move(err());
1820
+ err().~unexpected<E>();
1821
+
1822
+ #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
1823
+ try {
1824
+ ::new (valptr()) T(il, std::forward<Args>(args)...);
1825
+ this->m_has_val = true;
1826
+ } catch (...) {
1827
+ err() = std::move(tmp);
1828
+ throw;
1829
+ }
1830
+ #else
1831
+ ::new (valptr()) T(il, std::forward<Args>(args)...);
1832
+ this->m_has_val = true;
1833
+ #endif
1834
+ }
1835
+ }
1836
+
1837
+ private:
1838
+ using t_is_void = std::true_type;
1839
+ using t_is_not_void = std::false_type;
1840
+ using t_is_nothrow_move_constructible = std::true_type;
1841
+ using move_constructing_t_can_throw = std::false_type;
1842
+ using e_is_nothrow_move_constructible = std::true_type;
1843
+ using move_constructing_e_can_throw = std::false_type;
1844
+
1845
+ void swap_where_both_have_value(expected & /*rhs*/, t_is_void) noexcept {
1846
+ // swapping void is a no-op
1847
+ }
1848
+
1849
+ void swap_where_both_have_value(expected &rhs, t_is_not_void) {
1850
+ using std::swap;
1851
+ swap(val(), rhs.val());
1852
+ }
1853
+
1854
+ void swap_where_only_one_has_value(expected &rhs, t_is_void) noexcept(
1855
+ std::is_nothrow_move_constructible<E>::value) {
1856
+ ::new (errptr()) unexpected_type(std::move(rhs.err()));
1857
+ rhs.err().~unexpected_type();
1858
+ std::swap(this->m_has_val, rhs.m_has_val);
1859
+ }
1860
+
1861
+ void swap_where_only_one_has_value(expected &rhs, t_is_not_void) {
1862
+ swap_where_only_one_has_value_and_t_is_not_void(
1863
+ rhs, typename std::is_nothrow_move_constructible<T>::type{},
1864
+ typename std::is_nothrow_move_constructible<E>::type{});
1865
+ }
1866
+
1867
+ void swap_where_only_one_has_value_and_t_is_not_void(
1868
+ expected &rhs, t_is_nothrow_move_constructible,
1869
+ e_is_nothrow_move_constructible) noexcept {
1870
+ auto temp = std::move(val());
1871
+ val().~T();
1872
+ ::new (errptr()) unexpected_type(std::move(rhs.err()));
1873
+ rhs.err().~unexpected_type();
1874
+ ::new (rhs.valptr()) T(std::move(temp));
1875
+ std::swap(this->m_has_val, rhs.m_has_val);
1876
+ }
1877
+
1878
+ void swap_where_only_one_has_value_and_t_is_not_void(
1879
+ expected &rhs, t_is_nothrow_move_constructible,
1880
+ move_constructing_e_can_throw) {
1881
+ auto temp = std::move(val());
1882
+ val().~T();
1883
+ #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
1884
+ try {
1885
+ ::new (errptr()) unexpected_type(std::move(rhs.err()));
1886
+ rhs.err().~unexpected_type();
1887
+ ::new (rhs.valptr()) T(std::move(temp));
1888
+ std::swap(this->m_has_val, rhs.m_has_val);
1889
+ } catch (...) {
1890
+ val() = std::move(temp);
1891
+ throw;
1892
+ }
1893
+ #else
1894
+ ::new (errptr()) unexpected_type(std::move(rhs.err()));
1895
+ rhs.err().~unexpected_type();
1896
+ ::new (rhs.valptr()) T(std::move(temp));
1897
+ std::swap(this->m_has_val, rhs.m_has_val);
1898
+ #endif
1899
+ }
1900
+
1901
+ void swap_where_only_one_has_value_and_t_is_not_void(
1902
+ expected &rhs, move_constructing_t_can_throw,
1903
+ e_is_nothrow_move_constructible) {
1904
+ auto temp = std::move(rhs.err());
1905
+ rhs.err().~unexpected_type();
1906
+ #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
1907
+ try {
1908
+ ::new (rhs.valptr()) T(std::move(val()));
1909
+ val().~T();
1910
+ ::new (errptr()) unexpected_type(std::move(temp));
1911
+ std::swap(this->m_has_val, rhs.m_has_val);
1912
+ } catch (...) {
1913
+ rhs.err() = std::move(temp);
1914
+ throw;
1915
+ }
1916
+ #else
1917
+ ::new (rhs.valptr()) T(std::move(val()));
1918
+ val().~T();
1919
+ ::new (errptr()) unexpected_type(std::move(temp));
1920
+ std::swap(this->m_has_val, rhs.m_has_val);
1921
+ #endif
1922
+ }
1923
+
1924
+ public:
1925
+ template <class OT = T, class OE = E>
1926
+ detail::enable_if_t<detail::is_swappable<OT>::value &&
1927
+ detail::is_swappable<OE>::value &&
1928
+ (std::is_nothrow_move_constructible<OT>::value ||
1929
+ std::is_nothrow_move_constructible<OE>::value)>
1930
+ swap(expected &rhs) noexcept(
1931
+ std::is_nothrow_move_constructible<T>::value
1932
+ &&detail::is_nothrow_swappable<T>::value
1933
+ &&std::is_nothrow_move_constructible<E>::value
1934
+ &&detail::is_nothrow_swappable<E>::value) {
1935
+ if (has_value() && rhs.has_value()) {
1936
+ swap_where_both_have_value(rhs, typename std::is_void<T>::type{});
1937
+ } else if (!has_value() && rhs.has_value()) {
1938
+ rhs.swap(*this);
1939
+ } else if (has_value()) {
1940
+ swap_where_only_one_has_value(rhs, typename std::is_void<T>::type{});
1941
+ } else {
1942
+ using std::swap;
1943
+ swap(err(), rhs.err());
1944
+ }
1945
+ }
1946
+
1947
+ constexpr const T *operator->() const {
1948
+ TL_ASSERT(has_value());
1949
+ return valptr();
1950
+ }
1951
+ TL_EXPECTED_11_CONSTEXPR T *operator->() {
1952
+ TL_ASSERT(has_value());
1953
+ return valptr();
1954
+ }
1955
+
1956
+ template <class U = T,
1957
+ detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
1958
+ constexpr const U &operator*() const & {
1959
+ TL_ASSERT(has_value());
1960
+ return val();
1961
+ }
1962
+ template <class U = T,
1963
+ detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
1964
+ TL_EXPECTED_11_CONSTEXPR U &operator*() & {
1965
+ TL_ASSERT(has_value());
1966
+ return val();
1967
+ }
1968
+ template <class U = T,
1969
+ detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
1970
+ constexpr const U &&operator*() const && {
1971
+ TL_ASSERT(has_value());
1972
+ return std::move(val());
1973
+ }
1974
+ template <class U = T,
1975
+ detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
1976
+ TL_EXPECTED_11_CONSTEXPR U &&operator*() && {
1977
+ TL_ASSERT(has_value());
1978
+ return std::move(val());
1979
+ }
1980
+
1981
+ constexpr bool has_value() const noexcept { return this->m_has_val; }
1982
+ constexpr explicit operator bool() const noexcept { return this->m_has_val; }
1983
+
1984
+ template <class U = T,
1985
+ detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
1986
+ TL_EXPECTED_11_CONSTEXPR const U &value() const & {
1987
+ if (!has_value())
1988
+ detail::throw_exception(bad_expected_access<E>(err().value()));
1989
+ return val();
1990
+ }
1991
+ template <class U = T,
1992
+ detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
1993
+ TL_EXPECTED_11_CONSTEXPR U &value() & {
1994
+ if (!has_value())
1995
+ detail::throw_exception(bad_expected_access<E>(err().value()));
1996
+ return val();
1997
+ }
1998
+ template <class U = T,
1999
+ detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
2000
+ TL_EXPECTED_11_CONSTEXPR const U &&value() const && {
2001
+ if (!has_value())
2002
+ detail::throw_exception(bad_expected_access<E>(std::move(err()).value()));
2003
+ return std::move(val());
2004
+ }
2005
+ template <class U = T,
2006
+ detail::enable_if_t<!std::is_void<U>::value> * = nullptr>
2007
+ TL_EXPECTED_11_CONSTEXPR U &&value() && {
2008
+ if (!has_value())
2009
+ detail::throw_exception(bad_expected_access<E>(std::move(err()).value()));
2010
+ return std::move(val());
2011
+ }
2012
+
2013
+ constexpr const E &error() const & {
2014
+ TL_ASSERT(!has_value());
2015
+ return err().value();
2016
+ }
2017
+ TL_EXPECTED_11_CONSTEXPR E &error() & {
2018
+ TL_ASSERT(!has_value());
2019
+ return err().value();
2020
+ }
2021
+ constexpr const E &&error() const && {
2022
+ TL_ASSERT(!has_value());
2023
+ return std::move(err().value());
2024
+ }
2025
+ TL_EXPECTED_11_CONSTEXPR E &&error() && {
2026
+ TL_ASSERT(!has_value());
2027
+ return std::move(err().value());
2028
+ }
2029
+
2030
+ template <class U> constexpr T value_or(U &&v) const & {
2031
+ static_assert(std::is_copy_constructible<T>::value &&
2032
+ std::is_convertible<U &&, T>::value,
2033
+ "T must be copy-constructible and convertible to from U&&");
2034
+ return bool(*this) ? **this : static_cast<T>(std::forward<U>(v));
2035
+ }
2036
+ template <class U> TL_EXPECTED_11_CONSTEXPR T value_or(U &&v) && {
2037
+ static_assert(std::is_move_constructible<T>::value &&
2038
+ std::is_convertible<U &&, T>::value,
2039
+ "T must be move-constructible and convertible to from U&&");
2040
+ return bool(*this) ? std::move(**this) : static_cast<T>(std::forward<U>(v));
2041
+ }
2042
+ };
2043
+
2044
+ namespace detail {
2045
+ template <class Exp> using exp_t = typename detail::decay_t<Exp>::value_type;
2046
+ template <class Exp> using err_t = typename detail::decay_t<Exp>::error_type;
2047
+ template <class Exp, class Ret> using ret_t = expected<Ret, err_t<Exp>>;
2048
+
2049
+ #ifdef TL_EXPECTED_CXX14
2050
+ template <class Exp, class F,
2051
+ detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
2052
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2053
+ *std::declval<Exp>()))>
2054
+ constexpr auto and_then_impl(Exp &&exp, F &&f) {
2055
+ static_assert(detail::is_expected<Ret>::value, "F must return an expected");
2056
+
2057
+ return exp.has_value()
2058
+ ? detail::invoke(std::forward<F>(f), *std::forward<Exp>(exp))
2059
+ : Ret(unexpect, std::forward<Exp>(exp).error());
2060
+ }
2061
+
2062
+ template <class Exp, class F,
2063
+ detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
2064
+ class Ret = decltype(detail::invoke(std::declval<F>()))>
2065
+ constexpr auto and_then_impl(Exp &&exp, F &&f) {
2066
+ static_assert(detail::is_expected<Ret>::value, "F must return an expected");
2067
+
2068
+ return exp.has_value() ? detail::invoke(std::forward<F>(f))
2069
+ : Ret(unexpect, std::forward<Exp>(exp).error());
2070
+ }
2071
+ #else
2072
+ template <class> struct TC;
2073
+ template <class Exp, class F,
2074
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2075
+ *std::declval<Exp>())),
2076
+ detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr>
2077
+ auto and_then_impl(Exp &&exp, F &&f) -> Ret {
2078
+ static_assert(detail::is_expected<Ret>::value, "F must return an expected");
2079
+
2080
+ return exp.has_value()
2081
+ ? detail::invoke(std::forward<F>(f), *std::forward<Exp>(exp))
2082
+ : Ret(unexpect, std::forward<Exp>(exp).error());
2083
+ }
2084
+
2085
+ template <class Exp, class F,
2086
+ class Ret = decltype(detail::invoke(std::declval<F>())),
2087
+ detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr>
2088
+ constexpr auto and_then_impl(Exp &&exp, F &&f) -> Ret {
2089
+ static_assert(detail::is_expected<Ret>::value, "F must return an expected");
2090
+
2091
+ return exp.has_value() ? detail::invoke(std::forward<F>(f))
2092
+ : Ret(unexpect, std::forward<Exp>(exp).error());
2093
+ }
2094
+ #endif
2095
+
2096
+ #ifdef TL_EXPECTED_CXX14
2097
+ template <class Exp, class F,
2098
+ detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
2099
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2100
+ *std::declval<Exp>())),
2101
+ detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2102
+ constexpr auto expected_map_impl(Exp &&exp, F &&f) {
2103
+ using result = ret_t<Exp, detail::decay_t<Ret>>;
2104
+ return exp.has_value() ? result(detail::invoke(std::forward<F>(f),
2105
+ *std::forward<Exp>(exp)))
2106
+ : result(unexpect, std::forward<Exp>(exp).error());
2107
+ }
2108
+
2109
+ template <class Exp, class F,
2110
+ detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
2111
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2112
+ *std::declval<Exp>())),
2113
+ detail::enable_if_t<std::is_void<Ret>::value> * = nullptr>
2114
+ auto expected_map_impl(Exp &&exp, F &&f) {
2115
+ using result = expected<void, err_t<Exp>>;
2116
+ if (exp.has_value()) {
2117
+ detail::invoke(std::forward<F>(f), *std::forward<Exp>(exp));
2118
+ return result();
2119
+ }
2120
+
2121
+ return result(unexpect, std::forward<Exp>(exp).error());
2122
+ }
2123
+
2124
+ template <class Exp, class F,
2125
+ detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
2126
+ class Ret = decltype(detail::invoke(std::declval<F>())),
2127
+ detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2128
+ constexpr auto expected_map_impl(Exp &&exp, F &&f) {
2129
+ using result = ret_t<Exp, detail::decay_t<Ret>>;
2130
+ return exp.has_value() ? result(detail::invoke(std::forward<F>(f)))
2131
+ : result(unexpect, std::forward<Exp>(exp).error());
2132
+ }
2133
+
2134
+ template <class Exp, class F,
2135
+ detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
2136
+ class Ret = decltype(detail::invoke(std::declval<F>())),
2137
+ detail::enable_if_t<std::is_void<Ret>::value> * = nullptr>
2138
+ auto expected_map_impl(Exp &&exp, F &&f) {
2139
+ using result = expected<void, err_t<Exp>>;
2140
+ if (exp.has_value()) {
2141
+ detail::invoke(std::forward<F>(f));
2142
+ return result();
2143
+ }
2144
+
2145
+ return result(unexpect, std::forward<Exp>(exp).error());
2146
+ }
2147
+ #else
2148
+ template <class Exp, class F,
2149
+ detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
2150
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2151
+ *std::declval<Exp>())),
2152
+ detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2153
+
2154
+ constexpr auto expected_map_impl(Exp &&exp, F &&f)
2155
+ -> ret_t<Exp, detail::decay_t<Ret>> {
2156
+ using result = ret_t<Exp, detail::decay_t<Ret>>;
2157
+
2158
+ return exp.has_value() ? result(detail::invoke(std::forward<F>(f),
2159
+ *std::forward<Exp>(exp)))
2160
+ : result(unexpect, std::forward<Exp>(exp).error());
2161
+ }
2162
+
2163
+ template <class Exp, class F,
2164
+ detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
2165
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2166
+ *std::declval<Exp>())),
2167
+ detail::enable_if_t<std::is_void<Ret>::value> * = nullptr>
2168
+
2169
+ auto expected_map_impl(Exp &&exp, F &&f) -> expected<void, err_t<Exp>> {
2170
+ if (exp.has_value()) {
2171
+ detail::invoke(std::forward<F>(f), *std::forward<Exp>(exp));
2172
+ return {};
2173
+ }
2174
+
2175
+ return unexpected<err_t<Exp>>(std::forward<Exp>(exp).error());
2176
+ }
2177
+
2178
+ template <class Exp, class F,
2179
+ detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
2180
+ class Ret = decltype(detail::invoke(std::declval<F>())),
2181
+ detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2182
+
2183
+ constexpr auto expected_map_impl(Exp &&exp, F &&f)
2184
+ -> ret_t<Exp, detail::decay_t<Ret>> {
2185
+ using result = ret_t<Exp, detail::decay_t<Ret>>;
2186
+
2187
+ return exp.has_value() ? result(detail::invoke(std::forward<F>(f)))
2188
+ : result(unexpect, std::forward<Exp>(exp).error());
2189
+ }
2190
+
2191
+ template <class Exp, class F,
2192
+ detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
2193
+ class Ret = decltype(detail::invoke(std::declval<F>())),
2194
+ detail::enable_if_t<std::is_void<Ret>::value> * = nullptr>
2195
+
2196
+ auto expected_map_impl(Exp &&exp, F &&f) -> expected<void, err_t<Exp>> {
2197
+ if (exp.has_value()) {
2198
+ detail::invoke(std::forward<F>(f));
2199
+ return {};
2200
+ }
2201
+
2202
+ return unexpected<err_t<Exp>>(std::forward<Exp>(exp).error());
2203
+ }
2204
+ #endif
2205
+
2206
+ #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
2207
+ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
2208
+ template <class Exp, class F,
2209
+ detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
2210
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2211
+ std::declval<Exp>().error())),
2212
+ detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2213
+ constexpr auto map_error_impl(Exp &&exp, F &&f) {
2214
+ using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
2215
+ return exp.has_value()
2216
+ ? result(*std::forward<Exp>(exp))
2217
+ : result(unexpect, detail::invoke(std::forward<F>(f),
2218
+ std::forward<Exp>(exp).error()));
2219
+ }
2220
+ template <class Exp, class F,
2221
+ detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
2222
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2223
+ std::declval<Exp>().error())),
2224
+ detail::enable_if_t<std::is_void<Ret>::value> * = nullptr>
2225
+ auto map_error_impl(Exp &&exp, F &&f) {
2226
+ using result = expected<exp_t<Exp>, monostate>;
2227
+ if (exp.has_value()) {
2228
+ return result(*std::forward<Exp>(exp));
2229
+ }
2230
+
2231
+ detail::invoke(std::forward<F>(f), std::forward<Exp>(exp).error());
2232
+ return result(unexpect, monostate{});
2233
+ }
2234
+ template <class Exp, class F,
2235
+ detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
2236
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2237
+ std::declval<Exp>().error())),
2238
+ detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2239
+ constexpr auto map_error_impl(Exp &&exp, F &&f) {
2240
+ using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
2241
+ return exp.has_value()
2242
+ ? result()
2243
+ : result(unexpect, detail::invoke(std::forward<F>(f),
2244
+ std::forward<Exp>(exp).error()));
2245
+ }
2246
+ template <class Exp, class F,
2247
+ detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
2248
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2249
+ std::declval<Exp>().error())),
2250
+ detail::enable_if_t<std::is_void<Ret>::value> * = nullptr>
2251
+ auto map_error_impl(Exp &&exp, F &&f) {
2252
+ using result = expected<exp_t<Exp>, monostate>;
2253
+ if (exp.has_value()) {
2254
+ return result();
2255
+ }
2256
+
2257
+ detail::invoke(std::forward<F>(f), std::forward<Exp>(exp).error());
2258
+ return result(unexpect, monostate{});
2259
+ }
2260
+ #else
2261
+ template <class Exp, class F,
2262
+ detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
2263
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2264
+ std::declval<Exp>().error())),
2265
+ detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2266
+ constexpr auto map_error_impl(Exp &&exp, F &&f)
2267
+ -> expected<exp_t<Exp>, detail::decay_t<Ret>> {
2268
+ using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
2269
+
2270
+ return exp.has_value()
2271
+ ? result(*std::forward<Exp>(exp))
2272
+ : result(unexpect, detail::invoke(std::forward<F>(f),
2273
+ std::forward<Exp>(exp).error()));
2274
+ }
2275
+
2276
+ template <class Exp, class F,
2277
+ detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
2278
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2279
+ std::declval<Exp>().error())),
2280
+ detail::enable_if_t<std::is_void<Ret>::value> * = nullptr>
2281
+ auto map_error_impl(Exp &&exp, F &&f) -> expected<exp_t<Exp>, monostate> {
2282
+ using result = expected<exp_t<Exp>, monostate>;
2283
+ if (exp.has_value()) {
2284
+ return result(*std::forward<Exp>(exp));
2285
+ }
2286
+
2287
+ detail::invoke(std::forward<F>(f), std::forward<Exp>(exp).error());
2288
+ return result(unexpect, monostate{});
2289
+ }
2290
+
2291
+ template <class Exp, class F,
2292
+ detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
2293
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2294
+ std::declval<Exp>().error())),
2295
+ detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2296
+ constexpr auto map_error_impl(Exp &&exp, F &&f)
2297
+ -> expected<exp_t<Exp>, detail::decay_t<Ret>> {
2298
+ using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
2299
+
2300
+ return exp.has_value()
2301
+ ? result()
2302
+ : result(unexpect, detail::invoke(std::forward<F>(f),
2303
+ std::forward<Exp>(exp).error()));
2304
+ }
2305
+
2306
+ template <class Exp, class F,
2307
+ detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
2308
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2309
+ std::declval<Exp>().error())),
2310
+ detail::enable_if_t<std::is_void<Ret>::value> * = nullptr>
2311
+ auto map_error_impl(Exp &&exp, F &&f) -> expected<exp_t<Exp>, monostate> {
2312
+ using result = expected<exp_t<Exp>, monostate>;
2313
+ if (exp.has_value()) {
2314
+ return result();
2315
+ }
2316
+
2317
+ detail::invoke(std::forward<F>(f), std::forward<Exp>(exp).error());
2318
+ return result(unexpect, monostate{});
2319
+ }
2320
+ #endif
2321
+
2322
+ #ifdef TL_EXPECTED_CXX14
2323
+ template <class Exp, class F,
2324
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2325
+ std::declval<Exp>().error())),
2326
+ detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2327
+ constexpr auto or_else_impl(Exp &&exp, F &&f) {
2328
+ static_assert(detail::is_expected<Ret>::value, "F must return an expected");
2329
+ return exp.has_value() ? std::forward<Exp>(exp)
2330
+ : detail::invoke(std::forward<F>(f),
2331
+ std::forward<Exp>(exp).error());
2332
+ }
2333
+
2334
+ template <class Exp, class F,
2335
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2336
+ std::declval<Exp>().error())),
2337
+ detail::enable_if_t<std::is_void<Ret>::value> * = nullptr>
2338
+ detail::decay_t<Exp> or_else_impl(Exp &&exp, F &&f) {
2339
+ return exp.has_value() ? std::forward<Exp>(exp)
2340
+ : (detail::invoke(std::forward<F>(f),
2341
+ std::forward<Exp>(exp).error()),
2342
+ std::forward<Exp>(exp));
2343
+ }
2344
+ #else
2345
+ template <class Exp, class F,
2346
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2347
+ std::declval<Exp>().error())),
2348
+ detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2349
+ auto or_else_impl(Exp &&exp, F &&f) -> Ret {
2350
+ static_assert(detail::is_expected<Ret>::value, "F must return an expected");
2351
+ return exp.has_value() ? std::forward<Exp>(exp)
2352
+ : detail::invoke(std::forward<F>(f),
2353
+ std::forward<Exp>(exp).error());
2354
+ }
2355
+
2356
+ template <class Exp, class F,
2357
+ class Ret = decltype(detail::invoke(std::declval<F>(),
2358
+ std::declval<Exp>().error())),
2359
+ detail::enable_if_t<std::is_void<Ret>::value> * = nullptr>
2360
+ detail::decay_t<Exp> or_else_impl(Exp &&exp, F &&f) {
2361
+ return exp.has_value() ? std::forward<Exp>(exp)
2362
+ : (detail::invoke(std::forward<F>(f),
2363
+ std::forward<Exp>(exp).error()),
2364
+ std::forward<Exp>(exp));
2365
+ }
2366
+ #endif
2367
+ } // namespace detail
2368
+
2369
+ template <class T, class E, class U, class F>
2370
+ constexpr bool operator==(const expected<T, E> &lhs,
2371
+ const expected<U, F> &rhs) {
2372
+ return (lhs.has_value() != rhs.has_value())
2373
+ ? false
2374
+ : (!lhs.has_value() ? lhs.error() == rhs.error() : *lhs == *rhs);
2375
+ }
2376
+ template <class T, class E, class U, class F>
2377
+ constexpr bool operator!=(const expected<T, E> &lhs,
2378
+ const expected<U, F> &rhs) {
2379
+ return (lhs.has_value() != rhs.has_value())
2380
+ ? true
2381
+ : (!lhs.has_value() ? lhs.error() != rhs.error() : *lhs != *rhs);
2382
+ }
2383
+ template <class E, class F>
2384
+ constexpr bool operator==(const expected<void, E> &lhs,
2385
+ const expected<void, F> &rhs) {
2386
+ return (lhs.has_value() != rhs.has_value())
2387
+ ? false
2388
+ : (!lhs.has_value() ? lhs.error() == rhs.error() : true);
2389
+ }
2390
+ template <class E, class F>
2391
+ constexpr bool operator!=(const expected<void, E> &lhs,
2392
+ const expected<void, F> &rhs) {
2393
+ return (lhs.has_value() != rhs.has_value())
2394
+ ? true
2395
+ : (!lhs.has_value() ? lhs.error() == rhs.error() : false);
2396
+ }
2397
+
2398
+ template <class T, class E, class U>
2399
+ constexpr bool operator==(const expected<T, E> &x, const U &v) {
2400
+ return x.has_value() ? *x == v : false;
2401
+ }
2402
+ template <class T, class E, class U>
2403
+ constexpr bool operator==(const U &v, const expected<T, E> &x) {
2404
+ return x.has_value() ? *x == v : false;
2405
+ }
2406
+ template <class T, class E, class U>
2407
+ constexpr bool operator!=(const expected<T, E> &x, const U &v) {
2408
+ return x.has_value() ? *x != v : true;
2409
+ }
2410
+ template <class T, class E, class U>
2411
+ constexpr bool operator!=(const U &v, const expected<T, E> &x) {
2412
+ return x.has_value() ? *x != v : true;
2413
+ }
2414
+
2415
+ template <class T, class E>
2416
+ constexpr bool operator==(const expected<T, E> &x, const unexpected<E> &e) {
2417
+ return x.has_value() ? false : x.error() == e.value();
2418
+ }
2419
+ template <class T, class E>
2420
+ constexpr bool operator==(const unexpected<E> &e, const expected<T, E> &x) {
2421
+ return x.has_value() ? false : x.error() == e.value();
2422
+ }
2423
+ template <class T, class E>
2424
+ constexpr bool operator!=(const expected<T, E> &x, const unexpected<E> &e) {
2425
+ return x.has_value() ? true : x.error() != e.value();
2426
+ }
2427
+ template <class T, class E>
2428
+ constexpr bool operator!=(const unexpected<E> &e, const expected<T, E> &x) {
2429
+ return x.has_value() ? true : x.error() != e.value();
2430
+ }
2431
+
2432
+ template <class T, class E,
2433
+ detail::enable_if_t<(std::is_void<T>::value ||
2434
+ std::is_move_constructible<T>::value) &&
2435
+ detail::is_swappable<T>::value &&
2436
+ std::is_move_constructible<E>::value &&
2437
+ detail::is_swappable<E>::value> * = nullptr>
2438
+ void swap(expected<T, E> &lhs,
2439
+ expected<T, E> &rhs) noexcept(noexcept(lhs.swap(rhs))) {
2440
+ lhs.swap(rhs);
2441
+ }
2442
+ } // namespace tl
2443
+
2444
+ #endif
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/about.json ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "channels": [
3
+ "https://repo.anaconda.com/pkgs/main"
4
+ ],
5
+ "conda_build_version": "24.1.2",
6
+ "conda_version": "24.1.2",
7
+ "description": "C++11/14/17 std::expected with functional-style extensions",
8
+ "dev_url": "https://github.com/TartanLlama/expected",
9
+ "doc_url": "https://github.com/TartanLlama/expected#readme",
10
+ "env_vars": {
11
+ "CIO_TEST": "<not set>"
12
+ },
13
+ "extra": {
14
+ "copy_test_source_files": true,
15
+ "final": true,
16
+ "flow_run_id": "71069434-1bcc-413e-83cf-bdfe3163604b",
17
+ "recipe-maintainers": [
18
+ "JohanMabille",
19
+ "wolfv"
20
+ ],
21
+ "remote_url": "git@github.com:AnacondaRecipes/cpp-expected-feedstock.git",
22
+ "sha": "4457a27f5d09d4666580e8050590e37591484e2c"
23
+ },
24
+ "home": "https://github.com/TartanLlama/expected",
25
+ "identifiers": [],
26
+ "keywords": [],
27
+ "license": "CC0-1.0",
28
+ "license_family": "CC",
29
+ "license_file": "COPYING",
30
+ "root_pkgs": [
31
+ "_libgcc_mutex 0.1 main",
32
+ "_openmp_mutex 5.1 1_gnu",
33
+ "archspec 0.2.1 pyhd3eb1b0_0",
34
+ "boltons 23.0.0 py39h06a4308_0",
35
+ "brotli-python 1.0.9 py39h6a678d5_7",
36
+ "bzip2 1.0.8 h7b6447c_0",
37
+ "c-ares 1.19.1 h5eee18b_0",
38
+ "charset-normalizer 2.0.4 pyhd3eb1b0_0",
39
+ "conda-content-trust 0.2.0 py39h06a4308_0",
40
+ "conda-package-handling 2.2.0 py39h06a4308_0",
41
+ "conda-package-streaming 0.9.0 py39h06a4308_0",
42
+ "fmt 9.1.0 hdb19cb5_0",
43
+ "icu 73.1 h6a678d5_0",
44
+ "idna 3.4 py39h06a4308_0",
45
+ "jsonpatch 1.32 pyhd3eb1b0_0",
46
+ "jsonpointer 2.1 pyhd3eb1b0_0",
47
+ "krb5 1.20.1 h143b758_1",
48
+ "ld_impl_linux-64 2.38 h1181459_1",
49
+ "libarchive 3.6.2 h6ac8c49_2",
50
+ "libev 4.33 h7f8727e_1",
51
+ "libffi 3.4.4 h6a678d5_0",
52
+ "libgcc-ng 11.2.0 h1234567_1",
53
+ "libgomp 11.2.0 h1234567_1",
54
+ "libnghttp2 1.57.0 h2d74bed_0",
55
+ "libsolv 0.7.24 he621ea3_0",
56
+ "libssh2 1.10.0 hdbd6064_2",
57
+ "libstdcxx-ng 11.2.0 h1234567_1",
58
+ "libxml2 2.10.4 hf1b16e4_1",
59
+ "lz4-c 1.9.4 h6a678d5_0",
60
+ "ncurses 6.4 h6a678d5_0",
61
+ "packaging 23.1 py39h06a4308_0",
62
+ "pcre2 10.42 hebb0a14_0",
63
+ "pluggy 1.0.0 py39h06a4308_1",
64
+ "pybind11-abi 4 hd3eb1b0_1",
65
+ "pycosat 0.6.6 py39h5eee18b_0",
66
+ "pycparser 2.21 pyhd3eb1b0_0",
67
+ "pysocks 1.7.1 py39h06a4308_0",
68
+ "python 3.9.18 h955ad1f_0",
69
+ "readline 8.2 h5eee18b_0",
70
+ "reproc 14.2.4 h295c915_1",
71
+ "reproc-cpp 14.2.4 h295c915_1",
72
+ "ruamel.yaml 0.17.21 py39h5eee18b_0",
73
+ "ruamel.yaml.clib 0.2.6 py39h5eee18b_1",
74
+ "sqlite 3.41.2 h5eee18b_0",
75
+ "tk 8.6.12 h1ccaba5_0",
76
+ "tqdm 4.65.0 py39hb070fc8_0",
77
+ "wheel 0.41.2 py39h06a4308_0",
78
+ "yaml-cpp 0.8.0 h6a678d5_0",
79
+ "zlib 1.2.13 h5eee18b_0",
80
+ "zstandard 0.19.0 py39h5eee18b_0",
81
+ "zstd 1.5.5 hc292b87_0",
82
+ "attrs 23.1.0 py39h06a4308_0",
83
+ "beautifulsoup4 4.12.2 py39h06a4308_0",
84
+ "ca-certificates 2023.12.12 h06a4308_0",
85
+ "certifi 2024.2.2 py39h06a4308_0",
86
+ "cffi 1.16.0 py39h5eee18b_0",
87
+ "chardet 4.0.0 py39h06a4308_1003",
88
+ "click 8.1.7 py39h06a4308_0",
89
+ "conda 24.1.2 py39h06a4308_0",
90
+ "conda-build 24.1.2 py39h06a4308_0",
91
+ "conda-index 0.4.0 pyhd3eb1b0_0",
92
+ "conda-libmamba-solver 24.1.0 pyhd3eb1b0_0",
93
+ "cryptography 42.0.2 py39hdda0065_0",
94
+ "distro 1.8.0 py39h06a4308_0",
95
+ "filelock 3.13.1 py39h06a4308_0",
96
+ "jinja2 3.1.3 py39h06a4308_0",
97
+ "jsonschema 4.19.2 py39h06a4308_0",
98
+ "jsonschema-specifications 2023.7.1 py39h06a4308_0",
99
+ "libcurl 8.5.0 h251f7ec_0",
100
+ "libedit 3.1.20230828 h5eee18b_0",
101
+ "liblief 0.12.3 h6a678d5_0",
102
+ "libmamba 1.5.6 haf1ee3a_0",
103
+ "libmambapy 1.5.6 py39h2dafd23_0",
104
+ "markupsafe 2.1.3 py39h5eee18b_0",
105
+ "menuinst 2.0.2 py39h06a4308_0",
106
+ "more-itertools 10.1.0 py39h06a4308_0",
107
+ "openssl 3.0.13 h7f8727e_0",
108
+ "patch 2.7.6 h7b6447c_1001",
109
+ "patchelf 0.17.2 h6a678d5_0",
110
+ "pip 23.3.1 py39h06a4308_0",
111
+ "pkginfo 1.9.6 py39h06a4308_0",
112
+ "platformdirs 3.10.0 py39h06a4308_0",
113
+ "psutil 5.9.0 py39h5eee18b_0",
114
+ "py-lief 0.12.3 py39h6a678d5_0",
115
+ "pyopenssl 24.0.0 py39h06a4308_0",
116
+ "python-libarchive-c 2.9 pyhd3eb1b0_1",
117
+ "pytz 2023.3.post1 py39h06a4308_0",
118
+ "pyyaml 6.0.1 py39h5eee18b_0",
119
+ "referencing 0.30.2 py39h06a4308_0",
120
+ "requests 2.31.0 py39h06a4308_1",
121
+ "rpds-py 0.10.6 py39hb02cf49_0",
122
+ "setuptools 68.2.2 py39h06a4308_0",
123
+ "soupsieve 2.5 py39h06a4308_0",
124
+ "tomli 2.0.1 py39h06a4308_0",
125
+ "tzdata 2023d h04d1e81_0",
126
+ "urllib3 2.1.0 py39h06a4308_1",
127
+ "xz 5.4.5 h5eee18b_0",
128
+ "yaml 0.2.5 h7b6447c_0"
129
+ ],
130
+ "summary": "C++11/14/17 std::expected with functional-style extensions",
131
+ "tags": []
132
+ }
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/files ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ include/tl/expected.hpp
2
+ share/cmake/tl-expected/tl-expected-config-version.cmake
3
+ share/cmake/tl-expected/tl-expected-config.cmake
4
+ share/cmake/tl-expected/tl-expected-targets.cmake
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/git ADDED
File without changes
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/hash_input.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "target_platform": "linux-64",
3
+ "cxx_compiler_version": "11.2.0",
4
+ "cxx_compiler": "gxx",
5
+ "channel_targets": "defaults"
6
+ }
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/index.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "arch": "x86_64",
3
+ "build": "hdb19cb5_0",
4
+ "build_number": 0,
5
+ "depends": [
6
+ "libgcc-ng >=11.2.0",
7
+ "libstdcxx-ng >=11.2.0"
8
+ ],
9
+ "license": "CC0-1.0",
10
+ "license_family": "CC",
11
+ "name": "cpp-expected",
12
+ "platform": "linux",
13
+ "subdir": "linux-64",
14
+ "timestamp": 1734039334436,
15
+ "version": "1.1.0"
16
+ }
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/licenses/COPYING ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Creative Commons Legal Code
2
+
3
+ CC0 1.0 Universal
4
+
5
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
+ HEREUNDER.
13
+
14
+ Statement of Purpose
15
+
16
+ The laws of most jurisdictions throughout the world automatically confer
17
+ exclusive Copyright and Related Rights (defined below) upon the creator
18
+ and subsequent owner(s) (each and all, an "owner") of an original work of
19
+ authorship and/or a database (each, a "Work").
20
+
21
+ Certain owners wish to permanently relinquish those rights to a Work for
22
+ the purpose of contributing to a commons of creative, cultural and
23
+ scientific works ("Commons") that the public can reliably and without fear
24
+ of later claims of infringement build upon, modify, incorporate in other
25
+ works, reuse and redistribute as freely as possible in any form whatsoever
26
+ and for any purposes, including without limitation commercial purposes.
27
+ These owners may contribute to the Commons to promote the ideal of a free
28
+ culture and the further production of creative, cultural and scientific
29
+ works, or to gain reputation or greater distribution for their Work in
30
+ part through the use and efforts of others.
31
+
32
+ For these and/or other purposes and motivations, and without any
33
+ expectation of additional consideration or compensation, the person
34
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
+ is an owner of Copyright and Related Rights in the Work, voluntarily
36
+ elects to apply CC0 to the Work and publicly distribute the Work under its
37
+ terms, with knowledge of his or her Copyright and Related Rights in the
38
+ Work and the meaning and intended legal effect of CC0 on those rights.
39
+
40
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
41
+ protected by copyright and related or neighboring rights ("Copyright and
42
+ Related Rights"). Copyright and Related Rights include, but are not
43
+ limited to, the following:
44
+
45
+ i. the right to reproduce, adapt, distribute, perform, display,
46
+ communicate, and translate a Work;
47
+ ii. moral rights retained by the original author(s) and/or performer(s);
48
+ iii. publicity and privacy rights pertaining to a person's image or
49
+ likeness depicted in a Work;
50
+ iv. rights protecting against unfair competition in regards to a Work,
51
+ subject to the limitations in paragraph 4(a), below;
52
+ v. rights protecting the extraction, dissemination, use and reuse of data
53
+ in a Work;
54
+ vi. database rights (such as those arising under Directive 96/9/EC of the
55
+ European Parliament and of the Council of 11 March 1996 on the legal
56
+ protection of databases, and under any national implementation
57
+ thereof, including any amended or successor version of such
58
+ directive); and
59
+ vii. other similar, equivalent or corresponding rights throughout the
60
+ world based on applicable law or treaty, and any national
61
+ implementations thereof.
62
+
63
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
64
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
65
+ irrevocably and unconditionally waives, abandons, and surrenders all of
66
+ Affirmer's Copyright and Related Rights and associated claims and causes
67
+ of action, whether now known or unknown (including existing as well as
68
+ future claims and causes of action), in the Work (i) in all territories
69
+ worldwide, (ii) for the maximum duration provided by applicable law or
70
+ treaty (including future time extensions), (iii) in any current or future
71
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
72
+ including without limitation commercial, advertising or promotional
73
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
+ member of the public at large and to the detriment of Affirmer's heirs and
75
+ successors, fully intending that such Waiver shall not be subject to
76
+ revocation, rescission, cancellation, termination, or any other legal or
77
+ equitable action to disrupt the quiet enjoyment of the Work by the public
78
+ as contemplated by Affirmer's express Statement of Purpose.
79
+
80
+ 3. Public License Fallback. Should any part of the Waiver for any reason
81
+ be judged legally invalid or ineffective under applicable law, then the
82
+ Waiver shall be preserved to the maximum extent permitted taking into
83
+ account Affirmer's express Statement of Purpose. In addition, to the
84
+ extent the Waiver is so judged Affirmer hereby grants to each affected
85
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
86
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
87
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
+ maximum duration provided by applicable law or treaty (including future
89
+ time extensions), (iii) in any current or future medium and for any number
90
+ of copies, and (iv) for any purpose whatsoever, including without
91
+ limitation commercial, advertising or promotional purposes (the
92
+ "License"). The License shall be deemed effective as of the date CC0 was
93
+ applied by Affirmer to the Work. Should any part of the License for any
94
+ reason be judged legally invalid or ineffective under applicable law, such
95
+ partial invalidity or ineffectiveness shall not invalidate the remainder
96
+ of the License, and in such case Affirmer hereby affirms that he or she
97
+ will not (i) exercise any of his or her remaining Copyright and Related
98
+ Rights in the Work or (ii) assert any associated claims and causes of
99
+ action with respect to the Work, in either case contrary to Affirmer's
100
+ express Statement of Purpose.
101
+
102
+ 4. Limitations and Disclaimers.
103
+
104
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
+ surrendered, licensed or otherwise affected by this document.
106
+ b. Affirmer offers the Work as-is and makes no representations or
107
+ warranties of any kind concerning the Work, express, implied,
108
+ statutory or otherwise, including without limitation warranties of
109
+ title, merchantability, fitness for a particular purpose, non
110
+ infringement, or the absence of latent or other defects, accuracy, or
111
+ the present or absence of errors, whether or not discoverable, all to
112
+ the greatest extent permissible under applicable law.
113
+ c. Affirmer disclaims responsibility for clearing rights of other persons
114
+ that may apply to the Work or any use thereof, including without
115
+ limitation any person's Copyright and Related Rights in the Work.
116
+ Further, Affirmer disclaims responsibility for obtaining any necessary
117
+ consents, permissions or other rights required for any use of the
118
+ Work.
119
+ d. Affirmer understands and acknowledges that Creative Commons is not a
120
+ party to this document and has no duty or obligation with respect to
121
+ this CC0 or use of the Work.
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/paths.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paths": [
3
+ {
4
+ "_path": "include/tl/expected.hpp",
5
+ "path_type": "hardlink",
6
+ "sha256": "5a6a46da2e46ee3360bd8fbd759affefc46b8bfd6295043262ec867acac1fa14",
7
+ "size_in_bytes": 92778
8
+ },
9
+ {
10
+ "_path": "share/cmake/tl-expected/tl-expected-config-version.cmake",
11
+ "path_type": "hardlink",
12
+ "sha256": "8b952c9ac0e5f4fff1f17904d1d19aaa6e798a409a31d07295bc531bd3b65286",
13
+ "size_in_bytes": 2303
14
+ },
15
+ {
16
+ "_path": "share/cmake/tl-expected/tl-expected-config.cmake",
17
+ "path_type": "hardlink",
18
+ "sha256": "e81d5d1be789466fbf2bebff6818ac0879ccf13ef5f4e4566f91f1cfd47e0f08",
19
+ "size_in_bytes": 949
20
+ },
21
+ {
22
+ "_path": "share/cmake/tl-expected/tl-expected-targets.cmake",
23
+ "path_type": "hardlink",
24
+ "sha256": "12df027652c6538628992b5be395af1a7d144199ac103d66e88ca0939d474721",
25
+ "size_in_bytes": 4054
26
+ }
27
+ ],
28
+ "paths_version": 1
29
+ }
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/LICENSE ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Creative Commons Legal Code
2
+
3
+ CC0 1.0 Universal
4
+
5
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
+ HEREUNDER.
13
+
14
+ Statement of Purpose
15
+
16
+ The laws of most jurisdictions throughout the world automatically confer
17
+ exclusive Copyright and Related Rights (defined below) upon the creator
18
+ and subsequent owner(s) (each and all, an "owner") of an original work of
19
+ authorship and/or a database (each, a "Work").
20
+
21
+ Certain owners wish to permanently relinquish those rights to a Work for
22
+ the purpose of contributing to a commons of creative, cultural and
23
+ scientific works ("Commons") that the public can reliably and without fear
24
+ of later claims of infringement build upon, modify, incorporate in other
25
+ works, reuse and redistribute as freely as possible in any form whatsoever
26
+ and for any purposes, including without limitation commercial purposes.
27
+ These owners may contribute to the Commons to promote the ideal of a free
28
+ culture and the further production of creative, cultural and scientific
29
+ works, or to gain reputation or greater distribution for their Work in
30
+ part through the use and efforts of others.
31
+
32
+ For these and/or other purposes and motivations, and without any
33
+ expectation of additional consideration or compensation, the person
34
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
+ is an owner of Copyright and Related Rights in the Work, voluntarily
36
+ elects to apply CC0 to the Work and publicly distribute the Work under its
37
+ terms, with knowledge of his or her Copyright and Related Rights in the
38
+ Work and the meaning and intended legal effect of CC0 on those rights.
39
+
40
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
41
+ protected by copyright and related or neighboring rights ("Copyright and
42
+ Related Rights"). Copyright and Related Rights include, but are not
43
+ limited to, the following:
44
+
45
+ i. the right to reproduce, adapt, distribute, perform, display,
46
+ communicate, and translate a Work;
47
+ ii. moral rights retained by the original author(s) and/or performer(s);
48
+ iii. publicity and privacy rights pertaining to a person's image or
49
+ likeness depicted in a Work;
50
+ iv. rights protecting against unfair competition in regards to a Work,
51
+ subject to the limitations in paragraph 4(a), below;
52
+ v. rights protecting the extraction, dissemination, use and reuse of data
53
+ in a Work;
54
+ vi. database rights (such as those arising under Directive 96/9/EC of the
55
+ European Parliament and of the Council of 11 March 1996 on the legal
56
+ protection of databases, and under any national implementation
57
+ thereof, including any amended or successor version of such
58
+ directive); and
59
+ vii. other similar, equivalent or corresponding rights throughout the
60
+ world based on applicable law or treaty, and any national
61
+ implementations thereof.
62
+
63
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
64
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
65
+ irrevocably and unconditionally waives, abandons, and surrenders all of
66
+ Affirmer's Copyright and Related Rights and associated claims and causes
67
+ of action, whether now known or unknown (including existing as well as
68
+ future claims and causes of action), in the Work (i) in all territories
69
+ worldwide, (ii) for the maximum duration provided by applicable law or
70
+ treaty (including future time extensions), (iii) in any current or future
71
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
72
+ including without limitation commercial, advertising or promotional
73
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
+ member of the public at large and to the detriment of Affirmer's heirs and
75
+ successors, fully intending that such Waiver shall not be subject to
76
+ revocation, rescission, cancellation, termination, or any other legal or
77
+ equitable action to disrupt the quiet enjoyment of the Work by the public
78
+ as contemplated by Affirmer's express Statement of Purpose.
79
+
80
+ 3. Public License Fallback. Should any part of the Waiver for any reason
81
+ be judged legally invalid or ineffective under applicable law, then the
82
+ Waiver shall be preserved to the maximum extent permitted taking into
83
+ account Affirmer's express Statement of Purpose. In addition, to the
84
+ extent the Waiver is so judged Affirmer hereby grants to each affected
85
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
86
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
87
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
+ maximum duration provided by applicable law or treaty (including future
89
+ time extensions), (iii) in any current or future medium and for any number
90
+ of copies, and (iv) for any purpose whatsoever, including without
91
+ limitation commercial, advertising or promotional purposes (the
92
+ "License"). The License shall be deemed effective as of the date CC0 was
93
+ applied by Affirmer to the Work. Should any part of the License for any
94
+ reason be judged legally invalid or ineffective under applicable law, such
95
+ partial invalidity or ineffectiveness shall not invalidate the remainder
96
+ of the License, and in such case Affirmer hereby affirms that he or she
97
+ will not (i) exercise any of his or her remaining Copyright and Related
98
+ Rights in the Work or (ii) assert any associated claims and causes of
99
+ action with respect to the Work, in either case contrary to Affirmer's
100
+ express Statement of Purpose.
101
+
102
+ 4. Limitations and Disclaimers.
103
+
104
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
+ surrendered, licensed or otherwise affected by this document.
106
+ b. Affirmer offers the Work as-is and makes no representations or
107
+ warranties of any kind concerning the Work, express, implied,
108
+ statutory or otherwise, including without limitation warranties of
109
+ title, merchantability, fitness for a particular purpose, non
110
+ infringement, or the absence of latent or other defects, accuracy, or
111
+ the present or absence of errors, whether or not discoverable, all to
112
+ the greatest extent permissible under applicable law.
113
+ c. Affirmer disclaims responsibility for clearing rights of other persons
114
+ that may apply to the Work or any use thereof, including without
115
+ limitation any person's Copyright and Related Rights in the Work.
116
+ Further, Affirmer disclaims responsibility for obtaining any necessary
117
+ consents, permissions or other rights required for any use of the
118
+ Work.
119
+ d. Affirmer understands and acknowledges that Creative Commons is not a
120
+ party to this document and has no duty or obligation with respect to
121
+ this CC0 or use of the Work.
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/bld.bat ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ :: cmd
2
+
3
+ :: Isolate the build.
4
+ mkdir Build
5
+ cd Build
6
+ if errorlevel 1 exit 1
7
+
8
+ :: Generate the build files.
9
+ cmake .. -G"Ninja" %CMAKE_ARGS% ^
10
+ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
11
+ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
12
+ -DCMAKE_BUILD_TYPE=Release
13
+
14
+ :: Build.
15
+ ninja
16
+ if errorlevel 1 exit 1
17
+
18
+ :: Run tests.
19
+ .\tl-expected-tests
20
+ if errorlevel 1 exit 1
21
+
22
+ :: Install.
23
+ ninja install
24
+ if errorlevel 1 exit 1
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/build.sh ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Isolate the build.
4
+ mkdir -p Build
5
+ cd Build || exit 1
6
+
7
+ # Generate the build files.
8
+ cmake .. -G"Ninja" ${CMAKE_ARGS} \
9
+ -DCMAKE_PREFIX_PATH=$PREFIX \
10
+ -DCMAKE_INSTALL_PREFIX=$PREFIX \
11
+ -DCMAKE_INSTALL_LIBDIR=lib \
12
+ -DCMAKE_BUILD_TYPE=Release
13
+
14
+ # Build.
15
+ ninja || exit 1
16
+
17
+ # Run tests.
18
+ ./tl-expected-tests || exit 1
19
+
20
+ # Build and install.
21
+ ninja install || exit 1
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/catch.hpp ADDED
The diff for this file is too large to render. See raw diff
 
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/conda_build_config.yaml ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ VERBOSE_AT: V=1
2
+ VERBOSE_CM: VERBOSE=1
3
+ blas_impl: openblas
4
+ boost: '1.82'
5
+ boost_cpp: '1.82'
6
+ bzip2: '1.0'
7
+ c_compiler: gcc
8
+ c_compiler_version: 11.2.0
9
+ cairo: '1.16'
10
+ cgo_compiler: go-cgo
11
+ cgo_compiler_version: '1.21'
12
+ channel_targets: defaults
13
+ clang_variant: clang
14
+ cpu_optimization_target: nocona
15
+ cran_mirror: https://mran.microsoft.com/snapshot/2018-01-01
16
+ cuda_compiler: cuda-nvcc
17
+ cuda_compiler_version: '12.4'
18
+ cxx_compiler: gxx
19
+ cxx_compiler_version: 11.2.0
20
+ cyrus_sasl: 2.1.28
21
+ dbus: '1'
22
+ expat: '2'
23
+ extend_keys:
24
+ - ignore_version
25
+ - extend_keys
26
+ - pin_run_as_build
27
+ - ignore_build_only_deps
28
+ fontconfig: '2.14'
29
+ fortran_compiler: gfortran
30
+ fortran_compiler_version: 11.2.0
31
+ freetype: '2.10'
32
+ g2clib: '1.6'
33
+ geos: 3.8.0
34
+ giflib: '5'
35
+ glib: '2'
36
+ gmp: '6.2'
37
+ gnu: 2.12.2
38
+ go_compiler: go-nocgo
39
+ go_compiler_version: '1.21'
40
+ gst_plugins_base: '1.14'
41
+ gstreamer: '1.14'
42
+ harfbuzz: 4.3.0
43
+ hdf4: '4.2'
44
+ hdf5: 1.12.1
45
+ hdfeos2: '2.20'
46
+ hdfeos5: '5.1'
47
+ icu: '73'
48
+ ignore_build_only_deps:
49
+ - python
50
+ - numpy
51
+ jpeg: '9'
52
+ libabseil: '20240116.2'
53
+ libcurl: 8.1.1
54
+ libdap4: '3.19'
55
+ libffi: '3.4'
56
+ libgd: 2.3.3
57
+ libgdal: 3.6.2
58
+ libgrpc: 1.62.2
59
+ libgsasl: '1.10'
60
+ libkml: '1.3'
61
+ libnetcdf: '4.8'
62
+ libpng: '1.6'
63
+ libprotobuf: 4.25.3
64
+ libtiff: '4.5'
65
+ libwebp: 1.3.2
66
+ libxml2: '2.13'
67
+ libxslt: '1.1'
68
+ llvm_variant: llvm
69
+ lua: '5'
70
+ lzo: '2'
71
+ mkl: 2023.*
72
+ mpfr: '4'
73
+ numpy: '1.21'
74
+ openblas: 0.3.21
75
+ openjpeg: '2.3'
76
+ openssl: '3.0'
77
+ perl: '5.34'
78
+ pin_run_as_build:
79
+ python:
80
+ max_pin: x.x
81
+ min_pin: x.x
82
+ r-base:
83
+ max_pin: x.x
84
+ min_pin: x.x
85
+ libboost:
86
+ max_pin: x.x.x
87
+ pixman: '0.40'
88
+ proj: 9.3.1
89
+ proj4: 5.2.0
90
+ python: '3.10'
91
+ python_impl: cpython
92
+ python_implementation: cpython
93
+ r_base: '3.5'
94
+ r_implementation: mro-base
95
+ r_version: 3.5.0
96
+ readline: '8.1'
97
+ rust_compiler: rust
98
+ rust_compiler_version: 1.82.0
99
+ sqlite: '3'
100
+ target_platform: linux-64
101
+ tk: '8.6'
102
+ xz: '5'
103
+ zip_keys:
104
+ - - python
105
+ - numpy
106
+ zlib: '1.2'
107
+ zstd: 1.5.2
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/meta.yaml ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file created by conda-build 24.1.2
2
+ # meta.yaml template originally from:
3
+ # /feedstock/recipe, last modified Thu Dec 12 21:34:43 2024
4
+ # ------------------------------------------------
5
+
6
+ package:
7
+ name: cpp-expected
8
+ version: 1.1.0
9
+ source:
10
+ - sha256: 1db357f46dd2b24447156aaf970c4c40a793ef12a8a9c2ad9e096d9801368df6
11
+ url: https://github.com/TartanLlama/expected/archive/refs/tags/v1.1.0.tar.gz
12
+ build:
13
+ number: '0'
14
+ string: hdb19cb5_0
15
+ requirements:
16
+ build:
17
+ - _libgcc_mutex 0.1 main
18
+ - _openmp_mutex 5.1 1_gnu
19
+ - _sysroot_linux-64_curr_repodata_hack 3 haa98f57_10
20
+ - binutils_impl_linux-64 2.40 h5293946_0
21
+ - binutils_linux-64 2.40.0 hc2dff05_1
22
+ - bzip2 1.0.8 h5eee18b_6
23
+ - c-ares 1.19.1 h5eee18b_0
24
+ - ca-certificates 2024.11.26 h06a4308_0
25
+ - cmake 3.26.4 h96355d8_0
26
+ - expat 2.6.4 h6a678d5_0
27
+ - gcc_impl_linux-64 11.2.0 h1234567_1
28
+ - gcc_linux-64 11.2.0 h5c386dc_1
29
+ - gxx_impl_linux-64 11.2.0 h1234567_1
30
+ - gxx_linux-64 11.2.0 hc2dff05_1
31
+ - kernel-headers_linux-64 3.10.0 h57e8cba_10
32
+ - krb5 1.20.1 h143b758_1
33
+ - ld_impl_linux-64 2.40 h12ee557_0
34
+ - libcurl 8.9.1 h251f7ec_0
35
+ - libedit 3.1.20230828 h5eee18b_0
36
+ - libev 4.33 h7f8727e_1
37
+ - libffi 3.4.4 h6a678d5_1
38
+ - libgcc-devel_linux-64 11.2.0 h1234567_1
39
+ - libgcc-ng 11.2.0 h1234567_1
40
+ - libgomp 11.2.0 h1234567_1
41
+ - libmpdec 4.0.0 h5eee18b_0
42
+ - libnghttp2 1.57.0 h2d74bed_0
43
+ - libssh2 1.11.1 h251f7ec_0
44
+ - libstdcxx-devel_linux-64 11.2.0 h1234567_1
45
+ - libstdcxx-ng 11.2.0 h1234567_1
46
+ - libuuid 1.41.5 h5eee18b_0
47
+ - libuv 1.48.0 h5eee18b_0
48
+ - lz4-c 1.9.4 h6a678d5_1
49
+ - ncurses 6.4 h6a678d5_0
50
+ - ninja 1.12.1 h06a4308_0
51
+ - ninja-base 1.12.1 hdb19cb5_0
52
+ - openssl 3.0.15 h5eee18b_0
53
+ - python 3.13.1 hf623796_100_cp313
54
+ - python_abi 3.13 0_cp313
55
+ - readline 8.2 h5eee18b_0
56
+ - rhash 1.4.3 hdbd6064_0
57
+ - sqlite 3.45.3 h5eee18b_0
58
+ - sysroot_linux-64 2.17 h57e8cba_10
59
+ - tk 8.6.14 h39e8969_0
60
+ - tzdata 2024b h04d1e81_0
61
+ - xz 5.4.6 h5eee18b_1
62
+ - zlib 1.2.13 h5eee18b_1
63
+ - zstd 1.5.6 hc292b87_0
64
+ host:
65
+ - _libgcc_mutex 0.1 main
66
+ - _openmp_mutex 5.1 1_gnu
67
+ - libgcc-ng 11.2.0 h1234567_1
68
+ - libgomp 11.2.0 h1234567_1
69
+ - libstdcxx-ng 11.2.0 h1234567_1
70
+ run:
71
+ - libgcc-ng >=11.2.0
72
+ - libstdcxx-ng >=11.2.0
73
+ test:
74
+ commands:
75
+ - test -f ${PREFIX}/include/tl/expected.hpp
76
+ - test -f ${PREFIX}/share/cmake/tl-expected/tl-expected-config.cmake
77
+ - test -f ${PREFIX}/share/cmake/tl-expected/tl-expected-config-version.cmake
78
+ about:
79
+ description: C++11/14/17 std::expected with functional-style extensions
80
+ dev_url: https://github.com/TartanLlama/expected
81
+ doc_url: https://github.com/TartanLlama/expected#readme
82
+ home: https://github.com/TartanLlama/expected
83
+ license: CC0-1.0
84
+ license_family: CC
85
+ license_file: COPYING
86
+ summary: C++11/14/17 std::expected with functional-style extensions
87
+ extra:
88
+ copy_test_source_files: true
89
+ final: true
90
+ flow_run_id: 71069434-1bcc-413e-83cf-bdfe3163604b
91
+ recipe-maintainers:
92
+ - JohanMabille
93
+ - wolfv
94
+ remote_url: git@github.com:AnacondaRecipes/cpp-expected-feedstock.git
95
+ sha: 4457a27f5d09d4666580e8050590e37591484e2c
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/recipe/meta.yaml.template ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% set name = "cpp-expected" %}
2
+ {% set version = "1.1.0" %}
3
+
4
+ package:
5
+ name: {{ name|lower }}
6
+ version: {{ version }}
7
+
8
+ source:
9
+ - url: https://github.com/TartanLlama/expected/archive/refs/tags/v{{ version }}.tar.gz
10
+ sha256: 1db357f46dd2b24447156aaf970c4c40a793ef12a8a9c2ad9e096d9801368df6
11
+
12
+ build:
13
+ number: 0
14
+
15
+ requirements:
16
+ build:
17
+ - {{ compiler('cxx') }}
18
+ - cmake
19
+ - ninja
20
+
21
+ test:
22
+ commands:
23
+ - test -f ${PREFIX}/include/tl/expected.hpp # [unix]
24
+ - test -f ${PREFIX}/share/cmake/tl-expected/tl-expected-config.cmake # [unix]
25
+ - test -f ${PREFIX}/share/cmake/tl-expected/tl-expected-config-version.cmake # [unix]
26
+ - if not exist %LIBRARY_INC%\tl\expected.hpp (exit 1) # [win]
27
+ - if not exist %LIBRARY_PREFIX%\share\cmake\tl-expected\tl-expected-config.cmake (exit 1) # [win]
28
+ - if not exist %LIBRARY_PREFIX%\share\cmake\tl-expected\tl-expected-config-version.cmake (exit 1) # [win]
29
+
30
+ about:
31
+ home: https://github.com/TartanLlama/expected
32
+ license: CC0-1.0
33
+ license_family: CC
34
+ license_file: COPYING
35
+ summary: C++11/14/17 std::expected with functional-style extensions
36
+ description: C++11/14/17 std::expected with functional-style extensions
37
+ doc_url: https://github.com/TartanLlama/expected#readme
38
+ dev_url: https://github.com/TartanLlama/expected
39
+
40
+ extra:
41
+ recipe-maintainers:
42
+ - JohanMabille
43
+ - wolfv
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/repodata_record.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "arch": "x86_64",
3
+ "build": "hdb19cb5_0",
4
+ "build_number": 0,
5
+ "channel": "https://repo.anaconda.com/pkgs/main/linux-64/",
6
+ "constrains": [],
7
+ "depends": [
8
+ "libgcc-ng >=11.2.0",
9
+ "libstdcxx-ng >=11.2.0"
10
+ ],
11
+ "fn": "cpp-expected-1.1.0-hdb19cb5_0.conda",
12
+ "license": "CC0-1.0",
13
+ "license_family": "CC",
14
+ "md5": "3a195bcf47b691adb4a635a8b7f396f7",
15
+ "name": "cpp-expected",
16
+ "platform": "linux",
17
+ "sha256": "8718137ba3afc2eb8eb986e17442968aec45b32bbd746b64bc239c3019ec7216",
18
+ "size": 132687,
19
+ "subdir": "linux-64",
20
+ "timestamp": 1734039334000,
21
+ "url": "https://repo.anaconda.com/pkgs/main/linux-64/cpp-expected-1.1.0-hdb19cb5_0.conda",
22
+ "version": "1.1.0"
23
+ }
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/info/test/run_test.sh ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ set -ex
4
+
5
+
6
+
7
+ test -f ${PREFIX}/include/tl/expected.hpp
8
+ test -f ${PREFIX}/share/cmake/tl-expected/tl-expected-config.cmake
9
+ test -f ${PREFIX}/share/cmake/tl-expected/tl-expected-config-version.cmake
10
+ exit 0
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/share/cmake/tl-expected/tl-expected-config-version.cmake ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This is a basic version file for the Config-mode of find_package().
2
+ # It is used by write_basic_package_version_file() as input file for configure_file()
3
+ # to create a version-file which can be installed along a config.cmake file.
4
+ #
5
+ # The created file sets PACKAGE_VERSION_EXACT if the current version string and
6
+ # the requested version string are exactly the same and it sets
7
+ # PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
8
+ # but only if the requested major version is the same as the current one.
9
+ # The variable CVF_VERSION must be set before calling configure_file().
10
+
11
+
12
+ set(PACKAGE_VERSION "1.0.0")
13
+
14
+ if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
15
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
16
+ else()
17
+
18
+ if("1.0.0" MATCHES "^([0-9]+)\\.")
19
+ set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
20
+ if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
21
+ string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
22
+ endif()
23
+ else()
24
+ set(CVF_VERSION_MAJOR "1.0.0")
25
+ endif()
26
+
27
+ if(PACKAGE_FIND_VERSION_RANGE)
28
+ # both endpoints of the range must have the expected major version
29
+ math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1")
30
+ if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
31
+ OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR)
32
+ OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT)))
33
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
34
+ elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
35
+ AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX)
36
+ OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX)))
37
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
38
+ else()
39
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
40
+ endif()
41
+ else()
42
+ if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
43
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
44
+ else()
45
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
46
+ endif()
47
+
48
+ if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
49
+ set(PACKAGE_VERSION_EXACT TRUE)
50
+ endif()
51
+ endif()
52
+ endif()
53
+
54
+
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/share/cmake/tl-expected/tl-expected-config.cmake ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
3
+ ####### Any changes to this file will be overwritten by the next CMake run ####
4
+ ####### The input file was tl-expected-config.cmake.in ########
5
+
6
+ get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
7
+
8
+ macro(set_and_check _var _file)
9
+ set(${_var} "${_file}")
10
+ if(NOT EXISTS "${_file}")
11
+ message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
12
+ endif()
13
+ endmacro()
14
+
15
+ macro(check_required_components _NAME)
16
+ foreach(comp ${${_NAME}_FIND_COMPONENTS})
17
+ if(NOT ${_NAME}_${comp}_FOUND)
18
+ if(${_NAME}_FIND_REQUIRED_${comp})
19
+ set(${_NAME}_FOUND FALSE)
20
+ endif()
21
+ endif()
22
+ endforeach()
23
+ endmacro()
24
+
25
+ ####################################################################################
26
+
27
+ include("${CMAKE_CURRENT_LIST_DIR}/tl-expected-targets.cmake")
data/miniconda3/pkgs/cpp-expected-1.1.0-hdb19cb5_0/share/cmake/tl-expected/tl-expected-targets.cmake ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by CMake
2
+
3
+ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
4
+ message(FATAL_ERROR "CMake >= 2.8.0 required")
5
+ endif()
6
+ if(CMAKE_VERSION VERSION_LESS "2.8.3")
7
+ message(FATAL_ERROR "CMake >= 2.8.3 required")
8
+ endif()
9
+ cmake_policy(PUSH)
10
+ cmake_policy(VERSION 2.8.3...3.24)
11
+ #----------------------------------------------------------------
12
+ # Generated CMake target import file.
13
+ #----------------------------------------------------------------
14
+
15
+ # Commands may need to know the format version.
16
+ set(CMAKE_IMPORT_FILE_VERSION 1)
17
+
18
+ # Protect against multiple inclusion, which would fail when already imported targets are added once more.
19
+ set(_cmake_targets_defined "")
20
+ set(_cmake_targets_not_defined "")
21
+ set(_cmake_expected_targets "")
22
+ foreach(_cmake_expected_target IN ITEMS tl::expected)
23
+ list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
24
+ if(TARGET "${_cmake_expected_target}")
25
+ list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
26
+ else()
27
+ list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
28
+ endif()
29
+ endforeach()
30
+ unset(_cmake_expected_target)
31
+ if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
32
+ unset(_cmake_targets_defined)
33
+ unset(_cmake_targets_not_defined)
34
+ unset(_cmake_expected_targets)
35
+ unset(CMAKE_IMPORT_FILE_VERSION)
36
+ cmake_policy(POP)
37
+ return()
38
+ endif()
39
+ if(NOT _cmake_targets_defined STREQUAL "")
40
+ string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
41
+ string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
42
+ message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
43
+ endif()
44
+ unset(_cmake_targets_defined)
45
+ unset(_cmake_targets_not_defined)
46
+ unset(_cmake_expected_targets)
47
+
48
+
49
+ # Compute the installation prefix relative to this file.
50
+ get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
51
+ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
52
+ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
53
+ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
54
+ if(_IMPORT_PREFIX STREQUAL "/")
55
+ set(_IMPORT_PREFIX "")
56
+ endif()
57
+
58
+ # Create imported target tl::expected
59
+ add_library(tl::expected INTERFACE IMPORTED)
60
+
61
+ set_target_properties(tl::expected PROPERTIES
62
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/share"
63
+ )
64
+
65
+ if(CMAKE_VERSION VERSION_LESS 3.0.0)
66
+ message(FATAL_ERROR "This file relies on consumers using CMake 3.0.0 or greater.")
67
+ endif()
68
+
69
+ # Load information for each installed configuration.
70
+ file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/tl-expected-targets-*.cmake")
71
+ foreach(_cmake_config_file IN LISTS _cmake_config_files)
72
+ include("${_cmake_config_file}")
73
+ endforeach()
74
+ unset(_cmake_config_file)
75
+ unset(_cmake_config_files)
76
+
77
+ # Cleanup temporary variables.
78
+ set(_IMPORT_PREFIX)
79
+
80
+ # Loop over all imported files and verify that they actually exist
81
+ foreach(_cmake_target IN LISTS _cmake_import_check_targets)
82
+ foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
83
+ if(NOT EXISTS "${_cmake_file}")
84
+ message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
85
+ \"${_cmake_file}\"
86
+ but this file does not exist. Possible reasons include:
87
+ * The file was deleted, renamed, or moved to another location.
88
+ * An install or uninstall procedure did not complete successfully.
89
+ * The installation package was faulty and contained
90
+ \"${CMAKE_CURRENT_LIST_FILE}\"
91
+ but not all the files it references.
92
+ ")
93
+ endif()
94
+ endforeach()
95
+ unset(_cmake_file)
96
+ unset("_cmake_import_check_files_for_${_cmake_target}")
97
+ endforeach()
98
+ unset(_cmake_target)
99
+ unset(_cmake_import_check_targets)
100
+
101
+ # This file does not depend on other imported targets which have
102
+ # been exported from the same project but in a separate export set.
103
+
104
+ # Commands beyond this point should not need to know the version.
105
+ set(CMAKE_IMPORT_FILE_VERSION)
106
+ cmake_policy(POP)
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/about.json ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "channels": [
3
+ "https://repo.anaconda.com/pkgs/main",
4
+ "https://conda.anaconda.org/nvidia/linux-64"
5
+ ],
6
+ "conda_build_version": "24.1.2",
7
+ "conda_version": "24.1.2",
8
+ "description": "Provides libraries to enable third party tools using GPU profiling APIs.\n",
9
+ "doc_url": "https://docs.nvidia.com/cuda/cupti/index.html",
10
+ "env_vars": {
11
+ "CIO_TEST": "<not set>"
12
+ },
13
+ "extra": {
14
+ "copy_test_source_files": true,
15
+ "final": true,
16
+ "parent_recipe": {
17
+ "name": "cuda-cupti",
18
+ "path": "/compute_installer/components/cuda_cupti/recipe",
19
+ "version": "12.8.90"
20
+ },
21
+ "recipe-maintainers": [
22
+ "conda-forge/cuda"
23
+ ]
24
+ },
25
+ "home": "https://developer.nvidia.com/cuda-toolkit",
26
+ "identifiers": [],
27
+ "keywords": [],
28
+ "license": "LicenseRef-NVIDIA-End-User-License-Agreement",
29
+ "license_file": "LICENSE",
30
+ "license_url": "https://docs.nvidia.com/cuda/eula/index.html",
31
+ "root_pkgs": [
32
+ "_libgcc_mutex 0.1 main",
33
+ "_openmp_mutex 5.1 1_gnu",
34
+ "archspec 0.2.1 pyhd3eb1b0_0",
35
+ "boltons 23.0.0 py312h06a4308_0",
36
+ "brotli-python 1.0.9 py312h6a678d5_7",
37
+ "bzip2 1.0.8 h7b6447c_0",
38
+ "c-ares 1.19.1 h5eee18b_0",
39
+ "ca-certificates 2023.12.12 h06a4308_0",
40
+ "certifi 2024.2.2 py312h06a4308_0",
41
+ "cffi 1.16.0 py312h5eee18b_0",
42
+ "charset-normalizer 2.0.4 pyhd3eb1b0_0",
43
+ "conda 24.1.2 py312h06a4308_0",
44
+ "conda-content-trust 0.2.0 py312h06a4308_0",
45
+ "conda-libmamba-solver 23.12.0 pyhd3eb1b0_1",
46
+ "conda-package-handling 2.2.0 py312h06a4308_0",
47
+ "conda-package-streaming 0.9.0 py312h06a4308_0",
48
+ "cryptography 41.0.7 py312hdda0065_0",
49
+ "distro 1.8.0 py312h06a4308_0",
50
+ "expat 2.5.0 h6a678d5_0",
51
+ "fmt 9.1.0 hdb19cb5_0",
52
+ "icu 73.1 h6a678d5_0",
53
+ "idna 3.4 py312h06a4308_0",
54
+ "jsonpatch 1.32 pyhd3eb1b0_0",
55
+ "jsonpointer 2.1 pyhd3eb1b0_0",
56
+ "krb5 1.20.1 h143b758_1",
57
+ "ld_impl_linux-64 2.38 h1181459_1",
58
+ "libarchive 3.6.2 h6ac8c49_2",
59
+ "libcurl 8.5.0 h251f7ec_0",
60
+ "libedit 3.1.20230828 h5eee18b_0",
61
+ "libev 4.33 h7f8727e_1",
62
+ "libffi 3.4.4 h6a678d5_0",
63
+ "libgcc-ng 11.2.0 h1234567_1",
64
+ "libgomp 11.2.0 h1234567_1",
65
+ "libmamba 1.5.3 haf1ee3a_0",
66
+ "libmambapy 1.5.3 py312h2dafd23_0",
67
+ "libnghttp2 1.57.0 h2d74bed_0",
68
+ "libsolv 0.7.24 he621ea3_0",
69
+ "libssh2 1.10.0 hdbd6064_2",
70
+ "libstdcxx-ng 11.2.0 h1234567_1",
71
+ "libuuid 1.41.5 h5eee18b_0",
72
+ "libxml2 2.10.4 hf1b16e4_1",
73
+ "lz4-c 1.9.4 h6a678d5_0",
74
+ "menuinst 2.0.2 py312h06a4308_0",
75
+ "ncurses 6.4 h6a678d5_0",
76
+ "openssl 3.0.13 h7f8727e_0",
77
+ "packaging 23.1 py312h06a4308_0",
78
+ "pcre2 10.42 hebb0a14_0",
79
+ "pip 23.3.1 py312h06a4308_0",
80
+ "platformdirs 3.10.0 py312h06a4308_0",
81
+ "pluggy 1.0.0 py312h06a4308_1",
82
+ "pybind11-abi 4 hd3eb1b0_1",
83
+ "pycosat 0.6.6 py312h5eee18b_0",
84
+ "pycparser 2.21 pyhd3eb1b0_0",
85
+ "pysocks 1.7.1 py312h06a4308_0",
86
+ "python 3.12.1 h996f2a0_0",
87
+ "readline 8.2 h5eee18b_0",
88
+ "reproc 14.2.4 h295c915_1",
89
+ "reproc-cpp 14.2.4 h295c915_1",
90
+ "requests 2.31.0 py312h06a4308_1",
91
+ "ruamel.yaml 0.17.21 py312h5eee18b_0",
92
+ "setuptools 68.2.2 py312h06a4308_0",
93
+ "sqlite 3.41.2 h5eee18b_0",
94
+ "tk 8.6.12 h1ccaba5_0",
95
+ "tqdm 4.65.0 py312he106c6f_0",
96
+ "truststore 0.8.0 py312h06a4308_0",
97
+ "tzdata 2023d h04d1e81_0",
98
+ "urllib3 2.1.0 py312h06a4308_1",
99
+ "wheel 0.41.2 py312h06a4308_0",
100
+ "xz 5.4.5 h5eee18b_0",
101
+ "yaml-cpp 0.8.0 h6a678d5_0",
102
+ "zlib 1.2.13 h5eee18b_0",
103
+ "zstandard 0.19.0 py312h5eee18b_0",
104
+ "zstd 1.5.5 hc292b87_0",
105
+ "anaconda-anon-usage 0.4.3 py312hfc0e8ea_100",
106
+ "anaconda-client 1.12.3 py312h06a4308_0",
107
+ "attrs 23.1.0 py312h06a4308_0",
108
+ "beautifulsoup4 4.12.2 py312h06a4308_0",
109
+ "chardet 4.0.0 py312h06a4308_1003",
110
+ "click 8.1.7 py312h06a4308_0",
111
+ "conda-build 24.1.2 py312h06a4308_0",
112
+ "conda-index 0.4.0 pyhd3eb1b0_0",
113
+ "defusedxml 0.7.1 pyhd3eb1b0_0",
114
+ "filelock 3.13.1 py312h06a4308_0",
115
+ "jinja2 3.1.3 py312h06a4308_0",
116
+ "jsonschema 4.19.2 py312h06a4308_0",
117
+ "jsonschema-specifications 2023.7.1 py312h06a4308_0",
118
+ "jupyter_core 5.5.0 py312h06a4308_0",
119
+ "liblief 0.12.3 h6a678d5_0",
120
+ "markupsafe 2.1.3 py312h5eee18b_0",
121
+ "more-itertools 10.1.0 py312h06a4308_0",
122
+ "nbformat 5.9.2 py312h06a4308_0",
123
+ "patch 2.7.6 h7b6447c_1001",
124
+ "patchelf 0.17.2 h6a678d5_0",
125
+ "pkginfo 1.9.6 py312h06a4308_0",
126
+ "psutil 5.9.0 py312h5eee18b_0",
127
+ "py-lief 0.12.3 py312h6a678d5_0",
128
+ "python-dateutil 2.8.2 pyhd3eb1b0_0",
129
+ "python-fastjsonschema 2.16.2 py312h06a4308_0",
130
+ "python-libarchive-c 2.9 pyhd3eb1b0_1",
131
+ "pytz 2023.3.post1 py312h06a4308_0",
132
+ "pyyaml 6.0.1 py312h5eee18b_0",
133
+ "referencing 0.30.2 py312h06a4308_0",
134
+ "requests-toolbelt 1.0.0 py312h06a4308_0",
135
+ "rpds-py 0.10.6 py312hb02cf49_0",
136
+ "six 1.16.0 pyhd3eb1b0_1",
137
+ "soupsieve 2.5 py312h06a4308_0",
138
+ "traitlets 5.7.1 py312h06a4308_0",
139
+ "yaml 0.2.5 h7b6447c_0"
140
+ ],
141
+ "summary": "Provides libraries to enable third party tools using GPU profiling APIs.",
142
+ "tags": []
143
+ }
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/files ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ lib/libcupti.so
2
+ lib/libnvperf_host.so
3
+ lib/libnvperf_target.so
4
+ lib/libpcsamplingutil.so
5
+ targets/x86_64-linux/include/Openacc/cupti_openacc.h
6
+ targets/x86_64-linux/include/Openmp/cupti_openmp.h
7
+ targets/x86_64-linux/include/Openmp/omp-tools.h
8
+ targets/x86_64-linux/include/cuda_stdint.h
9
+ targets/x86_64-linux/include/cupti.h
10
+ targets/x86_64-linux/include/cupti_activity.h
11
+ targets/x86_64-linux/include/cupti_activity_deprecated.h
12
+ targets/x86_64-linux/include/cupti_callbacks.h
13
+ targets/x86_64-linux/include/cupti_checkpoint.h
14
+ targets/x86_64-linux/include/cupti_common.h
15
+ targets/x86_64-linux/include/cupti_driver_cbid.h
16
+ targets/x86_64-linux/include/cupti_events.h
17
+ targets/x86_64-linux/include/cupti_metrics.h
18
+ targets/x86_64-linux/include/cupti_nvtx_cbid.h
19
+ targets/x86_64-linux/include/cupti_pcsampling.h
20
+ targets/x86_64-linux/include/cupti_pcsampling_util.h
21
+ targets/x86_64-linux/include/cupti_pmsampling.h
22
+ targets/x86_64-linux/include/cupti_profiler_host.h
23
+ targets/x86_64-linux/include/cupti_profiler_target.h
24
+ targets/x86_64-linux/include/cupti_range_profiler.h
25
+ targets/x86_64-linux/include/cupti_result.h
26
+ targets/x86_64-linux/include/cupti_runtime_cbid.h
27
+ targets/x86_64-linux/include/cupti_sass_metrics.h
28
+ targets/x86_64-linux/include/cupti_target.h
29
+ targets/x86_64-linux/include/cupti_version.h
30
+ targets/x86_64-linux/include/generated_cudaGL_meta.h
31
+ targets/x86_64-linux/include/generated_cudaVDPAU_meta.h
32
+ targets/x86_64-linux/include/generated_cuda_gl_interop_meta.h
33
+ targets/x86_64-linux/include/generated_cuda_meta.h
34
+ targets/x86_64-linux/include/generated_cuda_runtime_api_meta.h
35
+ targets/x86_64-linux/include/generated_cuda_vdpau_interop_meta.h
36
+ targets/x86_64-linux/include/generated_cudart_removed_meta.h
37
+ targets/x86_64-linux/include/generated_nvtx_meta.h
38
+ targets/x86_64-linux/include/nvperf_common.h
39
+ targets/x86_64-linux/include/nvperf_cuda_host.h
40
+ targets/x86_64-linux/include/nvperf_host.h
41
+ targets/x86_64-linux/include/nvperf_target.h
42
+ targets/x86_64-linux/lib/libcheckpoint.so
43
+ targets/x86_64-linux/lib/libcupti.so
44
+ targets/x86_64-linux/lib/libnvperf_host.so
45
+ targets/x86_64-linux/lib/libnvperf_target.so
46
+ targets/x86_64-linux/lib/libpcsamplingutil.so
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/git ADDED
File without changes
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/index.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "arch": "x86_64",
3
+ "build": "0",
4
+ "build_number": 0,
5
+ "constrains": [
6
+ "cuda-cupti-static >=12.8.90"
7
+ ],
8
+ "depends": [
9
+ "__glibc >=2.17,<3.0.a0",
10
+ "cuda-cupti 12.8.90 0",
11
+ "cuda-version >=12.8,<12.9.0a0",
12
+ "libgcc-ng >=11.2.0",
13
+ "libstdcxx-ng >=11.2.0"
14
+ ],
15
+ "license": "LicenseRef-NVIDIA-End-User-License-Agreement",
16
+ "name": "cuda-cupti-dev",
17
+ "platform": "linux",
18
+ "subdir": "linux-64",
19
+ "timestamp": 1739450047484,
20
+ "version": "12.8.90"
21
+ }
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/licenses/LICENSE ADDED
@@ -0,0 +1,1632 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ End User License Agreement
2
+ --------------------------
3
+
4
+ NVIDIA Software License Agreement and CUDA Supplement to
5
+ Software License Agreement.
6
+
7
+ The CUDA Toolkit End User License Agreement applies to the
8
+ NVIDIA CUDA Toolkit, the NVIDIA CUDA Samples, the NVIDIA
9
+ Display Driver, NVIDIA Nsight tools (Visual Studio Edition),
10
+ and the associated documentation on CUDA APIs, programming
11
+ model and development tools. If you do not agree with the
12
+ terms and conditions of the license agreement, then do not
13
+ download or use the software.
14
+
15
+ Last updated: January 12, 2024.
16
+
17
+
18
+ Preface
19
+ -------
20
+
21
+ The Software License Agreement in Chapter 1 and the Supplement
22
+ in Chapter 2 contain license terms and conditions that govern
23
+ the use of NVIDIA toolkit. By accepting this agreement, you
24
+ agree to comply with all the terms and conditions applicable
25
+ to the product(s) included herein.
26
+
27
+
28
+ NVIDIA Driver
29
+
30
+
31
+ Description
32
+
33
+ This package contains the operating system driver and
34
+ fundamental system software components for NVIDIA GPUs.
35
+
36
+
37
+ NVIDIA CUDA Toolkit
38
+
39
+
40
+ Description
41
+
42
+ The NVIDIA CUDA Toolkit provides command-line and graphical
43
+ tools for building, debugging and optimizing the performance
44
+ of applications accelerated by NVIDIA GPUs, runtime and math
45
+ libraries, and documentation including programming guides,
46
+ user manuals, and API references.
47
+
48
+
49
+ Default Install Location of CUDA Toolkit
50
+
51
+ Windows platform:
52
+
53
+ %ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v#.#
54
+
55
+ Linux platform:
56
+
57
+ /usr/local/cuda-#.#
58
+
59
+ Mac platform:
60
+
61
+ /Developer/NVIDIA/CUDA-#.#
62
+
63
+
64
+ NVIDIA CUDA Samples
65
+
66
+
67
+ Description
68
+
69
+ CUDA Samples are now located in
70
+ https://github.com/nvidia/cuda-samples, which includes
71
+ instructions for obtaining, building, and running the samples.
72
+ They are no longer included in the CUDA toolkit.
73
+
74
+
75
+ NVIDIA Nsight Visual Studio Edition (Windows only)
76
+
77
+
78
+ Description
79
+
80
+ NVIDIA Nsight Development Platform, Visual Studio Edition is a
81
+ development environment integrated into Microsoft Visual
82
+ Studio that provides tools for debugging, profiling, analyzing
83
+ and optimizing your GPU computing and graphics applications.
84
+
85
+
86
+ Default Install Location of Nsight Visual Studio Edition
87
+
88
+ Windows platform:
89
+
90
+ %ProgramFiles(x86)%\NVIDIA Corporation\Nsight Visual Studio Edition #.#
91
+
92
+
93
+ 1. License Agreement for NVIDIA Software Development Kits
94
+ ---------------------------------------------------------
95
+
96
+
97
+ Important Notice—Read before downloading, installing,
98
+ copying or using the licensed software:
99
+ -------------------------------------------------------
100
+
101
+ This license agreement, including exhibits attached
102
+ ("Agreement”) is a legal agreement between you and NVIDIA
103
+ Corporation ("NVIDIA") and governs your use of a NVIDIA
104
+ software development kit (“SDK”).
105
+
106
+ Each SDK has its own set of software and materials, but here
107
+ is a description of the types of items that may be included in
108
+ a SDK: source code, header files, APIs, data sets and assets
109
+ (examples include images, textures, models, scenes, videos,
110
+ native API input/output files), binary software, sample code,
111
+ libraries, utility programs, programming code and
112
+ documentation.
113
+
114
+ This Agreement can be accepted only by an adult of legal age
115
+ of majority in the country in which the SDK is used.
116
+
117
+ If you are entering into this Agreement on behalf of a company
118
+ or other legal entity, you represent that you have the legal
119
+ authority to bind the entity to this Agreement, in which case
120
+ “you” will mean the entity you represent.
121
+
122
+ If you don’t have the required age or authority to accept
123
+ this Agreement, or if you don’t accept all the terms and
124
+ conditions of this Agreement, do not download, install or use
125
+ the SDK.
126
+
127
+ You agree to use the SDK only for purposes that are permitted
128
+ by (a) this Agreement, and (b) any applicable law, regulation
129
+ or generally accepted practices or guidelines in the relevant
130
+ jurisdictions.
131
+
132
+
133
+ 1.1. License
134
+
135
+
136
+ 1.1.1. License Grant
137
+
138
+ Subject to the terms of this Agreement, NVIDIA hereby grants
139
+ you a non-exclusive, non-transferable license, without the
140
+ right to sublicense (except as expressly provided in this
141
+ Agreement) to:
142
+
143
+ 1. Install and use the SDK,
144
+
145
+ 2. Modify and create derivative works of sample source code
146
+ delivered in the SDK, and
147
+
148
+ 3. Distribute those portions of the SDK that are identified
149
+ in this Agreement as distributable, as incorporated in
150
+ object code format into a software application that meets
151
+ the distribution requirements indicated in this Agreement.
152
+
153
+
154
+ 1.1.2. Distribution Requirements
155
+
156
+ These are the distribution requirements for you to exercise
157
+ the distribution grant:
158
+
159
+ 1. Your application must have material additional
160
+ functionality, beyond the included portions of the SDK.
161
+
162
+ 2. The distributable portions of the SDK shall only be
163
+ accessed by your application.
164
+
165
+ 3. The following notice shall be included in modifications
166
+ and derivative works of sample source code distributed:
167
+ “This software contains source code provided by NVIDIA
168
+ Corporation.”
169
+
170
+ 4. Unless a developer tool is identified in this Agreement
171
+ as distributable, it is delivered for your internal use
172
+ only.
173
+
174
+ 5. The terms under which you distribute your application
175
+ must be consistent with the terms of this Agreement,
176
+ including (without limitation) terms relating to the
177
+ license grant and license restrictions and protection of
178
+ NVIDIA’s intellectual property rights. Additionally, you
179
+ agree that you will protect the privacy, security and
180
+ legal rights of your application users.
181
+
182
+ 6. You agree to notify NVIDIA in writing of any known or
183
+ suspected distribution or use of the SDK not in compliance
184
+ with the requirements of this Agreement, and to enforce
185
+ the terms of your agreements with respect to distributed
186
+ SDK.
187
+
188
+
189
+ 1.1.3. Authorized Users
190
+
191
+ You may allow employees and contractors of your entity or of
192
+ your subsidiary(ies) to access and use the SDK from your
193
+ secure network to perform work on your behalf.
194
+
195
+ If you are an academic institution you may allow users
196
+ enrolled or employed by the academic institution to access and
197
+ use the SDK from your secure network.
198
+
199
+ You are responsible for the compliance with the terms of this
200
+ Agreement by your authorized users. If you become aware that
201
+ your authorized users didn’t follow the terms of this
202
+ Agreement, you agree to take reasonable steps to resolve the
203
+ non-compliance and prevent new occurrences.
204
+
205
+
206
+ 1.1.4. Pre-Release SDK
207
+
208
+ The SDK versions identified as alpha, beta, preview or
209
+ otherwise as pre-release, may not be fully functional, may
210
+ contain errors or design flaws, and may have reduced or
211
+ different security, privacy, accessibility, availability, and
212
+ reliability standards relative to commercial versions of
213
+ NVIDIA software and materials. Use of a pre-release SDK may
214
+ result in unexpected results, loss of data, project delays or
215
+ other unpredictable damage or loss.
216
+
217
+ You may use a pre-release SDK at your own risk, understanding
218
+ that pre-release SDKs are not intended for use in production
219
+ or business-critical systems.
220
+
221
+ NVIDIA may choose not to make available a commercial version
222
+ of any pre-release SDK. NVIDIA may also choose to abandon
223
+ development and terminate the availability of a pre-release
224
+ SDK at any time without liability.
225
+
226
+
227
+ 1.1.5. Updates
228
+
229
+ NVIDIA may, at its option, make available patches, workarounds
230
+ or other updates to this SDK. Unless the updates are provided
231
+ with their separate governing terms, they are deemed part of
232
+ the SDK licensed to you as provided in this Agreement. You
233
+ agree that the form and content of the SDK that NVIDIA
234
+ provides may change without prior notice to you. While NVIDIA
235
+ generally maintains compatibility between versions, NVIDIA may
236
+ in some cases make changes that introduce incompatibilities in
237
+ future versions of the SDK.
238
+
239
+
240
+ 1.1.6. Components Under Other Licenses
241
+
242
+ The SDK may come bundled with, or otherwise include or be
243
+ distributed with, NVIDIA or third-party components with
244
+ separate legal notices or terms as may be described in
245
+ proprietary notices accompanying the SDK. If and to the extent
246
+ there is a conflict between the terms in this Agreement and
247
+ the license terms associated with the component, the license
248
+ terms associated with the components control only to the
249
+ extent necessary to resolve the conflict.
250
+
251
+ Subject to the other terms of this Agreement, you may use the
252
+ SDK to develop and test applications released under Open
253
+ Source Initiative (OSI) approved open source software
254
+ licenses.
255
+
256
+
257
+ 1.1.7. Reservation of Rights
258
+
259
+ NVIDIA reserves all rights, title, and interest in and to the
260
+ SDK, not expressly granted to you under this Agreement.
261
+
262
+
263
+ 1.2. Limitations
264
+
265
+ The following license limitations apply to your use of the
266
+ SDK:
267
+
268
+ 1. You may not reverse engineer, decompile or disassemble,
269
+ or remove copyright or other proprietary notices from any
270
+ portion of the SDK or copies of the SDK.
271
+
272
+ 2. Except as expressly provided in this Agreement, you may
273
+ not copy, sell, rent, sublicense, transfer, distribute,
274
+ modify, or create derivative works of any portion of the
275
+ SDK. For clarity, you may not distribute or sublicense the
276
+ SDK as a stand-alone product.
277
+
278
+ 3. Unless you have an agreement with NVIDIA for this
279
+ purpose, you may not indicate that an application created
280
+ with the SDK is sponsored or endorsed by NVIDIA.
281
+
282
+ 4. You may not bypass, disable, or circumvent any
283
+ encryption, security, digital rights management or
284
+ authentication mechanism in the SDK.
285
+
286
+ 5. You may not use the SDK in any manner that would cause it
287
+ to become subject to an open source software license. As
288
+ examples, licenses that require as a condition of use,
289
+ modification, and/or distribution that the SDK be:
290
+
291
+ a. Disclosed or distributed in source code form;
292
+
293
+ b. Licensed for the purpose of making derivative works;
294
+ or
295
+
296
+ c. Redistributable at no charge.
297
+
298
+ 6. You acknowledge that the SDK as delivered is not tested
299
+ or certified by NVIDIA for use in connection with the
300
+ design, construction, maintenance, and/or operation of any
301
+ system where the use or failure of such system could
302
+ result in a situation that threatens the safety of human
303
+ life or results in catastrophic damages (each, a "Critical
304
+ Application"). Examples of Critical Applications include
305
+ use in avionics, navigation, autonomous vehicle
306
+ applications, ai solutions for automotive products,
307
+ military, medical, life support or other life critical
308
+ applications. NVIDIA shall not be liable to you or any
309
+ third party, in whole or in part, for any claims or
310
+ damages arising from such uses. You are solely responsible
311
+ for ensuring that any product or service developed with
312
+ the SDK as a whole includes sufficient features to comply
313
+ with all applicable legal and regulatory standards and
314
+ requirements.
315
+
316
+ 7. You agree to defend, indemnify and hold harmless NVIDIA
317
+ and its affiliates, and their respective employees,
318
+ contractors, agents, officers and directors, from and
319
+ against any and all claims, damages, obligations, losses,
320
+ liabilities, costs or debt, fines, restitutions and
321
+ expenses (including but not limited to attorney’s fees
322
+ and costs incident to establishing the right of
323
+ indemnification) arising out of or related to products or
324
+ services that use the SDK in or for Critical Applications,
325
+ and for use of the SDK outside of the scope of this
326
+ Agreement or not in compliance with its terms.
327
+
328
+ 8. You may not reverse engineer, decompile or disassemble
329
+ any portion of the output generated using SDK elements for
330
+ the purpose of translating such output artifacts to target
331
+ a non-NVIDIA platform.
332
+
333
+
334
+ 1.3. Ownership
335
+
336
+ 1. NVIDIA or its licensors hold all rights, title and
337
+ interest in and to the SDK and its modifications and
338
+ derivative works, including their respective intellectual
339
+ property rights, subject to your rights under Section
340
+ 1.3.2. This SDK may include software and materials from
341
+ NVIDIA’s licensors, and these licensors are intended
342
+ third party beneficiaries that may enforce this Agreement
343
+ with respect to their intellectual property rights.
344
+
345
+ 2. You hold all rights, title and interest in and to your
346
+ applications and your derivative works of the sample
347
+ source code delivered in the SDK, including their
348
+ respective intellectual property rights, subject to
349
+ NVIDIA’s rights under Section 1.3.1.
350
+
351
+ 3. You may, but don’t have to, provide to NVIDIA
352
+ suggestions, feature requests or other feedback regarding
353
+ the SDK, including possible enhancements or modifications
354
+ to the SDK. For any feedback that you voluntarily provide,
355
+ you hereby grant NVIDIA and its affiliates a perpetual,
356
+ non-exclusive, worldwide, irrevocable license to use,
357
+ reproduce, modify, license, sublicense (through multiple
358
+ tiers of sublicensees), and distribute (through multiple
359
+ tiers of distributors) it without the payment of any
360
+ royalties or fees to you. NVIDIA will use feedback at its
361
+ choice. NVIDIA is constantly looking for ways to improve
362
+ its products, so you may send feedback to NVIDIA through
363
+ the developer portal at https://developer.nvidia.com.
364
+
365
+
366
+ 1.4. No Warranties
367
+
368
+ THE SDK IS PROVIDED BY NVIDIA “AS IS” AND “WITH ALL
369
+ FAULTS.” TO THE MAXIMUM EXTENT PERMITTED BY LAW, NVIDIA AND
370
+ ITS AFFILIATES EXPRESSLY DISCLAIM ALL WARRANTIES OF ANY KIND
371
+ OR NATURE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING,
372
+ BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
373
+ FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, OR THE
374
+ ABSENCE OF ANY DEFECTS THEREIN, WHETHER LATENT OR PATENT. NO
375
+ WARRANTY IS MADE ON THE BASIS OF TRADE USAGE, COURSE OF
376
+ DEALING OR COURSE OF TRADE.
377
+
378
+
379
+ 1.5. Limitation of Liability
380
+
381
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, NVIDIA AND ITS
382
+ AFFILIATES SHALL NOT BE LIABLE FOR ANY (I) SPECIAL, INCIDENTAL,
383
+ PUNITIVE OR CONSEQUENTIAL DAMAGES, OR (II) DAMAGES FOR (A) ANY
384
+ LOST PROFITS, LOSS OF USE, LOSS OF DATA OR LOSS OF GOODWILL,
385
+ OR THE COSTS OF PROCURING SUBSTITUTE PRODUCTS, ARISING OUT OF
386
+ OR IN CONNECTION WITH THIS AGREEMENT OR THE USE OR PERFORMANCE
387
+ OF THE SDK, WHETHER SUCH LIABILITY ARISES FROM ANY CLAIM BASED
388
+ UPON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING
389
+ NEGLIGENCE), PRODUCT LIABILITY OR ANY OTHER CAUSE OF ACTION OR
390
+ THEORY OF LIABILITY. IN NO EVENT WILL NVIDIA’S AND ITS AFFILIATES
391
+ TOTAL CUMULATIVE LIABILITY UNDER OR ARISING OUT OF THIS
392
+ AGREEMENT EXCEED US$10.00. THE NATURE OF THE LIABILITY OR THE
393
+ NUMBER OF CLAIMS OR SUITS SHALL NOT ENLARGE OR EXTEND THIS
394
+ LIMIT.
395
+
396
+ These exclusions and limitations of liability shall apply
397
+ regardless if NVIDIA or its affiliates have been advised of
398
+ the possibility of such damages, and regardless of whether a
399
+ remedy fails its essential purpose. These exclusions and
400
+ limitations of liability form an essential basis of the
401
+ bargain between the parties, and, absent any of these
402
+ exclusions or limitations of liability, the provisions of this
403
+ Agreement, including, without limitation, the economic terms,
404
+ would be substantially different.
405
+
406
+
407
+ 1.6. Termination
408
+
409
+ 1. This Agreement will continue to apply until terminated by
410
+ either you or NVIDIA as described below.
411
+
412
+ 2. If you want to terminate this Agreement, you may do so by
413
+ stopping to use the SDK.
414
+
415
+ 3. NVIDIA may, at any time, terminate this Agreement if:
416
+
417
+ a. (i) you fail to comply with any term of this
418
+ Agreement and the non-compliance is not fixed within
419
+ thirty (30) days following notice from NVIDIA (or
420
+ immediately if you violate NVIDIA’s intellectual
421
+ property rights);
422
+
423
+ b. (ii) you commence or participate in any legal
424
+ proceeding against NVIDIA with respect to the SDK; or
425
+
426
+ c. (iii) NVIDIA decides to no longer provide the SDK in
427
+ a country or, in NVIDIA’s sole discretion, the
428
+ continued use of it is no longer commercially viable.
429
+
430
+ 4. Upon any termination of this Agreement, you agree to
431
+ promptly discontinue use of the SDK and destroy all copies
432
+ in your possession or control. Your prior distributions in
433
+ accordance with this Agreement are not affected by the
434
+ termination of this Agreement. Upon written request, you
435
+ will certify in writing that you have complied with your
436
+ commitments under this section. Upon any termination of
437
+ this Agreement all provisions survive except for the
438
+ license grant provisions.
439
+
440
+
441
+ 1.7. General
442
+
443
+ If you wish to assign this Agreement or your rights and
444
+ obligations, including by merger, consolidation, dissolution
445
+ or operation of law, contact NVIDIA to ask for permission. Any
446
+ attempted assignment not approved by NVIDIA in writing shall
447
+ be void and of no effect. NVIDIA may assign, delegate or
448
+ transfer this Agreement and its rights and obligations, and if
449
+ to a non-affiliate you will be notified.
450
+
451
+ You agree to cooperate with NVIDIA and provide reasonably
452
+ requested information to verify your compliance with this
453
+ Agreement.
454
+
455
+ This Agreement will be governed in all respects by the laws of
456
+ the United States and of the State of Delaware, without regard to the
457
+ conflicts of laws principles. The United Nations Convention on
458
+ Contracts for the International Sale of Goods is specifically
459
+ disclaimed. You agree to all terms of this Agreement in the
460
+ English language.
461
+
462
+ The state or federal courts residing in Santa Clara County,
463
+ California shall have exclusive jurisdiction over any dispute
464
+ or claim arising out of this Agreement. Notwithstanding this,
465
+ you agree that NVIDIA shall still be allowed to apply for
466
+ injunctive remedies or an equivalent type of urgent legal
467
+ relief in any jurisdiction.
468
+
469
+ If any court of competent jurisdiction determines that any
470
+ provision of this Agreement is illegal, invalid or
471
+ unenforceable, such provision will be construed as limited to
472
+ the extent necessary to be consistent with and fully
473
+ enforceable under the law and the remaining provisions will
474
+ remain in full force and effect. Unless otherwise specified,
475
+ remedies are cumulative.
476
+
477
+ Each party acknowledges and agrees that the other is an
478
+ independent contractor in the performance of this Agreement.
479
+
480
+ The SDK has been developed entirely at private expense and is
481
+ “commercial items” consisting of “commercial computer
482
+ software” and “commercial computer software
483
+ documentation” provided with RESTRICTED RIGHTS. Use,
484
+ duplication or disclosure by the U.S. Government or a U.S.
485
+ Government subcontractor is subject to the restrictions in
486
+ this Agreement pursuant to DFARS 227.7202-3(a) or as set forth
487
+ in subparagraphs (c)(1) and (2) of the Commercial Computer
488
+ Software - Restricted Rights clause at FAR 52.227-19, as
489
+ applicable. Contractor/manufacturer is NVIDIA, 2788 San Tomas
490
+ Expressway, Santa Clara, CA 95051.
491
+
492
+ The SDK is subject to United States export laws and
493
+ regulations. You agree that you will not ship, transfer or
494
+ export the SDK into any country, or use the SDK in any manner,
495
+ prohibited by the United States Bureau of Industry and
496
+ Security or economic sanctions regulations administered by the
497
+ U.S. Department of Treasury’s Office of Foreign Assets
498
+ Control (OFAC), or any applicable export laws, restrictions or
499
+ regulations. These laws include restrictions on destinations,
500
+ end users and end use. By accepting this Agreement, you
501
+ confirm that you are not located in a country currently
502
+ embargoed by the U.S. or otherwise prohibited from receiving
503
+ the SDK under U.S. law.
504
+
505
+ Any notice delivered by NVIDIA to you under this Agreement
506
+ will be delivered via mail, email or fax. You agree that any
507
+ notices that NVIDIA sends you electronically will satisfy any
508
+ legal communication requirements. Please direct your legal
509
+ notices or other correspondence to NVIDIA Corporation, 2788
510
+ San Tomas Expressway, Santa Clara, California 95051, United
511
+ States of America, Attention: Legal Department.
512
+
513
+ This Agreement and any exhibits incorporated into this
514
+ Agreement constitute the entire agreement of the parties with
515
+ respect to the subject matter of this Agreement and supersede
516
+ all prior negotiations or documentation exchanged between the
517
+ parties relating to this SDK license. Any additional and/or
518
+ conflicting terms on documents issued by you are null, void,
519
+ and invalid. Any amendment or waiver under this Agreement
520
+ shall be in writing and signed by representatives of both
521
+ parties.
522
+
523
+
524
+ 2. CUDA Toolkit Supplement to Software License Agreement for
525
+ NVIDIA Software Development Kits
526
+ ------------------------------------------------------------
527
+
528
+ The terms in this supplement govern your use of the NVIDIA
529
+ CUDA Toolkit SDK under the terms of your license agreement
530
+ (“Agreement”) as modified by this supplement. Capitalized
531
+ terms used but not defined below have the meaning assigned to
532
+ them in the Agreement.
533
+
534
+ This supplement is an exhibit to the Agreement and is
535
+ incorporated as an integral part of the Agreement. In the
536
+ event of conflict between the terms in this supplement and the
537
+ terms in the Agreement, the terms in this supplement govern.
538
+
539
+
540
+ 2.1. License Scope
541
+
542
+ The SDK is licensed for you to develop applications only for
543
+ use in systems with NVIDIA GPUs.
544
+
545
+
546
+ 2.2. Distribution
547
+
548
+ The portions of the SDK that are distributable under the
549
+ Agreement are listed in Attachment A.
550
+
551
+
552
+ 2.3. Operating Systems
553
+
554
+ Those portions of the SDK designed exclusively for use on the
555
+ Linux or FreeBSD operating systems, or other operating systems
556
+ derived from the source code to these operating systems, may
557
+ be copied and redistributed for use in accordance with this
558
+ Agreement, provided that the object code files are not
559
+ modified in any way (except for unzipping of compressed
560
+ files).
561
+
562
+
563
+ 2.4. Audio and Video Encoders and Decoders
564
+
565
+ You acknowledge and agree that it is your sole responsibility
566
+ to obtain any additional third-party licenses required to
567
+ make, have made, use, have used, sell, import, and offer for
568
+ sale your products or services that include or incorporate any
569
+ third-party software and content relating to audio and/or
570
+ video encoders and decoders from, including but not limited
571
+ to, Microsoft, Thomson, Fraunhofer IIS, Sisvel S.p.A.,
572
+ MPEG-LA, and Coding Technologies. NVIDIA does not grant to you
573
+ under this Agreement any necessary patent or other rights with
574
+ respect to any audio and/or video encoders and decoders.
575
+
576
+
577
+ 2.5. Licensing
578
+
579
+ If the distribution terms in this Agreement are not suitable
580
+ for your organization, or for any questions regarding this
581
+ Agreement, please contact NVIDIA at
582
+ nvidia-compute-license-questions@nvidia.com.
583
+
584
+
585
+ 2.6. Attachment A
586
+
587
+ The following CUDA Toolkit files may be distributed with
588
+ applications developed by you, including certain
589
+ variations of these files that have version number or
590
+ architecture specific information embedded in the file name -
591
+ as an example only, for release version 9.0 of the 64-bit
592
+ Windows software, the file cudart64_90.dll is redistributable.
593
+
594
+ Component
595
+
596
+ CUDA Runtime
597
+
598
+ Windows
599
+
600
+ cudart.dll, cudart_static.lib, cudadevrt.lib
601
+
602
+ Mac OSX
603
+
604
+ libcudart.dylib, libcudart_static.a, libcudadevrt.a
605
+
606
+ Linux
607
+
608
+ libcudart.so, libcudart_static.a, libcudadevrt.a
609
+
610
+ Android
611
+
612
+ libcudart.so, libcudart_static.a, libcudadevrt.a
613
+
614
+ Component
615
+
616
+ CUDA FFT Library
617
+
618
+ Windows
619
+
620
+ cufft.dll, cufftw.dll, cufft.lib, cufftw.lib
621
+
622
+ Mac OSX
623
+
624
+ libcufft.dylib, libcufft_static.a, libcufftw.dylib,
625
+ libcufftw_static.a
626
+
627
+ Linux
628
+
629
+ libcufft.so, libcufft_static.a, libcufftw.so,
630
+ libcufftw_static.a
631
+
632
+ Android
633
+
634
+ libcufft.so, libcufft_static.a, libcufftw.so,
635
+ libcufftw_static.a
636
+
637
+ Component
638
+
639
+ CUDA BLAS Library
640
+
641
+ Windows
642
+
643
+ cublas.dll, cublasLt.dll
644
+
645
+ Mac OSX
646
+
647
+ libcublas.dylib, libcublasLt.dylib, libcublas_static.a,
648
+ libcublasLt_static.a
649
+
650
+ Linux
651
+
652
+ libcublas.so, libcublasLt.so, libcublas_static.a,
653
+ libcublasLt_static.a
654
+
655
+ Android
656
+
657
+ libcublas.so, libcublasLt.so, libcublas_static.a,
658
+ libcublasLt_static.a
659
+
660
+ Component
661
+
662
+ NVIDIA "Drop-in" BLAS Library
663
+
664
+ Windows
665
+
666
+ nvblas.dll
667
+
668
+ Mac OSX
669
+
670
+ libnvblas.dylib
671
+
672
+ Linux
673
+
674
+ libnvblas.so
675
+
676
+ Component
677
+
678
+ CUDA Sparse Matrix Library
679
+
680
+ Windows
681
+
682
+ cusparse.dll, cusparse.lib
683
+
684
+ Mac OSX
685
+
686
+ libcusparse.dylib, libcusparse_static.a
687
+
688
+ Linux
689
+
690
+ libcusparse.so, libcusparse_static.a
691
+
692
+ Android
693
+
694
+ libcusparse.so, libcusparse_static.a
695
+
696
+ Component
697
+
698
+ CUDA Linear Solver Library
699
+
700
+ Windows
701
+
702
+ cusolver.dll, cusolver.lib
703
+
704
+ Mac OSX
705
+
706
+ libcusolver.dylib, libcusolver_static.a
707
+
708
+ Linux
709
+
710
+ libcusolver.so, libcusolver_static.a
711
+
712
+ Android
713
+
714
+ libcusolver.so, libcusolver_static.a
715
+
716
+ Component
717
+
718
+ CUDA Random Number Generation Library
719
+
720
+ Windows
721
+
722
+ curand.dll, curand.lib
723
+
724
+ Mac OSX
725
+
726
+ libcurand.dylib, libcurand_static.a
727
+
728
+ Linux
729
+
730
+ libcurand.so, libcurand_static.a
731
+
732
+ Android
733
+
734
+ libcurand.so, libcurand_static.a
735
+
736
+ Component
737
+
738
+ NVIDIA Performance Primitives Library
739
+
740
+ Windows
741
+
742
+ nppc.dll, nppc.lib, nppial.dll, nppial.lib, nppicc.dll,
743
+ nppicc.lib, nppicom.dll, nppicom.lib, nppidei.dll,
744
+ nppidei.lib, nppif.dll, nppif.lib, nppig.dll, nppig.lib,
745
+ nppim.dll, nppim.lib, nppist.dll, nppist.lib, nppisu.dll,
746
+ nppisu.lib, nppitc.dll, nppitc.lib, npps.dll, npps.lib
747
+
748
+ Mac OSX
749
+
750
+ libnppc.dylib, libnppc_static.a, libnppial.dylib,
751
+ libnppial_static.a, libnppicc.dylib, libnppicc_static.a,
752
+ libnppicom.dylib, libnppicom_static.a, libnppidei.dylib,
753
+ libnppidei_static.a, libnppif.dylib, libnppif_static.a,
754
+ libnppig.dylib, libnppig_static.a, libnppim.dylib,
755
+ libnppisu_static.a, libnppitc.dylib, libnppitc_static.a,
756
+ libnpps.dylib, libnpps_static.a
757
+
758
+ Linux
759
+
760
+ libnppc.so, libnppc_static.a, libnppial.so,
761
+ libnppial_static.a, libnppicc.so, libnppicc_static.a,
762
+ libnppicom.so, libnppicom_static.a, libnppidei.so,
763
+ libnppidei_static.a, libnppif.so, libnppif_static.a
764
+ libnppig.so, libnppig_static.a, libnppim.so,
765
+ libnppim_static.a, libnppist.so, libnppist_static.a,
766
+ libnppisu.so, libnppisu_static.a, libnppitc.so
767
+ libnppitc_static.a, libnpps.so, libnpps_static.a
768
+
769
+ Android
770
+
771
+ libnppc.so, libnppc_static.a, libnppial.so,
772
+ libnppial_static.a, libnppicc.so, libnppicc_static.a,
773
+ libnppicom.so, libnppicom_static.a, libnppidei.so,
774
+ libnppidei_static.a, libnppif.so, libnppif_static.a
775
+ libnppig.so, libnppig_static.a, libnppim.so,
776
+ libnppim_static.a, libnppist.so, libnppist_static.a,
777
+ libnppisu.so, libnppisu_static.a, libnppitc.so
778
+ libnppitc_static.a, libnpps.so, libnpps_static.a
779
+
780
+ Component
781
+
782
+ NVIDIA JPEG Library
783
+
784
+ Windows
785
+
786
+ nvjpeg.lib, nvjpeg.dll
787
+
788
+ Linux
789
+
790
+ libnvjpeg.so, libnvjpeg_static.a
791
+
792
+ Component
793
+
794
+ Internal common library required for statically linking to
795
+ cuBLAS, cuSPARSE, cuFFT, cuRAND, nvJPEG and NPP
796
+
797
+ Mac OSX
798
+
799
+ libculibos.a
800
+
801
+ Linux
802
+
803
+ libculibos.a
804
+
805
+ Component
806
+
807
+ NVIDIA Runtime Compilation Library and Header
808
+
809
+ All
810
+
811
+ nvrtc.h
812
+
813
+ Windows
814
+
815
+ nvrtc.dll, nvrtc-builtins.dll
816
+
817
+ Mac OSX
818
+
819
+ libnvrtc.dylib, libnvrtc-builtins.dylib
820
+
821
+ Linux
822
+
823
+ libnvrtc.so, libnvrtc-builtins.so, libnvrtc_static.a, libnvrtx-builtins_static.a
824
+
825
+ Component
826
+
827
+ NVIDIA Optimizing Compiler Library
828
+
829
+ Windows
830
+
831
+ nvvm.dll
832
+
833
+ Mac OSX
834
+
835
+ libnvvm.dylib
836
+
837
+ Linux
838
+
839
+ libnvvm.so
840
+
841
+ Component
842
+
843
+ NVIDIA JIT Linking Library
844
+
845
+ Windows
846
+
847
+ libnvJitLink.dll, libnvJitLink.lib
848
+
849
+ Linux
850
+
851
+ libnvJitLink.so, libnvJitLink_static.a
852
+
853
+ Component
854
+
855
+ NVIDIA Common Device Math Functions Library
856
+
857
+ Windows
858
+
859
+ libdevice.10.bc
860
+
861
+ Mac OSX
862
+
863
+ libdevice.10.bc
864
+
865
+ Linux
866
+
867
+ libdevice.10.bc
868
+
869
+ Component
870
+
871
+ CUDA Occupancy Calculation Header Library
872
+
873
+ All
874
+
875
+ cuda_occupancy.h
876
+
877
+ Component
878
+
879
+ CUDA Half Precision Headers
880
+
881
+ All
882
+
883
+ cuda_fp16.h, cuda_fp16.hpp
884
+
885
+ Component
886
+
887
+ CUDA Profiling Tools Interface (CUPTI) Library
888
+
889
+ Windows
890
+
891
+ cupti.dll
892
+
893
+ Mac OSX
894
+
895
+ libcupti.dylib
896
+
897
+ Linux
898
+
899
+ libcupti.so
900
+
901
+ Component
902
+
903
+ NVIDIA Tools Extension Library
904
+
905
+ Windows
906
+
907
+ nvToolsExt.dll, nvToolsExt.lib
908
+
909
+ Mac OSX
910
+
911
+ libnvToolsExt.dylib
912
+
913
+ Linux
914
+
915
+ libnvToolsExt.so
916
+
917
+ Component
918
+
919
+ NVIDIA CUDA Driver Libraries
920
+
921
+ Linux
922
+
923
+ libcuda.so, libnvidia-ptxjitcompiler.so, libnvptxcompiler_static.a
924
+
925
+ Component
926
+
927
+ NVIDIA CUDA File IO Libraries and Header
928
+
929
+ All
930
+
931
+ cufile.h
932
+
933
+ Linux
934
+
935
+ libcufile.so, libcufile_rdma.so, libcufile_static.a,
936
+ libcufile_rdma_static.a
937
+
938
+ In addition to the rights above, for parties that are
939
+ developing software intended solely for use on Jetson
940
+ development kits or Jetson modules, and running Linux for
941
+ Tegra software, the following shall apply:
942
+
943
+ * The SDK may be distributed in its entirety, as provided by
944
+ NVIDIA, and without separation of its components, for you
945
+ and/or your licensees to create software development kits
946
+ for use only on the Jetson platform and running Linux for
947
+ Tegra software.
948
+
949
+
950
+ 2.7. Attachment B
951
+
952
+
953
+ Additional Licensing Obligations
954
+
955
+ The following third party components included in the SOFTWARE
956
+ are licensed to Licensee pursuant to the following terms and
957
+ conditions:
958
+
959
+ 1. Licensee's use of the GDB third party component is
960
+ subject to the terms and conditions of GNU GPL v3:
961
+
962
+ This product includes copyrighted third-party software licensed
963
+ under the terms of the GNU General Public License v3 ("GPL v3").
964
+ All third-party software packages are copyright by their respective
965
+ authors. GPL v3 terms and conditions are hereby incorporated into
966
+ the Agreement by this reference: http://www.gnu.org/licenses/gpl.txt
967
+
968
+ Consistent with these licensing requirements, the software
969
+ listed below is provided under the terms of the specified
970
+ open source software licenses. To obtain source code for
971
+ software provided under licenses that require
972
+ redistribution of source code, including the GNU General
973
+ Public License (GPL) and GNU Lesser General Public License
974
+ (LGPL), contact oss-requests@nvidia.com. This offer is
975
+ valid for a period of three (3) years from the date of the
976
+ distribution of this product by NVIDIA CORPORATION.
977
+
978
+ Component License
979
+ CUDA-GDB GPL v3
980
+
981
+ 2. Licensee represents and warrants that any and all third
982
+ party licensing and/or royalty payment obligations in
983
+ connection with Licensee's use of the H.264 video codecs
984
+ are solely the responsibility of Licensee.
985
+
986
+ 3. Licensee's use of the Thrust library is subject to the
987
+ terms and conditions of the Apache License Version 2.0.
988
+ All third-party software packages are copyright by their
989
+ respective authors. Apache License Version 2.0 terms and
990
+ conditions are hereby incorporated into the Agreement by
991
+ this reference.
992
+ http://www.apache.org/licenses/LICENSE-2.0.html
993
+
994
+ In addition, Licensee acknowledges the following notice:
995
+ Thrust includes source code from the Boost Iterator,
996
+ Tuple, System, and Random Number libraries.
997
+
998
+ Boost Software License - Version 1.0 - August 17th, 2003
999
+ . . . .
1000
+
1001
+ Permission is hereby granted, free of charge, to any person or
1002
+ organization obtaining a copy of the software and accompanying
1003
+ documentation covered by this license (the "Software") to use,
1004
+ reproduce, display, distribute, execute, and transmit the Software,
1005
+ and to prepare derivative works of the Software, and to permit
1006
+ third-parties to whom the Software is furnished to do so, all
1007
+ subject to the following:
1008
+
1009
+ The copyright notices in the Software and this entire statement,
1010
+ including the above license grant, this restriction and the following
1011
+ disclaimer, must be included in all copies of the Software, in whole
1012
+ or in part, and all derivative works of the Software, unless such
1013
+ copies or derivative works are solely in the form of machine-executable
1014
+ object code generated by a source language processor.
1015
+
1016
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1017
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1018
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
1019
+ NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
1020
+ ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR
1021
+ OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING
1022
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1023
+ OTHER DEALINGS IN THE SOFTWARE.
1024
+
1025
+ 4. Licensee's use of the LLVM third party component is
1026
+ subject to the following terms and conditions:
1027
+
1028
+ ======================================================
1029
+ LLVM Release License
1030
+ ======================================================
1031
+ University of Illinois/NCSA
1032
+ Open Source License
1033
+
1034
+ Copyright (c) 2003-2010 University of Illinois at Urbana-Champaign.
1035
+ All rights reserved.
1036
+
1037
+ Developed by:
1038
+
1039
+ LLVM Team
1040
+
1041
+ University of Illinois at Urbana-Champaign
1042
+
1043
+ http://llvm.org
1044
+
1045
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1046
+ of this software and associated documentation files (the "Software"), to
1047
+ deal with the Software without restriction, including without limitation the
1048
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
1049
+ sell copies of the Software, and to permit persons to whom the Software is
1050
+ furnished to do so, subject to the following conditions:
1051
+
1052
+ * Redistributions of source code must retain the above copyright notice,
1053
+ this list of conditions and the following disclaimers.
1054
+
1055
+ * Redistributions in binary form must reproduce the above copyright
1056
+ notice, this list of conditions and the following disclaimers in the
1057
+ documentation and/or other materials provided with the distribution.
1058
+
1059
+ * Neither the names of the LLVM Team, University of Illinois at Urbana-
1060
+ Champaign, nor the names of its contributors may be used to endorse or
1061
+ promote products derived from this Software without specific prior
1062
+ written permission.
1063
+
1064
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1065
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1066
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1067
+ THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
1068
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1069
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1070
+ DEALINGS WITH THE SOFTWARE.
1071
+
1072
+ 5. Licensee's use of the PCRE third party component is
1073
+ subject to the following terms and conditions:
1074
+
1075
+ ------------
1076
+ PCRE LICENCE
1077
+ ------------
1078
+ PCRE is a library of functions to support regular expressions whose syntax
1079
+ and semantics are as close as possible to those of the Perl 5 language.
1080
+ Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
1081
+ specified below. The documentation for PCRE, supplied in the "doc"
1082
+ directory, is distributed under the same terms as the software itself. The
1083
+ basic library functions are written in C and are freestanding. Also
1084
+ included in the distribution is a set of C++ wrapper functions, and a just-
1085
+ in-time compiler that can be used to optimize pattern matching. These are
1086
+ both optional features that can be omitted when the library is built.
1087
+
1088
+ THE BASIC LIBRARY FUNCTIONS
1089
+ ---------------------------
1090
+ Written by: Philip Hazel
1091
+ Email local part: ph10
1092
+ Email domain: cam.ac.uk
1093
+ University of Cambridge Computing Service,
1094
+ Cambridge, England.
1095
+ Copyright (c) 1997-2012 University of Cambridge
1096
+ All rights reserved.
1097
+
1098
+ PCRE JUST-IN-TIME COMPILATION SUPPORT
1099
+ -------------------------------------
1100
+ Written by: Zoltan Herczeg
1101
+ Email local part: hzmester
1102
+ Emain domain: freemail.hu
1103
+ Copyright(c) 2010-2012 Zoltan Herczeg
1104
+ All rights reserved.
1105
+
1106
+ STACK-LESS JUST-IN-TIME COMPILER
1107
+ --------------------------------
1108
+ Written by: Zoltan Herczeg
1109
+ Email local part: hzmester
1110
+ Emain domain: freemail.hu
1111
+ Copyright(c) 2009-2012 Zoltan Herczeg
1112
+ All rights reserved.
1113
+
1114
+ THE C++ WRAPPER FUNCTIONS
1115
+ -------------------------
1116
+ Contributed by: Google Inc.
1117
+ Copyright (c) 2007-2012, Google Inc.
1118
+ All rights reserved.
1119
+
1120
+ THE "BSD" LICENCE
1121
+ -----------------
1122
+ Redistribution and use in source and binary forms, with or without
1123
+ modification, are permitted provided that the following conditions are met:
1124
+
1125
+ * Redistributions of source code must retain the above copyright notice,
1126
+ this list of conditions and the following disclaimer.
1127
+
1128
+ * Redistributions in binary form must reproduce the above copyright
1129
+ notice, this list of conditions and the following disclaimer in the
1130
+ documentation and/or other materials provided with the distribution.
1131
+
1132
+ * Neither the name of the University of Cambridge nor the name of Google
1133
+ Inc. nor the names of their contributors may be used to endorse or
1134
+ promote products derived from this software without specific prior
1135
+ written permission.
1136
+
1137
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1138
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1139
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1140
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
1141
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1142
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1143
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1144
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1145
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1146
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1147
+ POSSIBILITY OF SUCH DAMAGE.
1148
+
1149
+ 6. Some of the cuBLAS library routines were written by or
1150
+ derived from code written by Vasily Volkov and are subject
1151
+ to the Modified Berkeley Software Distribution License as
1152
+ follows:
1153
+
1154
+ Copyright (c) 2007-2009, Regents of the University of California
1155
+
1156
+ All rights reserved.
1157
+
1158
+ Redistribution and use in source and binary forms, with or without
1159
+ modification, are permitted provided that the following conditions are
1160
+ met:
1161
+ * Redistributions of source code must retain the above copyright
1162
+ notice, this list of conditions and the following disclaimer.
1163
+ * Redistributions in binary form must reproduce the above
1164
+ copyright notice, this list of conditions and the following
1165
+ disclaimer in the documentation and/or other materials provided
1166
+ with the distribution.
1167
+ * Neither the name of the University of California, Berkeley nor
1168
+ the names of its contributors may be used to endorse or promote
1169
+ products derived from this software without specific prior
1170
+ written permission.
1171
+
1172
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
1173
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1174
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1175
+ DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
1176
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1177
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1178
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1179
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1180
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
1181
+ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1182
+ POSSIBILITY OF SUCH DAMAGE.
1183
+
1184
+ 7. Some of the cuBLAS library routines were written by or
1185
+ derived from code written by Davide Barbieri and are
1186
+ subject to the Modified Berkeley Software Distribution
1187
+ License as follows:
1188
+
1189
+ Copyright (c) 2008-2009 Davide Barbieri @ University of Rome Tor Vergata.
1190
+
1191
+ All rights reserved.
1192
+
1193
+ Redistribution and use in source and binary forms, with or without
1194
+ modification, are permitted provided that the following conditions are
1195
+ met:
1196
+ * Redistributions of source code must retain the above copyright
1197
+ notice, this list of conditions and the following disclaimer.
1198
+ * Redistributions in binary form must reproduce the above
1199
+ copyright notice, this list of conditions and the following
1200
+ disclaimer in the documentation and/or other materials provided
1201
+ with the distribution.
1202
+ * The name of the author may not be used to endorse or promote
1203
+ products derived from this software without specific prior
1204
+ written permission.
1205
+
1206
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
1207
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1208
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1209
+ DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
1210
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1211
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1212
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1213
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1214
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
1215
+ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1216
+ POSSIBILITY OF SUCH DAMAGE.
1217
+
1218
+ 8. Some of the cuBLAS library routines were derived from
1219
+ code developed by the University of Tennessee and are
1220
+ subject to the Modified Berkeley Software Distribution
1221
+ License as follows:
1222
+
1223
+ Copyright (c) 2010 The University of Tennessee.
1224
+
1225
+ All rights reserved.
1226
+
1227
+ Redistribution and use in source and binary forms, with or without
1228
+ modification, are permitted provided that the following conditions are
1229
+ met:
1230
+ * Redistributions of source code must retain the above copyright
1231
+ notice, this list of conditions and the following disclaimer.
1232
+ * Redistributions in binary form must reproduce the above
1233
+ copyright notice, this list of conditions and the following
1234
+ disclaimer listed in this license in the documentation and/or
1235
+ other materials provided with the distribution.
1236
+ * Neither the name of the copyright holders nor the names of its
1237
+ contributors may be used to endorse or promote products derived
1238
+ from this software without specific prior written permission.
1239
+
1240
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1241
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1242
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1243
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1244
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1245
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1246
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1247
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1248
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1249
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1250
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1251
+
1252
+ 9. Some of the cuBLAS library routines were written by or
1253
+ derived from code written by Jonathan Hogg and are subject
1254
+ to the Modified Berkeley Software Distribution License as
1255
+ follows:
1256
+
1257
+ Copyright (c) 2012, The Science and Technology Facilities Council (STFC).
1258
+
1259
+ All rights reserved.
1260
+
1261
+ Redistribution and use in source and binary forms, with or without
1262
+ modification, are permitted provided that the following conditions are
1263
+ met:
1264
+ * Redistributions of source code must retain the above copyright
1265
+ notice, this list of conditions and the following disclaimer.
1266
+ * Redistributions in binary form must reproduce the above
1267
+ copyright notice, this list of conditions and the following
1268
+ disclaimer in the documentation and/or other materials provided
1269
+ with the distribution.
1270
+ * Neither the name of the STFC nor the names of its contributors
1271
+ may be used to endorse or promote products derived from this
1272
+ software without specific prior written permission.
1273
+
1274
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1275
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1276
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1277
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE STFC BE
1278
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1279
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1280
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
1281
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
1282
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
1283
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
1284
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1285
+
1286
+ 10. Some of the cuBLAS library routines were written by or
1287
+ derived from code written by Ahmad M. Abdelfattah, David
1288
+ Keyes, and Hatem Ltaief, and are subject to the Apache
1289
+ License, Version 2.0, as follows:
1290
+
1291
+ -- (C) Copyright 2013 King Abdullah University of Science and Technology
1292
+ Authors:
1293
+ Ahmad Abdelfattah (ahmad.ahmad@kaust.edu.sa)
1294
+ David Keyes (david.keyes@kaust.edu.sa)
1295
+ Hatem Ltaief (hatem.ltaief@kaust.edu.sa)
1296
+
1297
+ Redistribution and use in source and binary forms, with or without
1298
+ modification, are permitted provided that the following conditions
1299
+ are met:
1300
+
1301
+ * Redistributions of source code must retain the above copyright
1302
+ notice, this list of conditions and the following disclaimer.
1303
+ * Redistributions in binary form must reproduce the above copyright
1304
+ notice, this list of conditions and the following disclaimer in the
1305
+ documentation and/or other materials provided with the distribution.
1306
+ * Neither the name of the King Abdullah University of Science and
1307
+ Technology nor the names of its contributors may be used to endorse
1308
+ or promote products derived from this software without specific prior
1309
+ written permission.
1310
+
1311
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1312
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1313
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1314
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1315
+ HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1316
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1317
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1318
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1319
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1320
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1321
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
1322
+
1323
+ 11. Some of the cuSPARSE library routines were written by or
1324
+ derived from code written by Li-Wen Chang and are subject
1325
+ to the NCSA Open Source License as follows:
1326
+
1327
+ Copyright (c) 2012, University of Illinois.
1328
+
1329
+ All rights reserved.
1330
+
1331
+ Developed by: IMPACT Group, University of Illinois, http://impact.crhc.illinois.edu
1332
+
1333
+ Permission is hereby granted, free of charge, to any person obtaining
1334
+ a copy of this software and associated documentation files (the
1335
+ "Software"), to deal with the Software without restriction, including
1336
+ without limitation the rights to use, copy, modify, merge, publish,
1337
+ distribute, sublicense, and/or sell copies of the Software, and to
1338
+ permit persons to whom the Software is furnished to do so, subject to
1339
+ the following conditions:
1340
+ * Redistributions of source code must retain the above copyright
1341
+ notice, this list of conditions and the following disclaimer.
1342
+ * Redistributions in binary form must reproduce the above
1343
+ copyright notice, this list of conditions and the following
1344
+ disclaimers in the documentation and/or other materials provided
1345
+ with the distribution.
1346
+ * Neither the names of IMPACT Group, University of Illinois, nor
1347
+ the names of its contributors may be used to endorse or promote
1348
+ products derived from this Software without specific prior
1349
+ written permission.
1350
+
1351
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1352
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1353
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1354
+ NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT
1355
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
1356
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
1357
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
1358
+ SOFTWARE.
1359
+
1360
+ 12. Some of the cuRAND library routines were written by or
1361
+ derived from code written by Mutsuo Saito and Makoto
1362
+ Matsumoto and are subject to the following license:
1363
+
1364
+ Copyright (c) 2009, 2010 Mutsuo Saito, Makoto Matsumoto and Hiroshima
1365
+ University. All rights reserved.
1366
+
1367
+ Copyright (c) 2011 Mutsuo Saito, Makoto Matsumoto, Hiroshima
1368
+ University and University of Tokyo. All rights reserved.
1369
+
1370
+ Redistribution and use in source and binary forms, with or without
1371
+ modification, are permitted provided that the following conditions are
1372
+ met:
1373
+ * Redistributions of source code must retain the above copyright
1374
+ notice, this list of conditions and the following disclaimer.
1375
+ * Redistributions in binary form must reproduce the above
1376
+ copyright notice, this list of conditions and the following
1377
+ disclaimer in the documentation and/or other materials provided
1378
+ with the distribution.
1379
+ * Neither the name of the Hiroshima University nor the names of
1380
+ its contributors may be used to endorse or promote products
1381
+ derived from this software without specific prior written
1382
+ permission.
1383
+
1384
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1385
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1386
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1387
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1388
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1389
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1390
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1391
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1392
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1393
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1394
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1395
+
1396
+ 13. Some of the cuRAND library routines were derived from
1397
+ code developed by D. E. Shaw Research and are subject to
1398
+ the following license:
1399
+
1400
+ Copyright 2010-2011, D. E. Shaw Research.
1401
+
1402
+ All rights reserved.
1403
+
1404
+ Redistribution and use in source and binary forms, with or without
1405
+ modification, are permitted provided that the following conditions are
1406
+ met:
1407
+ * Redistributions of source code must retain the above copyright
1408
+ notice, this list of conditions, and the following disclaimer.
1409
+ * Redistributions in binary form must reproduce the above
1410
+ copyright notice, this list of conditions, and the following
1411
+ disclaimer in the documentation and/or other materials provided
1412
+ with the distribution.
1413
+ * Neither the name of D. E. Shaw Research nor the names of its
1414
+ contributors may be used to endorse or promote products derived
1415
+ from this software without specific prior written permission.
1416
+
1417
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1418
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1419
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1420
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1421
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1422
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1423
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1424
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1425
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1426
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1427
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1428
+
1429
+ 14. Some of the Math library routines were written by or
1430
+ derived from code developed by Norbert Juffa and are
1431
+ subject to the following license:
1432
+
1433
+ Copyright (c) 2015-2017, Norbert Juffa
1434
+ All rights reserved.
1435
+
1436
+ Redistribution and use in source and binary forms, with or without
1437
+ modification, are permitted provided that the following conditions
1438
+ are met:
1439
+
1440
+ 1. Redistributions of source code must retain the above copyright
1441
+ notice, this list of conditions and the following disclaimer.
1442
+
1443
+ 2. Redistributions in binary form must reproduce the above copyright
1444
+ notice, this list of conditions and the following disclaimer in the
1445
+ documentation and/or other materials provided with the distribution.
1446
+
1447
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1448
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1449
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1450
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1451
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1452
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1453
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1454
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1455
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1456
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1457
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1458
+
1459
+ 15. Licensee's use of the lz4 third party component is
1460
+ subject to the following terms and conditions:
1461
+
1462
+ Copyright (C) 2011-2013, Yann Collet.
1463
+ BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
1464
+
1465
+ Redistribution and use in source and binary forms, with or without
1466
+ modification, are permitted provided that the following conditions are
1467
+ met:
1468
+
1469
+ * Redistributions of source code must retain the above copyright
1470
+ notice, this list of conditions and the following disclaimer.
1471
+ * Redistributions in binary form must reproduce the above
1472
+ copyright notice, this list of conditions and the following disclaimer
1473
+ in the documentation and/or other materials provided with the
1474
+ distribution.
1475
+
1476
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1477
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1478
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1479
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1480
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1481
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1482
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1483
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1484
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1485
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1486
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1487
+
1488
+ 16. The NPP library uses code from the Boost Math Toolkit,
1489
+ and is subject to the following license:
1490
+
1491
+ Boost Software License - Version 1.0 - August 17th, 2003
1492
+ . . . .
1493
+
1494
+ Permission is hereby granted, free of charge, to any person or
1495
+ organization obtaining a copy of the software and accompanying
1496
+ documentation covered by this license (the "Software") to use,
1497
+ reproduce, display, distribute, execute, and transmit the Software,
1498
+ and to prepare derivative works of the Software, and to permit
1499
+ third-parties to whom the Software is furnished to do so, all
1500
+ subject to the following:
1501
+
1502
+ The copyright notices in the Software and this entire statement,
1503
+ including the above license grant, this restriction and the following
1504
+ disclaimer, must be included in all copies of the Software, in whole
1505
+ or in part, and all derivative works of the Software, unless such
1506
+ copies or derivative works are solely in the form of machine-executable
1507
+ object code generated by a source language processor.
1508
+
1509
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1510
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1511
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
1512
+ NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
1513
+ ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR
1514
+ OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING
1515
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1516
+ OTHER DEALINGS IN THE SOFTWARE.
1517
+
1518
+ 17. Portions of the Nsight Eclipse Edition is subject to the
1519
+ following license:
1520
+
1521
+ The Eclipse Foundation makes available all content in this plug-in
1522
+ ("Content"). Unless otherwise indicated below, the Content is provided
1523
+ to you under the terms and conditions of the Eclipse Public License
1524
+ Version 1.0 ("EPL"). A copy of the EPL is available at http://
1525
+ www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program"
1526
+ will mean the Content.
1527
+
1528
+ If you did not receive this Content directly from the Eclipse
1529
+ Foundation, the Content is being redistributed by another party
1530
+ ("Redistributor") and different terms and conditions may apply to your
1531
+ use of any object code in the Content. Check the Redistributor's
1532
+ license that was provided with the Content. If no such license exists,
1533
+ contact the Redistributor. Unless otherwise indicated below, the terms
1534
+ and conditions of the EPL still apply to any source code in the
1535
+ Content and such source code may be obtained at http://www.eclipse.org.
1536
+
1537
+ 18. Some of the cuBLAS library routines uses code from
1538
+ OpenAI, which is subject to the following license:
1539
+
1540
+ License URL
1541
+ https://github.com/openai/openai-gemm/blob/master/LICENSE
1542
+
1543
+ License Text
1544
+ The MIT License
1545
+
1546
+ Copyright (c) 2016 OpenAI (http://openai.com), 2016 Google Inc.
1547
+
1548
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1549
+ of this software and associated documentation files (the "Software"), to deal
1550
+ in the Software without restriction, including without limitation the rights
1551
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1552
+ copies of the Software, and to permit persons to whom the Software is
1553
+ furnished to do so, subject to the following conditions:
1554
+
1555
+ The above copyright notice and this permission notice shall be included in
1556
+ all copies or substantial portions of the Software.
1557
+
1558
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1559
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1560
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1561
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1562
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1563
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1564
+ THE SOFTWARE.
1565
+
1566
+ 19. Licensee's use of the Visual Studio Setup Configuration
1567
+ Samples is subject to the following license:
1568
+
1569
+ The MIT License (MIT)
1570
+ Copyright (C) Microsoft Corporation. All rights reserved.
1571
+
1572
+ Permission is hereby granted, free of charge, to any person
1573
+ obtaining a copy of this software and associated documentation
1574
+ files (the "Software"), to deal in the Software without restriction,
1575
+ including without limitation the rights to use, copy, modify, merge,
1576
+ publish, distribute, sublicense, and/or sell copies of the Software,
1577
+ and to permit persons to whom the Software is furnished to do so,
1578
+ subject to the following conditions:
1579
+
1580
+ The above copyright notice and this permission notice shall be included
1581
+ in all copies or substantial portions of the Software.
1582
+
1583
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1584
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1585
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1586
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1587
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1588
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1589
+
1590
+ 20. Licensee's use of linmath.h header for CPU functions for
1591
+ GL vector/matrix operations from lunarG is subject to the
1592
+ Apache License Version 2.0.
1593
+
1594
+ 21. The DX12-CUDA sample uses the d3dx12.h header, which is
1595
+ subject to the MIT license.
1596
+
1597
+ 22. Components of the driver and compiler used for binary management, including
1598
+ nvFatBin, nvcc, and cuobjdump, use the Zstandard library which is subject to
1599
+ the following license:
1600
+
1601
+ BSD License
1602
+
1603
+ For Zstandard software
1604
+
1605
+ Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
1606
+
1607
+ Redistribution and use in source and binary forms, with or without modification,
1608
+ are permitted provided that the following conditions are met:
1609
+
1610
+ * Redistributions of source code must retain the above copyright notice, this
1611
+ list of conditions and the following disclaimer.
1612
+
1613
+ * Redistributions in binary form must reproduce the above copyright notice,
1614
+ this list of conditions and the following disclaimer in the documentation
1615
+ and/or other materials provided with the distribution.
1616
+
1617
+ * Neither the name Facebook, nor Meta, nor the names of its contributors may
1618
+ be used to endorse or promote products derived from this software without
1619
+ specific prior written permission.
1620
+
1621
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1622
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1623
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1624
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
1625
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
1626
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
1627
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
1628
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1629
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
1630
+ OF SUCH DAMAGE.
1631
+
1632
+ -----------------
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/paths.json ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paths": [
3
+ {
4
+ "_path": "lib/libcupti.so",
5
+ "path_type": "softlink",
6
+ "sha256": "41bda139a2dfe3fbef2e1d68197fa2bd21f23c3d1f8f77677845e3d828bbb29c",
7
+ "size_in_bytes": 7610377
8
+ },
9
+ {
10
+ "_path": "lib/libnvperf_host.so",
11
+ "path_type": "softlink",
12
+ "sha256": "f5e1d2d4d1b73914b53f8bd6932026b44cfffd8c9566ed3b25cd62ce1911295e",
13
+ "size_in_bytes": 25846833
14
+ },
15
+ {
16
+ "_path": "lib/libnvperf_target.so",
17
+ "path_type": "softlink",
18
+ "sha256": "a8c9357f098732615582a9dd4e058b96d3160198ece993e84133a6f8956b17bb",
19
+ "size_in_bytes": 5290129
20
+ },
21
+ {
22
+ "_path": "lib/libpcsamplingutil.so",
23
+ "path_type": "softlink",
24
+ "sha256": "660f3547db3d4f3bcf9b92f146b9007b8e95a7f195321796de5360a4e7700a73",
25
+ "size_in_bytes": 973777
26
+ },
27
+ {
28
+ "_path": "targets/x86_64-linux/include/Openacc/cupti_openacc.h",
29
+ "path_type": "hardlink",
30
+ "sha256": "67438ce5efe16ddddcc5d5f29f74821ea04141ac0b83840e467966e7b0abdbe3",
31
+ "size_in_bytes": 3513
32
+ },
33
+ {
34
+ "_path": "targets/x86_64-linux/include/Openmp/cupti_openmp.h",
35
+ "path_type": "hardlink",
36
+ "sha256": "13558d99e6ffec76944a605e82d50d7b8215d62ee95de371833225c8a9f5ceb3",
37
+ "size_in_bytes": 3491
38
+ },
39
+ {
40
+ "_path": "targets/x86_64-linux/include/Openmp/omp-tools.h",
41
+ "path_type": "hardlink",
42
+ "sha256": "026b82ff13c2ed53eedc1f96e0f997b8236e7c56b0858f0f8cd5de3da40500e8",
43
+ "size_in_bytes": 37403
44
+ },
45
+ {
46
+ "_path": "targets/x86_64-linux/include/cuda_stdint.h",
47
+ "path_type": "hardlink",
48
+ "sha256": "5db14e93d0ad2632aa93b3e960da9b495b03c40b1533c6af038ad6a4f8b40634",
49
+ "size_in_bytes": 4093
50
+ },
51
+ {
52
+ "_path": "targets/x86_64-linux/include/cupti.h",
53
+ "path_type": "hardlink",
54
+ "sha256": "2645720064c8318cf09bad9d7d5a9ab379cc7082e180ffd6773e9f878fcd103d",
55
+ "size_in_bytes": 4697
56
+ },
57
+ {
58
+ "_path": "targets/x86_64-linux/include/cupti_activity.h",
59
+ "path_type": "hardlink",
60
+ "sha256": "809286946d8989f5b7e8bc7eba325c28196752b34ea13c5aaf9d64dbc1ab52d5",
61
+ "size_in_bytes": 229848
62
+ },
63
+ {
64
+ "_path": "targets/x86_64-linux/include/cupti_activity_deprecated.h",
65
+ "path_type": "hardlink",
66
+ "sha256": "074a78cdb965daf527d63d089931ba4086e9a7a1e2c3ccbe5f4db56667fb7e51",
67
+ "size_in_bytes": 137602
68
+ },
69
+ {
70
+ "_path": "targets/x86_64-linux/include/cupti_callbacks.h",
71
+ "path_type": "hardlink",
72
+ "sha256": "699f9213460c15f4fd47e521e4c1dba0f834ca91cc8de492009c37cdd3fb382b",
73
+ "size_in_bytes": 29689
74
+ },
75
+ {
76
+ "_path": "targets/x86_64-linux/include/cupti_checkpoint.h",
77
+ "path_type": "hardlink",
78
+ "sha256": "ad3cfc2685b1a844815f26565216491a6e31798731e0e24eb49ecb775dd3fdbd",
79
+ "size_in_bytes": 5264
80
+ },
81
+ {
82
+ "_path": "targets/x86_64-linux/include/cupti_common.h",
83
+ "path_type": "hardlink",
84
+ "sha256": "f399bbe1bc54817a77b4468f4297b379ace6a6c34cc38d4fb2335262641d4f6d",
85
+ "size_in_bytes": 3514
86
+ },
87
+ {
88
+ "_path": "targets/x86_64-linux/include/cupti_driver_cbid.h",
89
+ "path_type": "hardlink",
90
+ "sha256": "9a404d3d890b7dc1318506450e8d2260795a1c95860f6bce31db73695fa51149",
91
+ "size_in_bytes": 77280
92
+ },
93
+ {
94
+ "_path": "targets/x86_64-linux/include/cupti_events.h",
95
+ "path_type": "hardlink",
96
+ "sha256": "f35c1cbc5bef1e3f1198409b6c4a7915f823248403a02ffcd4586fab39c5ba96",
97
+ "size_in_bytes": 51923
98
+ },
99
+ {
100
+ "_path": "targets/x86_64-linux/include/cupti_metrics.h",
101
+ "path_type": "hardlink",
102
+ "sha256": "ce67d9c6ae55914269e938fba171243fda32711370d7307d54d8684256e188de",
103
+ "size_in_bytes": 32175
104
+ },
105
+ {
106
+ "_path": "targets/x86_64-linux/include/cupti_nvtx_cbid.h",
107
+ "path_type": "hardlink",
108
+ "sha256": "fdaccfb51d60e2a8afbd7eea6ef1d1520d111c2585ee210e2721cc37da997bd1",
109
+ "size_in_bytes": 5912
110
+ },
111
+ {
112
+ "_path": "targets/x86_64-linux/include/cupti_pcsampling.h",
113
+ "path_type": "hardlink",
114
+ "sha256": "c9c2474f7e8398f21a5731ec077c718d792117211f30224e9772db0ac1c58320",
115
+ "size_in_bytes": 32144
116
+ },
117
+ {
118
+ "_path": "targets/x86_64-linux/include/cupti_pcsampling_util.h",
119
+ "path_type": "hardlink",
120
+ "sha256": "971f0268d5e8c097b966f734e8b13ebbf66bcbf8ce0ecd6633a8fd4395885fd1",
121
+ "size_in_bytes": 12430
122
+ },
123
+ {
124
+ "_path": "targets/x86_64-linux/include/cupti_pmsampling.h",
125
+ "path_type": "hardlink",
126
+ "sha256": "53de6128ec0891949b18d54fd7541298c6b007ca9d26c96363fb54258e2f79d7",
127
+ "size_in_bytes": 20440
128
+ },
129
+ {
130
+ "_path": "targets/x86_64-linux/include/cupti_profiler_host.h",
131
+ "path_type": "hardlink",
132
+ "sha256": "32491f5e528146b44be0d7da3c58ae1380f8cff8299b18815964c18b1cb23139",
133
+ "size_in_bytes": 22155
134
+ },
135
+ {
136
+ "_path": "targets/x86_64-linux/include/cupti_profiler_target.h",
137
+ "path_type": "hardlink",
138
+ "sha256": "31d2eeb4879fc1d31323bc2c71ed0b3b736e0a6dc5460151dc6c4092a69d32ce",
139
+ "size_in_bytes": 32294
140
+ },
141
+ {
142
+ "_path": "targets/x86_64-linux/include/cupti_range_profiler.h",
143
+ "path_type": "hardlink",
144
+ "sha256": "b9ee5b500fb7c42c00b501b20dee4ed5de6b02645b55b72b5ca7c84dde313352",
145
+ "size_in_bytes": 18779
146
+ },
147
+ {
148
+ "_path": "targets/x86_64-linux/include/cupti_result.h",
149
+ "path_type": "hardlink",
150
+ "sha256": "c50a81b1946889c05259d935959004fd67998fcf0c2c7e82953a39f28b21c7ef",
151
+ "size_in_bytes": 13114
152
+ },
153
+ {
154
+ "_path": "targets/x86_64-linux/include/cupti_runtime_cbid.h",
155
+ "path_type": "hardlink",
156
+ "sha256": "059267cecbdfd918d194728484f8c293409d8cb23dfcbfa70a54f07b8bfd3547",
157
+ "size_in_bytes": 48372
158
+ },
159
+ {
160
+ "_path": "targets/x86_64-linux/include/cupti_sass_metrics.h",
161
+ "path_type": "hardlink",
162
+ "sha256": "dd15bdb2726e15074e86b127df00c93abbb4e6ad15ff3b2c5aba83eedbd524ac",
163
+ "size_in_bytes": 19674
164
+ },
165
+ {
166
+ "_path": "targets/x86_64-linux/include/cupti_target.h",
167
+ "path_type": "hardlink",
168
+ "sha256": "c78573d54a5bea6f62c6656998668a425743598408dce67ea1c1171b334ad041",
169
+ "size_in_bytes": 1263
170
+ },
171
+ {
172
+ "_path": "targets/x86_64-linux/include/cupti_version.h",
173
+ "path_type": "hardlink",
174
+ "sha256": "2855e68c1e28fa2646bcef256bd49ff54ae0e2ae2cae61229a7c5b3c2c9dd8df",
175
+ "size_in_bytes": 4506
176
+ },
177
+ {
178
+ "_path": "targets/x86_64-linux/include/generated_cudaGL_meta.h",
179
+ "path_type": "hardlink",
180
+ "sha256": "75f77642e6917448db4ad38abda40b8b531dfeaae945087c3dfc99ce727c6d66",
181
+ "size_in_bytes": 3115
182
+ },
183
+ {
184
+ "_path": "targets/x86_64-linux/include/generated_cudaVDPAU_meta.h",
185
+ "path_type": "hardlink",
186
+ "sha256": "7c079db28431694de12000290160ce2ac6bd92072e430e2d7727fc9252e6fb79",
187
+ "size_in_bytes": 1453
188
+ },
189
+ {
190
+ "_path": "targets/x86_64-linux/include/generated_cuda_gl_interop_meta.h",
191
+ "path_type": "hardlink",
192
+ "sha256": "2d73aabd009e8f4b028004f52d428a619e3ae84171378848c1ff682215ce2c5d",
193
+ "size_in_bytes": 2250
194
+ },
195
+ {
196
+ "_path": "targets/x86_64-linux/include/generated_cuda_meta.h",
197
+ "path_type": "hardlink",
198
+ "sha256": "0c37607d6f38195b6c19bafb75a3497219a66434bfc5fbc31ef1429b72353847",
199
+ "size_in_bytes": 98664
200
+ },
201
+ {
202
+ "_path": "targets/x86_64-linux/include/generated_cuda_runtime_api_meta.h",
203
+ "path_type": "hardlink",
204
+ "sha256": "0aece2683c0ed8c877de96822c62aa8bbdcf41f60d9b3a77f3062b8402be7e78",
205
+ "size_in_bytes": 72208
206
+ },
207
+ {
208
+ "_path": "targets/x86_64-linux/include/generated_cuda_vdpau_interop_meta.h",
209
+ "path_type": "hardlink",
210
+ "sha256": "f0e2ea58ddba6846294d6517b5b1c9bc0e4662156fdf26d854e4d6ef22b7ef3f",
211
+ "size_in_bytes": 1367
212
+ },
213
+ {
214
+ "_path": "targets/x86_64-linux/include/generated_cudart_removed_meta.h",
215
+ "path_type": "hardlink",
216
+ "sha256": "5f72395979a1b6c24d365818edca09e6f838b75d46e45451e97a3b31ba0879c9",
217
+ "size_in_bytes": 5172
218
+ },
219
+ {
220
+ "_path": "targets/x86_64-linux/include/generated_nvtx_meta.h",
221
+ "path_type": "hardlink",
222
+ "sha256": "6076ff443f20dece26f0f267ed9d309f1bd41daae5ec13805f9003afe04bdc72",
223
+ "size_in_bytes": 7513
224
+ },
225
+ {
226
+ "_path": "targets/x86_64-linux/include/nvperf_common.h",
227
+ "path_type": "hardlink",
228
+ "sha256": "ca479327923a734cfc2aa310875de194968c6878aaa95501eb4a065ce0aeec18",
229
+ "size_in_bytes": 17255
230
+ },
231
+ {
232
+ "_path": "targets/x86_64-linux/include/nvperf_cuda_host.h",
233
+ "path_type": "hardlink",
234
+ "sha256": "802d095a851d4f200e26cf32e2ea0922189ef57ab8c85e07ce8ba62ec60d5735",
235
+ "size_in_bytes": 7562
236
+ },
237
+ {
238
+ "_path": "targets/x86_64-linux/include/nvperf_host.h",
239
+ "path_type": "hardlink",
240
+ "sha256": "c02078991f1a2075a2a93d53b31ced420581461ff28aae400459bcb1bdff8f08",
241
+ "size_in_bytes": 49197
242
+ },
243
+ {
244
+ "_path": "targets/x86_64-linux/include/nvperf_target.h",
245
+ "path_type": "hardlink",
246
+ "sha256": "8d1a90b6e34b4eb0b33c37727803644eb3c48a34824e32f2d80d6a8cabb449d3",
247
+ "size_in_bytes": 23607
248
+ },
249
+ {
250
+ "_path": "targets/x86_64-linux/lib/libcheckpoint.so",
251
+ "path_type": "hardlink",
252
+ "sha256": "df9e0f2a35df2af5c48c5317d39c08336442de83f976030ba420281df917c344",
253
+ "size_in_bytes": 1650553
254
+ },
255
+ {
256
+ "_path": "targets/x86_64-linux/lib/libcupti.so",
257
+ "path_type": "softlink",
258
+ "sha256": "41bda139a2dfe3fbef2e1d68197fa2bd21f23c3d1f8f77677845e3d828bbb29c",
259
+ "size_in_bytes": 7610377
260
+ },
261
+ {
262
+ "_path": "targets/x86_64-linux/lib/libnvperf_host.so",
263
+ "path_type": "hardlink",
264
+ "sha256": "f5e1d2d4d1b73914b53f8bd6932026b44cfffd8c9566ed3b25cd62ce1911295e",
265
+ "size_in_bytes": 25846833
266
+ },
267
+ {
268
+ "_path": "targets/x86_64-linux/lib/libnvperf_target.so",
269
+ "path_type": "hardlink",
270
+ "sha256": "a8c9357f098732615582a9dd4e058b96d3160198ece993e84133a6f8956b17bb",
271
+ "size_in_bytes": 5290129
272
+ },
273
+ {
274
+ "_path": "targets/x86_64-linux/lib/libpcsamplingutil.so",
275
+ "path_type": "hardlink",
276
+ "sha256": "660f3547db3d4f3bcf9b92f146b9007b8e95a7f195321796de5360a4e7700a73",
277
+ "size_in_bytes": 973777
278
+ }
279
+ ],
280
+ "paths_version": 1
281
+ }
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/repodata_record.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "cuda-cupti-dev",
3
+ "version": "12.8.90",
4
+ "build": "0",
5
+ "build_number": 0,
6
+ "channel": "https://conda.anaconda.org/nvidia/linux-64",
7
+ "subdir": "linux-64",
8
+ "fn": "cuda-cupti-dev-12.8.90-0.conda",
9
+ "md5": "9a687e3f9a8d216c603867ebdfcb6a32",
10
+ "url": "https://conda.anaconda.org/nvidia/linux-64/cuda-cupti-dev-12.8.90-0.conda",
11
+ "sha256": "e32c1000a75d0be1bcd63ef55b60853c0f8979b4621121bab81535453342cf93",
12
+ "arch": "x86_64",
13
+ "platform": "linux",
14
+ "depends": [
15
+ "__glibc >=2.17,<3.0.a0",
16
+ "cuda-cupti 12.8.90 0",
17
+ "cuda-version >=12.8,<12.9.0a0",
18
+ "libgcc-ng >=11.2.0",
19
+ "libstdcxx-ng >=11.2.0"
20
+ ],
21
+ "constrains": [
22
+ "cuda-cupti-static >=12.8.90"
23
+ ],
24
+ "license": "LicenseRef-NVIDIA-End-User-License-Agreement",
25
+ "timestamp": 1739450047000,
26
+ "size": 4264975
27
+ }
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/run_exports.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"weak": ["cuda-cupti >=12.8.90,<13.0a0"]}
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/info/test/run_test.sh ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ set -ex
4
+
5
+
6
+
7
+ test -L $PREFIX/lib/libcupti.so
8
+ test -L $PREFIX/lib/libnvperf_host.so
9
+ test -L $PREFIX/lib/libnvperf_target.so
10
+ test -f $PREFIX/targets/x86_64-linux/include/cupti.h
11
+ test -L $PREFIX/targets/x86_64-linux/lib/libcupti.so
12
+ test -f $PREFIX/targets/x86_64-linux/lib/libnvperf_host.so
13
+ test -f $PREFIX/targets/x86_64-linux/lib/libnvperf_target.so
14
+ exit 0
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/Openacc/cupti_openacc.h ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2017 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #include <cuda_stdint.h>
51
+
52
+ #if !defined(_CUPTI_OPENACC_H_)
53
+ #define _CUPTI_OPENACC_H_
54
+
55
+ #ifndef CUPTIAPI
56
+ #ifdef _WIN32
57
+ #define CUPTIAPI __stdcall
58
+ #else
59
+ #define CUPTIAPI
60
+ #endif
61
+ #endif
62
+
63
+ #if defined(__LP64__)
64
+ #define CUPTILP64 1
65
+ #elif defined(_WIN64)
66
+ #define CUPTILP64 1
67
+ #else
68
+ #undef CUPTILP64
69
+ #endif
70
+
71
+ #if defined(__cplusplus)
72
+ extern "C" {
73
+ #endif
74
+
75
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
76
+ #pragma GCC visibility push(default)
77
+ #endif
78
+
79
+ /**
80
+ * \brief Initialize OpenACC support
81
+ *
82
+ * \param profRegister function of type acc_prof_reg as obtained from acc_register_library
83
+ * \param profUnregister function of type acc_prof_reg as obtained from acc_register_library
84
+ * \param profLookup function of type acc_prof_lookup as obtained from acc_register_library
85
+ */
86
+ CUptiResult CUPTIAPI
87
+ cuptiOpenACCInitialize(void *profRegister, void *profUnregister, void *profLookup);
88
+
89
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
90
+ #pragma GCC visibility pop
91
+ #endif
92
+
93
+ #if defined(__cplusplus)
94
+ }
95
+ #endif
96
+
97
+ #endif /*_CUPTI_OPENACC_H_*/
98
+
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/Openmp/cupti_openmp.h ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2018 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #include <cuda_stdint.h>
51
+ #include "Openmp/omp-tools.h"
52
+
53
+ #if !defined(_CUPTI_OPENMP_H_)
54
+ #define _CUPTI_OPENMP_H_
55
+
56
+ #ifndef CUPTIAPI
57
+ #ifdef _WIN32
58
+ #define CUPTIAPI __stdcall
59
+ #else
60
+ #define CUPTIAPI
61
+ #endif
62
+ #endif
63
+
64
+ #if defined(__LP64__)
65
+ #define CUPTILP64 1
66
+ #elif defined(_WIN64)
67
+ #define CUPTILP64 1
68
+ #else
69
+ #undef CUPTILP64
70
+ #endif
71
+
72
+ #if defined(__cplusplus)
73
+ extern "C" {
74
+ #endif
75
+
76
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
77
+ #pragma GCC visibility push(default)
78
+ #endif
79
+
80
+ /**
81
+ * \brief Initialize OPENMP support (deprecated, used before OpenMP 5.0)
82
+ *
83
+ */
84
+ int CUPTIAPI cuptiOpenMpInitialize(ompt_function_lookup_t ompt_fn_lookup, const char *runtime_version, unsigned int ompt_version);
85
+
86
+ /**
87
+ * \brief Initialize OPENMP support
88
+ *
89
+ */
90
+ int CUPTIAPI cuptiOpenMpInitialize_v2(ompt_function_lookup_t lookup, int initial_device_num, ompt_data_t *tool_data);
91
+
92
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
93
+ #pragma GCC visibility pop
94
+ #endif
95
+
96
+ #if defined(__cplusplus)
97
+ }
98
+ #endif
99
+
100
+ #endif /*_CUPTI_OPENMP_H_*/
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/Openmp/omp-tools.h ADDED
@@ -0,0 +1,1083 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * include/50/omp-tools.h.var
3
+ */
4
+
5
+ //===----------------------------------------------------------------------===//
6
+ //
7
+ // The LLVM Compiler Infrastructure
8
+ //
9
+ // This file is dual licensed under the MIT and the University of Illinois Open
10
+ // Source Licenses. See LICENSE.txt for details.
11
+ //
12
+ //===----------------------------------------------------------------------===//
13
+
14
+ #ifndef __OMPT__
15
+ #define __OMPT__
16
+
17
+ /*****************************************************************************
18
+ * system include files
19
+ *****************************************************************************/
20
+
21
+ #include <stdint.h>
22
+ #include <stddef.h>
23
+
24
+ /*****************************************************************************
25
+ * iteration macros
26
+ *****************************************************************************/
27
+
28
+ #define FOREACH_OMPT_INQUIRY_FN(macro) \
29
+ macro (ompt_enumerate_states) \
30
+ macro (ompt_enumerate_mutex_impls) \
31
+ \
32
+ macro (ompt_set_callback) \
33
+ macro (ompt_get_callback) \
34
+ \
35
+ macro (ompt_get_state) \
36
+ \
37
+ macro (ompt_get_parallel_info) \
38
+ macro (ompt_get_task_info) \
39
+ macro (ompt_get_task_memory) \
40
+ macro (ompt_get_thread_data) \
41
+ macro (ompt_get_unique_id) \
42
+ macro (ompt_finalize_tool) \
43
+ \
44
+ macro(ompt_get_num_procs) \
45
+ macro(ompt_get_num_places) \
46
+ macro(ompt_get_place_proc_ids) \
47
+ macro(ompt_get_place_num) \
48
+ macro(ompt_get_partition_place_nums) \
49
+ macro(ompt_get_proc_id) \
50
+ \
51
+ macro(ompt_get_target_info) \
52
+ macro(ompt_get_num_devices)
53
+
54
+ #define FOREACH_OMPT_STATE(macro) \
55
+ \
56
+ /* first available state */ \
57
+ macro (ompt_state_undefined, 0x102) /* undefined thread state */ \
58
+ \
59
+ /* work states (0..15) */ \
60
+ macro (ompt_state_work_serial, 0x000) /* working outside parallel */ \
61
+ macro (ompt_state_work_parallel, 0x001) /* working within parallel */ \
62
+ macro (ompt_state_work_reduction, 0x002) /* performing a reduction */ \
63
+ \
64
+ /* barrier wait states (16..31) */ \
65
+ macro (ompt_state_wait_barrier, 0x010) /* waiting at a barrier */ \
66
+ macro (ompt_state_wait_barrier_implicit_parallel, 0x011) \
67
+ /* implicit barrier at the end of parallel region */\
68
+ macro (ompt_state_wait_barrier_implicit_workshare, 0x012) \
69
+ /* implicit barrier at the end of worksharing */ \
70
+ macro (ompt_state_wait_barrier_implicit, 0x013) /* implicit barrier */ \
71
+ macro (ompt_state_wait_barrier_explicit, 0x014) /* explicit barrier */ \
72
+ \
73
+ /* task wait states (32..63) */ \
74
+ macro (ompt_state_wait_taskwait, 0x020) /* waiting at a taskwait */ \
75
+ macro (ompt_state_wait_taskgroup, 0x021) /* waiting at a taskgroup */ \
76
+ \
77
+ /* mutex wait states (64..127) */ \
78
+ macro (ompt_state_wait_mutex, 0x040) \
79
+ macro (ompt_state_wait_lock, 0x041) /* waiting for lock */ \
80
+ macro (ompt_state_wait_critical, 0x042) /* waiting for critical */ \
81
+ macro (ompt_state_wait_atomic, 0x043) /* waiting for atomic */ \
82
+ macro (ompt_state_wait_ordered, 0x044) /* waiting for ordered */ \
83
+ \
84
+ /* target wait states (128..255) */ \
85
+ macro (ompt_state_wait_target, 0x080) /* waiting for target region */ \
86
+ macro (ompt_state_wait_target_map, 0x081) /* waiting for target data mapping operation */ \
87
+ macro (ompt_state_wait_target_update, 0x082) /* waiting for target update operation */ \
88
+ \
89
+ /* misc (256..511) */ \
90
+ macro (ompt_state_idle, 0x100) /* waiting for work */ \
91
+ macro (ompt_state_overhead, 0x101) /* overhead excluding wait states */ \
92
+ \
93
+ /* implementation-specific states (512..) */
94
+
95
+
96
+ #define FOREACH_KMP_MUTEX_IMPL(macro) \
97
+ macro (kmp_mutex_impl_none, 0) /* unknown implementation */ \
98
+ macro (kmp_mutex_impl_spin, 1) /* based on spin */ \
99
+ macro (kmp_mutex_impl_queuing, 2) /* based on some fair policy */ \
100
+ macro (kmp_mutex_impl_speculative, 3) /* based on HW-supported speculation */
101
+
102
+ #define FOREACH_OMPT_EVENT(macro) \
103
+ \
104
+ /*--- Mandatory Events ---*/ \
105
+ macro (ompt_callback_thread_begin, ompt_callback_thread_begin_t, 1) /* thread begin */ \
106
+ macro (ompt_callback_thread_end, ompt_callback_thread_end_t, 2) /* thread end */ \
107
+ \
108
+ macro (ompt_callback_parallel_begin, ompt_callback_parallel_begin_t, 3) /* parallel begin */ \
109
+ macro (ompt_callback_parallel_end, ompt_callback_parallel_end_t, 4) /* parallel end */ \
110
+ \
111
+ macro (ompt_callback_task_create, ompt_callback_task_create_t, 5) /* task begin */ \
112
+ macro (ompt_callback_task_schedule, ompt_callback_task_schedule_t, 6) /* task schedule */ \
113
+ macro (ompt_callback_implicit_task, ompt_callback_implicit_task_t, 7) /* implicit task */ \
114
+ \
115
+ macro (ompt_callback_target, ompt_callback_target_t, 8) /* target */ \
116
+ macro (ompt_callback_target_data_op, ompt_callback_target_data_op_t, 9) /* target data op */ \
117
+ macro (ompt_callback_target_submit, ompt_callback_target_submit_t, 10) /* target submit */ \
118
+ \
119
+ macro (ompt_callback_control_tool, ompt_callback_control_tool_t, 11) /* control tool */ \
120
+ \
121
+ macro (ompt_callback_device_initialize, ompt_callback_device_initialize_t, 12) /* device initialize */ \
122
+ macro (ompt_callback_device_finalize, ompt_callback_device_finalize_t, 13) /* device finalize */ \
123
+ \
124
+ macro (ompt_callback_device_load, ompt_callback_device_load_t, 14) /* device load */ \
125
+ macro (ompt_callback_device_unload, ompt_callback_device_unload_t, 15) /* device unload */ \
126
+ \
127
+ /* Optional Events */ \
128
+ macro (ompt_callback_sync_region_wait, ompt_callback_sync_region_t, 16) /* sync region wait begin or end */ \
129
+ \
130
+ macro (ompt_callback_mutex_released, ompt_callback_mutex_t, 17) /* mutex released */ \
131
+ \
132
+ macro (ompt_callback_dependences, ompt_callback_dependences_t, 18) /* report task dependences */ \
133
+ macro (ompt_callback_task_dependence, ompt_callback_task_dependence_t, 19) /* report task dependence */ \
134
+ \
135
+ macro (ompt_callback_work, ompt_callback_work_t, 20) /* task at work begin or end */ \
136
+ \
137
+ macro (ompt_callback_master, ompt_callback_master_t, 21) /* task at master begin or end */ \
138
+ \
139
+ macro (ompt_callback_target_map, ompt_callback_target_map_t, 22) /* target map */ \
140
+ \
141
+ macro (ompt_callback_sync_region, ompt_callback_sync_region_t, 23) /* sync region begin or end */ \
142
+ \
143
+ macro (ompt_callback_lock_init, ompt_callback_mutex_acquire_t, 24) /* lock init */ \
144
+ macro (ompt_callback_lock_destroy, ompt_callback_mutex_t, 25) /* lock destroy */ \
145
+ \
146
+ macro (ompt_callback_mutex_acquire, ompt_callback_mutex_acquire_t, 26) /* mutex acquire */ \
147
+ macro (ompt_callback_mutex_acquired, ompt_callback_mutex_t, 27) /* mutex acquired */ \
148
+ \
149
+ macro (ompt_callback_nest_lock, ompt_callback_nest_lock_t, 28) /* nest lock */ \
150
+ \
151
+ macro (ompt_callback_flush, ompt_callback_flush_t, 29) /* after executing flush */ \
152
+ \
153
+ macro (ompt_callback_cancel, ompt_callback_cancel_t, 30) /* cancel innermost binding region */ \
154
+ \
155
+ macro (ompt_callback_reduction, ompt_callback_sync_region_t, 31) /* reduction */ \
156
+ \
157
+ macro (ompt_callback_dispatch, ompt_callback_dispatch_t, 32) /* dispatch of work */
158
+
159
+ /*****************************************************************************
160
+ * implementation specific types
161
+ *****************************************************************************/
162
+
163
+ typedef enum kmp_mutex_impl_t {
164
+ #define kmp_mutex_impl_macro(impl, code) impl = code,
165
+ FOREACH_KMP_MUTEX_IMPL(kmp_mutex_impl_macro)
166
+ #undef kmp_mutex_impl_macro
167
+ } kmp_mutex_impl_t;
168
+
169
+ /*****************************************************************************
170
+ * definitions generated from spec
171
+ *****************************************************************************/
172
+
173
+ typedef enum ompt_callbacks_t {
174
+ ompt_callback_thread_begin = 1,
175
+ ompt_callback_thread_end = 2,
176
+ ompt_callback_parallel_begin = 3,
177
+ ompt_callback_parallel_end = 4,
178
+ ompt_callback_task_create = 5,
179
+ ompt_callback_task_schedule = 6,
180
+ ompt_callback_implicit_task = 7,
181
+ ompt_callback_target = 8,
182
+ ompt_callback_target_data_op = 9,
183
+ ompt_callback_target_submit = 10,
184
+ ompt_callback_control_tool = 11,
185
+ ompt_callback_device_initialize = 12,
186
+ ompt_callback_device_finalize = 13,
187
+ ompt_callback_device_load = 14,
188
+ ompt_callback_device_unload = 15,
189
+ ompt_callback_sync_region_wait = 16,
190
+ ompt_callback_mutex_released = 17,
191
+ ompt_callback_dependences = 18,
192
+ ompt_callback_task_dependence = 19,
193
+ ompt_callback_work = 20,
194
+ ompt_callback_master = 21,
195
+ ompt_callback_target_map = 22,
196
+ ompt_callback_sync_region = 23,
197
+ ompt_callback_lock_init = 24,
198
+ ompt_callback_lock_destroy = 25,
199
+ ompt_callback_mutex_acquire = 26,
200
+ ompt_callback_mutex_acquired = 27,
201
+ ompt_callback_nest_lock = 28,
202
+ ompt_callback_flush = 29,
203
+ ompt_callback_cancel = 30,
204
+ ompt_callback_reduction = 31,
205
+ ompt_callback_dispatch = 32
206
+ } ompt_callbacks_t;
207
+
208
+ typedef enum ompt_record_t {
209
+ ompt_record_ompt = 1,
210
+ ompt_record_native = 2,
211
+ ompt_record_invalid = 3
212
+ } ompt_record_t;
213
+
214
+ typedef enum ompt_record_native_t {
215
+ ompt_record_native_info = 1,
216
+ ompt_record_native_event = 2
217
+ } ompt_record_native_t;
218
+
219
+ typedef enum ompt_set_result_t {
220
+ ompt_set_error = 0,
221
+ ompt_set_never = 1,
222
+ ompt_set_impossible = 2,
223
+ ompt_set_sometimes = 3,
224
+ ompt_set_sometimes_paired = 4,
225
+ ompt_set_always = 5
226
+ } ompt_set_result_t;
227
+
228
+ typedef uint64_t ompt_id_t;
229
+
230
+ typedef uint64_t ompt_device_time_t;
231
+
232
+ typedef uint64_t ompt_buffer_cursor_t;
233
+
234
+ typedef enum ompt_thread_t {
235
+ ompt_thread_initial = 1,
236
+ ompt_thread_worker = 2,
237
+ ompt_thread_other = 3,
238
+ ompt_thread_unknown = 4
239
+ } ompt_thread_t;
240
+
241
+ typedef enum ompt_scope_endpoint_t {
242
+ ompt_scope_begin = 1,
243
+ ompt_scope_end = 2
244
+ } ompt_scope_endpoint_t;
245
+
246
+ typedef enum ompt_dispatch_t {
247
+ ompt_dispatch_iteration = 1,
248
+ ompt_dispatch_section = 2
249
+ } ompt_dispatch_t;
250
+
251
+ typedef enum ompt_sync_region_t {
252
+ ompt_sync_region_barrier = 1,
253
+ ompt_sync_region_barrier_implicit = 2,
254
+ ompt_sync_region_barrier_explicit = 3,
255
+ ompt_sync_region_barrier_implementation = 4,
256
+ ompt_sync_region_taskwait = 5,
257
+ ompt_sync_region_taskgroup = 6,
258
+ ompt_sync_region_reduction = 7
259
+ } ompt_sync_region_t;
260
+
261
+ typedef enum ompt_target_data_op_t {
262
+ ompt_target_data_alloc = 1,
263
+ ompt_target_data_transfer_to_device = 2,
264
+ ompt_target_data_transfer_from_device = 3,
265
+ ompt_target_data_delete = 4,
266
+ ompt_target_data_associate = 5,
267
+ ompt_target_data_disassociate = 6
268
+ } ompt_target_data_op_t;
269
+
270
+ typedef enum ompt_work_t {
271
+ ompt_work_loop = 1,
272
+ ompt_work_sections = 2,
273
+ ompt_work_single_executor = 3,
274
+ ompt_work_single_other = 4,
275
+ ompt_work_workshare = 5,
276
+ ompt_work_distribute = 6,
277
+ ompt_work_taskloop = 7
278
+ } ompt_work_t;
279
+
280
+ typedef enum ompt_mutex_t {
281
+ ompt_mutex_lock = 1,
282
+ ompt_mutex_test_lock = 2,
283
+ ompt_mutex_nest_lock = 3,
284
+ ompt_mutex_test_nest_lock = 4,
285
+ ompt_mutex_critical = 5,
286
+ ompt_mutex_atomic = 6,
287
+ ompt_mutex_ordered = 7
288
+ } ompt_mutex_t;
289
+
290
+ typedef enum ompt_native_mon_flag_t {
291
+ ompt_native_data_motion_explicit = 0x01,
292
+ ompt_native_data_motion_implicit = 0x02,
293
+ ompt_native_kernel_invocation = 0x04,
294
+ ompt_native_kernel_execution = 0x08,
295
+ ompt_native_driver = 0x10,
296
+ ompt_native_runtime = 0x20,
297
+ ompt_native_overhead = 0x40,
298
+ ompt_native_idleness = 0x80
299
+ } ompt_native_mon_flag_t;
300
+
301
+ typedef enum ompt_task_flag_t {
302
+ ompt_task_initial = 0x00000001,
303
+ ompt_task_implicit = 0x00000002,
304
+ ompt_task_explicit = 0x00000004,
305
+ ompt_task_target = 0x00000008,
306
+ ompt_task_undeferred = 0x08000000,
307
+ ompt_task_untied = 0x10000000,
308
+ ompt_task_final = 0x20000000,
309
+ ompt_task_mergeable = 0x40000000,
310
+ ompt_task_merged = 0x80000000
311
+ } ompt_task_flag_t;
312
+
313
+ typedef enum ompt_task_status_t {
314
+ ompt_task_complete = 1,
315
+ ompt_task_yield = 2,
316
+ ompt_task_cancel = 3,
317
+ ompt_task_detach = 4,
318
+ ompt_task_early_fulfill = 5,
319
+ ompt_task_late_fulfill = 6,
320
+ ompt_task_switch = 7
321
+ } ompt_task_status_t;
322
+
323
+ typedef enum ompt_target_t {
324
+ ompt_target = 1,
325
+ ompt_target_enter_data = 2,
326
+ ompt_target_exit_data = 3,
327
+ ompt_target_update = 4
328
+ } ompt_target_t;
329
+
330
+ typedef enum ompt_parallel_flag_t {
331
+ ompt_parallel_invoker_program = 0x00000001,
332
+ ompt_parallel_invoker_runtime = 0x00000002,
333
+ ompt_parallel_league = 0x40000000,
334
+ ompt_parallel_team = 0x80000000
335
+ } ompt_parallel_flag_t;
336
+
337
+ typedef enum ompt_target_map_flag_t {
338
+ ompt_target_map_flag_to = 0x01,
339
+ ompt_target_map_flag_from = 0x02,
340
+ ompt_target_map_flag_alloc = 0x04,
341
+ ompt_target_map_flag_release = 0x08,
342
+ ompt_target_map_flag_delete = 0x10,
343
+ ompt_target_map_flag_implicit = 0x20
344
+ } ompt_target_map_flag_t;
345
+
346
+ typedef enum ompt_dependence_type_t {
347
+ ompt_dependence_type_in = 1,
348
+ ompt_dependence_type_out = 2,
349
+ ompt_dependence_type_inout = 3,
350
+ ompt_dependence_type_mutexinoutset = 4,
351
+ ompt_dependence_type_source = 5,
352
+ ompt_dependence_type_sink = 6
353
+ } ompt_dependence_type_t;
354
+
355
+ typedef enum ompt_cancel_flag_t {
356
+ ompt_cancel_parallel = 0x01,
357
+ ompt_cancel_sections = 0x02,
358
+ ompt_cancel_loop = 0x04,
359
+ ompt_cancel_taskgroup = 0x08,
360
+ ompt_cancel_activated = 0x10,
361
+ ompt_cancel_detected = 0x20,
362
+ ompt_cancel_discarded_task = 0x40
363
+ } ompt_cancel_flag_t;
364
+
365
+ typedef uint64_t ompt_hwid_t;
366
+
367
+ typedef uint64_t ompt_wait_id_t;
368
+
369
+ typedef enum ompt_frame_flag_t {
370
+ ompt_frame_runtime = 0x00,
371
+ ompt_frame_application = 0x01,
372
+ ompt_frame_cfa = 0x10,
373
+ ompt_frame_framepointer = 0x20,
374
+ ompt_frame_stackaddress = 0x30
375
+ } ompt_frame_flag_t;
376
+
377
+ typedef enum ompt_state_t {
378
+ ompt_state_work_serial = 0x000,
379
+ ompt_state_work_parallel = 0x001,
380
+ ompt_state_work_reduction = 0x002,
381
+
382
+ ompt_state_wait_barrier = 0x010,
383
+ ompt_state_wait_barrier_implicit_parallel = 0x011,
384
+ ompt_state_wait_barrier_implicit_workshare = 0x012,
385
+ ompt_state_wait_barrier_implicit = 0x013,
386
+ ompt_state_wait_barrier_explicit = 0x014,
387
+
388
+ ompt_state_wait_taskwait = 0x020,
389
+ ompt_state_wait_taskgroup = 0x021,
390
+
391
+ ompt_state_wait_mutex = 0x040,
392
+ ompt_state_wait_lock = 0x041,
393
+ ompt_state_wait_critical = 0x042,
394
+ ompt_state_wait_atomic = 0x043,
395
+ ompt_state_wait_ordered = 0x044,
396
+
397
+ ompt_state_wait_target = 0x080,
398
+ ompt_state_wait_target_map = 0x081,
399
+ ompt_state_wait_target_update = 0x082,
400
+
401
+ ompt_state_idle = 0x100,
402
+ ompt_state_overhead = 0x101,
403
+ ompt_state_undefined = 0x102
404
+ } ompt_state_t;
405
+
406
+ typedef uint64_t (*ompt_get_unique_id_t) (void);
407
+
408
+ typedef uint64_t ompd_size_t;
409
+
410
+ typedef uint64_t ompd_wait_id_t;
411
+
412
+ typedef uint64_t ompd_addr_t;
413
+ typedef int64_t ompd_word_t;
414
+ typedef uint64_t ompd_seg_t;
415
+
416
+ typedef uint64_t ompd_device_t;
417
+
418
+ typedef uint64_t ompd_thread_id_t;
419
+
420
+ typedef enum ompd_scope_t {
421
+ ompd_scope_global = 1,
422
+ ompd_scope_address_space = 2,
423
+ ompd_scope_thread = 3,
424
+ ompd_scope_parallel = 4,
425
+ ompd_scope_implicit_task = 5,
426
+ ompd_scope_task = 6
427
+ } ompd_scope_t;
428
+
429
+ typedef uint64_t ompd_icv_id_t;
430
+
431
+ typedef enum ompd_rc_t {
432
+ ompd_rc_ok = 0,
433
+ ompd_rc_unavailable = 1,
434
+ ompd_rc_stale_handle = 2,
435
+ ompd_rc_bad_input = 3,
436
+ ompd_rc_error = 4,
437
+ ompd_rc_unsupported = 5,
438
+ ompd_rc_needs_state_tracking = 6,
439
+ ompd_rc_incompatible = 7,
440
+ ompd_rc_device_read_error = 8,
441
+ ompd_rc_device_write_error = 9,
442
+ ompd_rc_nomem = 10,
443
+ } ompd_rc_t;
444
+
445
+ typedef void (*ompt_interface_fn_t) (void);
446
+
447
+ typedef ompt_interface_fn_t (*ompt_function_lookup_t) (
448
+ const char *interface_function_name
449
+ );
450
+
451
+ typedef union ompt_data_t {
452
+ uint64_t value;
453
+ void *ptr;
454
+ } ompt_data_t;
455
+
456
+ typedef struct ompt_frame_t {
457
+ ompt_data_t exit_frame;
458
+ ompt_data_t enter_frame;
459
+ int exit_frame_flags;
460
+ int enter_frame_flags;
461
+ } ompt_frame_t;
462
+
463
+ typedef void (*ompt_callback_t) (void);
464
+
465
+ typedef void ompt_device_t;
466
+
467
+ typedef void ompt_buffer_t;
468
+
469
+ typedef void (*ompt_callback_buffer_request_t) (
470
+ int device_num,
471
+ ompt_buffer_t **buffer,
472
+ size_t *bytes
473
+ );
474
+
475
+ typedef void (*ompt_callback_buffer_complete_t) (
476
+ int device_num,
477
+ ompt_buffer_t *buffer,
478
+ size_t bytes,
479
+ ompt_buffer_cursor_t begin,
480
+ int buffer_owned
481
+ );
482
+
483
+ typedef void (*ompt_finalize_t) (
484
+ ompt_data_t *tool_data
485
+ );
486
+
487
+ typedef int (*ompt_initialize_t) (
488
+ ompt_function_lookup_t lookup,
489
+ int initial_device_num,
490
+ ompt_data_t *tool_data
491
+ );
492
+
493
+ typedef struct ompt_start_tool_result_t {
494
+ ompt_initialize_t initialize;
495
+ ompt_finalize_t finalize;
496
+ ompt_data_t tool_data;
497
+ } ompt_start_tool_result_t;
498
+
499
+ typedef struct ompt_record_abstract_t {
500
+ ompt_record_native_t rclass;
501
+ const char *type;
502
+ ompt_device_time_t start_time;
503
+ ompt_device_time_t end_time;
504
+ ompt_hwid_t hwid;
505
+ } ompt_record_abstract_t;
506
+
507
+ typedef struct ompt_dependence_t {
508
+ ompt_data_t variable;
509
+ ompt_dependence_type_t dependence_type;
510
+ } ompt_dependence_t;
511
+
512
+ typedef int (*ompt_enumerate_states_t) (
513
+ int current_state,
514
+ int *next_state,
515
+ const char **next_state_name
516
+ );
517
+
518
+ typedef int (*ompt_enumerate_mutex_impls_t) (
519
+ int current_impl,
520
+ int *next_impl,
521
+ const char **next_impl_name
522
+ );
523
+
524
+ typedef ompt_set_result_t (*ompt_set_callback_t) (
525
+ ompt_callbacks_t event,
526
+ ompt_callback_t callback
527
+ );
528
+
529
+ typedef int (*ompt_get_callback_t) (
530
+ ompt_callbacks_t event,
531
+ ompt_callback_t *callback
532
+ );
533
+
534
+ typedef ompt_data_t *(*ompt_get_thread_data_t) (void);
535
+
536
+ typedef int (*ompt_get_num_procs_t) (void);
537
+
538
+ typedef int (*ompt_get_num_places_t) (void);
539
+
540
+ typedef int (*ompt_get_place_proc_ids_t) (
541
+ int place_num,
542
+ int ids_size,
543
+ int *ids
544
+ );
545
+
546
+ typedef int (*ompt_get_place_num_t) (void);
547
+
548
+ typedef int (*ompt_get_partition_place_nums_t) (
549
+ int place_nums_size,
550
+ int *place_nums
551
+ );
552
+
553
+ typedef int (*ompt_get_proc_id_t) (void);
554
+
555
+ typedef int (*ompt_get_state_t) (
556
+ ompt_wait_id_t *wait_id
557
+ );
558
+
559
+ typedef int (*ompt_get_parallel_info_t) (
560
+ int ancestor_level,
561
+ ompt_data_t **parallel_data,
562
+ int *team_size
563
+ );
564
+
565
+ typedef int (*ompt_get_task_info_t) (
566
+ int ancestor_level,
567
+ int *flags,
568
+ ompt_data_t **task_data,
569
+ ompt_frame_t **task_frame,
570
+ ompt_data_t **parallel_data,
571
+ int *thread_num
572
+ );
573
+
574
+ typedef int (*ompt_get_task_memory_t)(
575
+ void **addr,
576
+ size_t *size,
577
+ int block
578
+ );
579
+
580
+ typedef int (*ompt_get_target_info_t) (
581
+ uint64_t *device_num,
582
+ ompt_id_t *target_id,
583
+ ompt_id_t *host_op_id
584
+ );
585
+
586
+ typedef int (*ompt_get_num_devices_t) (void);
587
+
588
+ typedef void (*ompt_finalize_tool_t) (void);
589
+
590
+ typedef int (*ompt_get_device_num_procs_t) (
591
+ ompt_device_t *device
592
+ );
593
+
594
+ typedef ompt_device_time_t (*ompt_get_device_time_t) (
595
+ ompt_device_t *device
596
+ );
597
+
598
+ typedef double (*ompt_translate_time_t) (
599
+ ompt_device_t *device,
600
+ ompt_device_time_t time
601
+ );
602
+
603
+ typedef ompt_set_result_t (*ompt_set_trace_ompt_t) (
604
+ ompt_device_t *device,
605
+ unsigned int enable,
606
+ unsigned int etype
607
+ );
608
+
609
+ typedef ompt_set_result_t (*ompt_set_trace_native_t) (
610
+ ompt_device_t *device,
611
+ int enable,
612
+ int flags
613
+ );
614
+
615
+ typedef int (*ompt_start_trace_t) (
616
+ ompt_device_t *device,
617
+ ompt_callback_buffer_request_t request,
618
+ ompt_callback_buffer_complete_t complete
619
+ );
620
+
621
+ typedef int (*ompt_pause_trace_t) (
622
+ ompt_device_t *device,
623
+ int begin_pause
624
+ );
625
+
626
+ typedef int (*ompt_flush_trace_t) (
627
+ ompt_device_t *device
628
+ );
629
+
630
+ typedef int (*ompt_stop_trace_t) (
631
+ ompt_device_t *device
632
+ );
633
+
634
+ typedef int (*ompt_advance_buffer_cursor_t) (
635
+ ompt_device_t *device,
636
+ ompt_buffer_t *buffer,
637
+ size_t size,
638
+ ompt_buffer_cursor_t current,
639
+ ompt_buffer_cursor_t *next
640
+ );
641
+
642
+ typedef ompt_record_t (*ompt_get_record_type_t) (
643
+ ompt_buffer_t *buffer,
644
+ ompt_buffer_cursor_t current
645
+ );
646
+
647
+ typedef void *(*ompt_get_record_native_t) (
648
+ ompt_buffer_t *buffer,
649
+ ompt_buffer_cursor_t current,
650
+ ompt_id_t *host_op_id
651
+ );
652
+
653
+ typedef ompt_record_abstract_t *
654
+ (*ompt_get_record_abstract_t) (
655
+ void *native_record
656
+ );
657
+
658
+ typedef void (*ompt_callback_thread_begin_t) (
659
+ ompt_thread_t thread_type,
660
+ ompt_data_t *thread_data
661
+ );
662
+
663
+ typedef struct ompt_record_thread_begin_t {
664
+ ompt_thread_t thread_type;
665
+ } ompt_record_thread_begin_t;
666
+
667
+ typedef void (*ompt_callback_thread_end_t) (
668
+ ompt_data_t *thread_data
669
+ );
670
+
671
+ typedef void (*ompt_callback_parallel_begin_t) (
672
+ ompt_data_t *encountering_task_data,
673
+ const ompt_frame_t *encountering_task_frame,
674
+ ompt_data_t *parallel_data,
675
+ unsigned int requested_parallelism,
676
+ int flags,
677
+ const void *codeptr_ra
678
+ );
679
+
680
+ typedef struct ompt_record_parallel_begin_t {
681
+ ompt_id_t encountering_task_id;
682
+ ompt_id_t parallel_id;
683
+ unsigned int requested_parallelism;
684
+ int flags;
685
+ const void *codeptr_ra;
686
+ } ompt_record_parallel_begin_t;
687
+
688
+ typedef void (*ompt_callback_parallel_end_t) (
689
+ ompt_data_t *parallel_data,
690
+ ompt_data_t *encountering_task_data,
691
+ int flags,
692
+ const void *codeptr_ra
693
+ );
694
+
695
+ typedef struct ompt_record_parallel_end_t {
696
+ ompt_id_t parallel_id;
697
+ ompt_id_t encountering_task_id;
698
+ int flags;
699
+ const void *codeptr_ra;
700
+ } ompt_record_parallel_end_t;
701
+
702
+ typedef void (*ompt_callback_work_t) (
703
+ ompt_work_t wstype,
704
+ ompt_scope_endpoint_t endpoint,
705
+ ompt_data_t *parallel_data,
706
+ ompt_data_t *task_data,
707
+ uint64_t count,
708
+ const void *codeptr_ra
709
+ );
710
+
711
+ typedef struct ompt_record_work_t {
712
+ ompt_work_t wstype;
713
+ ompt_scope_endpoint_t endpoint;
714
+ ompt_id_t parallel_id;
715
+ ompt_id_t task_id;
716
+ uint64_t count;
717
+ const void *codeptr_ra;
718
+ } ompt_record_work_t;
719
+
720
+ typedef void (*ompt_callback_dispatch_t) (
721
+ ompt_data_t *parallel_data,
722
+ ompt_data_t *task_data,
723
+ ompt_dispatch_t kind,
724
+ ompt_data_t instance
725
+ );
726
+
727
+ typedef struct ompt_record_dispatch_t {
728
+ ompt_id_t parallel_id;
729
+ ompt_id_t task_id;
730
+ ompt_dispatch_t kind;
731
+ ompt_data_t instance;
732
+ } ompt_record_dispatch_t;
733
+
734
+ typedef void (*ompt_callback_task_create_t) (
735
+ ompt_data_t *encountering_task_data,
736
+ const ompt_frame_t *encountering_task_frame,
737
+ ompt_data_t *new_task_data,
738
+ int flags,
739
+ int has_dependences,
740
+ const void *codeptr_ra
741
+ );
742
+
743
+ typedef struct ompt_record_task_create_t {
744
+ ompt_id_t encountering_task_id;
745
+ ompt_id_t new_task_id;
746
+ int flags;
747
+ int has_dependences;
748
+ const void *codeptr_ra;
749
+ } ompt_record_task_create_t;
750
+
751
+ typedef void (*ompt_callback_dependences_t) (
752
+ ompt_data_t *task_data,
753
+ const ompt_dependence_t *deps,
754
+ int ndeps
755
+ );
756
+
757
+ typedef struct ompt_record_dependences_t {
758
+ ompt_id_t task_id;
759
+ ompt_dependence_t dep;
760
+ int ndeps;
761
+ } ompt_record_dependences_t;
762
+
763
+ typedef void (*ompt_callback_task_dependence_t) (
764
+ ompt_data_t *src_task_data,
765
+ ompt_data_t *sink_task_data
766
+ );
767
+
768
+ typedef struct ompt_record_task_dependence_t {
769
+ ompt_id_t src_task_id;
770
+ ompt_id_t sink_task_id;
771
+ } ompt_record_task_dependence_t;
772
+
773
+ typedef void (*ompt_callback_task_schedule_t) (
774
+ ompt_data_t *prior_task_data,
775
+ ompt_task_status_t prior_task_status,
776
+ ompt_data_t *next_task_data
777
+ );
778
+
779
+ typedef struct ompt_record_task_schedule_t {
780
+ ompt_id_t prior_task_id;
781
+ ompt_task_status_t prior_task_status;
782
+ ompt_id_t next_task_id;
783
+ } ompt_record_task_schedule_t;
784
+
785
+ typedef void (*ompt_callback_implicit_task_t) (
786
+ ompt_scope_endpoint_t endpoint,
787
+ ompt_data_t *parallel_data,
788
+ ompt_data_t *task_data,
789
+ unsigned int actual_parallelism,
790
+ unsigned int index,
791
+ int flags
792
+ );
793
+
794
+ typedef struct ompt_record_implicit_task_t {
795
+ ompt_scope_endpoint_t endpoint;
796
+ ompt_id_t parallel_id;
797
+ ompt_id_t task_id;
798
+ unsigned int actual_parallelism;
799
+ unsigned int index;
800
+ int flags;
801
+ } ompt_record_implicit_task_t;
802
+
803
+ typedef void (*ompt_callback_master_t) (
804
+ ompt_scope_endpoint_t endpoint,
805
+ ompt_data_t *parallel_data,
806
+ ompt_data_t *task_data,
807
+ const void *codeptr_ra
808
+ );
809
+
810
+ typedef struct ompt_record_master_t {
811
+ ompt_scope_endpoint_t endpoint;
812
+ ompt_id_t parallel_id;
813
+ ompt_id_t task_id;
814
+ const void *codeptr_ra;
815
+ } ompt_record_master_t;
816
+
817
+ typedef void (*ompt_callback_sync_region_t) (
818
+ ompt_sync_region_t kind,
819
+ ompt_scope_endpoint_t endpoint,
820
+ ompt_data_t *parallel_data,
821
+ ompt_data_t *task_data,
822
+ const void *codeptr_ra
823
+ );
824
+
825
+ typedef struct ompt_record_sync_region_t {
826
+ ompt_sync_region_t kind;
827
+ ompt_scope_endpoint_t endpoint;
828
+ ompt_id_t parallel_id;
829
+ ompt_id_t task_id;
830
+ const void *codeptr_ra;
831
+ } ompt_record_sync_region_t;
832
+
833
+ typedef void (*ompt_callback_mutex_acquire_t) (
834
+ ompt_mutex_t kind,
835
+ unsigned int hint,
836
+ unsigned int impl,
837
+ ompt_wait_id_t wait_id,
838
+ const void *codeptr_ra
839
+ );
840
+
841
+ typedef struct ompt_record_mutex_acquire_t {
842
+ ompt_mutex_t kind;
843
+ unsigned int hint;
844
+ unsigned int impl;
845
+ ompt_wait_id_t wait_id;
846
+ const void *codeptr_ra;
847
+ } ompt_record_mutex_acquire_t;
848
+
849
+ typedef void (*ompt_callback_mutex_t) (
850
+ ompt_mutex_t kind,
851
+ ompt_wait_id_t wait_id,
852
+ const void *codeptr_ra
853
+ );
854
+
855
+ typedef struct ompt_record_mutex_t {
856
+ ompt_mutex_t kind;
857
+ ompt_wait_id_t wait_id;
858
+ const void *codeptr_ra;
859
+ } ompt_record_mutex_t;
860
+
861
+ typedef void (*ompt_callback_nest_lock_t) (
862
+ ompt_scope_endpoint_t endpoint,
863
+ ompt_wait_id_t wait_id,
864
+ const void *codeptr_ra
865
+ );
866
+
867
+ typedef struct ompt_record_nest_lock_t {
868
+ ompt_scope_endpoint_t endpoint;
869
+ ompt_wait_id_t wait_id;
870
+ const void *codeptr_ra;
871
+ } ompt_record_nest_lock_t;
872
+
873
+ typedef void (*ompt_callback_flush_t) (
874
+ ompt_data_t *thread_data,
875
+ const void *codeptr_ra
876
+ );
877
+
878
+ typedef struct ompt_record_flush_t {
879
+ const void *codeptr_ra;
880
+ } ompt_record_flush_t;
881
+
882
+ typedef void (*ompt_callback_cancel_t) (
883
+ ompt_data_t *task_data,
884
+ int flags,
885
+ const void *codeptr_ra
886
+ );
887
+
888
+ typedef struct ompt_record_cancel_t {
889
+ ompt_id_t task_id;
890
+ int flags;
891
+ const void *codeptr_ra;
892
+ } ompt_record_cancel_t;
893
+
894
+ typedef void (*ompt_callback_device_initialize_t) (
895
+ int device_num,
896
+ const char *type,
897
+ ompt_device_t *device,
898
+ ompt_function_lookup_t lookup,
899
+ const char *documentation
900
+ );
901
+
902
+ typedef void (*ompt_callback_device_finalize_t) (
903
+ int device_num
904
+ );
905
+
906
+ typedef void (*ompt_callback_device_load_t) (
907
+ int device_num,
908
+ const char *filename,
909
+ int64_t offset_in_file,
910
+ void *vma_in_file,
911
+ size_t bytes,
912
+ void *host_addr,
913
+ void *device_addr,
914
+ uint64_t module_id
915
+ );
916
+
917
+ typedef void (*ompt_callback_device_unload_t) (
918
+ int device_num,
919
+ uint64_t module_id
920
+ );
921
+
922
+ typedef void (*ompt_callback_target_data_op_t) (
923
+ ompt_id_t target_id,
924
+ ompt_id_t host_op_id,
925
+ ompt_target_data_op_t optype,
926
+ void *src_addr,
927
+ int src_device_num,
928
+ void *dest_addr,
929
+ int dest_device_num,
930
+ size_t bytes,
931
+ const void *codeptr_ra
932
+ );
933
+
934
+ typedef struct ompt_record_target_data_op_t {
935
+ ompt_id_t host_op_id;
936
+ ompt_target_data_op_t optype;
937
+ void *src_addr;
938
+ int src_device_num;
939
+ void *dest_addr;
940
+ int dest_device_num;
941
+ size_t bytes;
942
+ ompt_device_time_t end_time;
943
+ const void *codeptr_ra;
944
+ } ompt_record_target_data_op_t;
945
+
946
+ typedef void (*ompt_callback_target_t) (
947
+ ompt_target_t kind,
948
+ ompt_scope_endpoint_t endpoint,
949
+ int device_num,
950
+ ompt_data_t *task_data,
951
+ ompt_id_t target_id,
952
+ const void *codeptr_ra
953
+ );
954
+
955
+ typedef struct ompt_record_target_t {
956
+ ompt_target_t kind;
957
+ ompt_scope_endpoint_t endpoint;
958
+ int device_num;
959
+ ompt_id_t task_id;
960
+ ompt_id_t target_id;
961
+ const void *codeptr_ra;
962
+ } ompt_record_target_t;
963
+
964
+ typedef void (*ompt_callback_target_map_t) (
965
+ ompt_id_t target_id,
966
+ unsigned int nitems,
967
+ void **host_addr,
968
+ void **device_addr,
969
+ size_t *bytes,
970
+ unsigned int *mapping_flags,
971
+ const void *codeptr_ra
972
+ );
973
+
974
+ typedef struct ompt_record_target_map_t {
975
+ ompt_id_t target_id;
976
+ unsigned int nitems;
977
+ void **host_addr;
978
+ void **device_addr;
979
+ size_t *bytes;
980
+ unsigned int *mapping_flags;
981
+ const void *codeptr_ra;
982
+ } ompt_record_target_map_t;
983
+
984
+ typedef void (*ompt_callback_target_submit_t) (
985
+ ompt_id_t target_id,
986
+ ompt_id_t host_op_id,
987
+ unsigned int requested_num_teams
988
+ );
989
+
990
+ typedef struct ompt_record_target_kernel_t {
991
+ ompt_id_t host_op_id;
992
+ unsigned int requested_num_teams;
993
+ unsigned int granted_num_teams;
994
+ ompt_device_time_t end_time;
995
+ } ompt_record_target_kernel_t;
996
+
997
+ typedef int (*ompt_callback_control_tool_t) (
998
+ uint64_t command,
999
+ uint64_t modifier,
1000
+ void *arg,
1001
+ const void *codeptr_ra
1002
+ );
1003
+
1004
+ typedef struct ompt_record_control_tool_t {
1005
+ uint64_t command;
1006
+ uint64_t modifier;
1007
+ const void *codeptr_ra;
1008
+ } ompt_record_control_tool_t;
1009
+
1010
+ typedef struct ompd_address_t {
1011
+ ompd_seg_t segment;
1012
+ ompd_addr_t address;
1013
+ } ompd_address_t;
1014
+
1015
+ typedef struct ompd_frame_info_t {
1016
+ ompd_address_t frame_address;
1017
+ ompd_word_t frame_flag;
1018
+ } ompd_frame_info_t;
1019
+
1020
+ typedef struct _ompd_aspace_handle ompd_address_space_handle_t;
1021
+ typedef struct _ompd_thread_handle ompd_thread_handle_t;
1022
+ typedef struct _ompd_parallel_handle ompd_parallel_handle_t;
1023
+ typedef struct _ompd_task_handle ompd_task_handle_t;
1024
+
1025
+ typedef struct _ompd_aspace_cont ompd_address_space_context_t;
1026
+ typedef struct _ompd_thread_cont ompd_thread_context_t;
1027
+
1028
+ typedef struct ompd_device_type_sizes_t {
1029
+ uint8_t sizeof_char;
1030
+ uint8_t sizeof_short;
1031
+ uint8_t sizeof_int;
1032
+ uint8_t sizeof_long;
1033
+ uint8_t sizeof_long_long;
1034
+ uint8_t sizeof_pointer;
1035
+ } ompd_device_type_sizes_t;
1036
+
1037
+ typedef struct ompt_record_ompt_t {
1038
+ ompt_callbacks_t type;
1039
+ ompt_device_time_t time;
1040
+ ompt_id_t thread_id;
1041
+ ompt_id_t target_id;
1042
+ union {
1043
+ ompt_record_thread_begin_t thread_begin;
1044
+ ompt_record_parallel_begin_t parallel_begin;
1045
+ ompt_record_parallel_end_t parallel_end;
1046
+ ompt_record_work_t work;
1047
+ ompt_record_dispatch_t dispatch;
1048
+ ompt_record_task_create_t task_create;
1049
+ ompt_record_dependences_t dependences;
1050
+ ompt_record_task_dependence_t task_dependence;
1051
+ ompt_record_task_schedule_t task_schedule;
1052
+ ompt_record_implicit_task_t implicit_task;
1053
+ ompt_record_master_t master;
1054
+ ompt_record_sync_region_t sync_region;
1055
+ ompt_record_mutex_acquire_t mutex_acquire;
1056
+ ompt_record_mutex_t mutex;
1057
+ ompt_record_nest_lock_t nest_lock;
1058
+ ompt_record_flush_t flush;
1059
+ ompt_record_cancel_t cancel;
1060
+ ompt_record_target_t target;
1061
+ ompt_record_target_data_op_t target_data_op;
1062
+ ompt_record_target_map_t target_map;
1063
+ ompt_record_target_kernel_t target_kernel;
1064
+ ompt_record_control_tool_t control_tool;
1065
+ } record;
1066
+ } ompt_record_ompt_t;
1067
+
1068
+ typedef ompt_record_ompt_t *(*ompt_get_record_ompt_t) (
1069
+ ompt_buffer_t *buffer,
1070
+ ompt_buffer_cursor_t current
1071
+ );
1072
+
1073
+ #define ompt_id_none 0
1074
+ #define ompt_data_none {0}
1075
+ #define ompt_time_none 0
1076
+ #define ompt_hwid_none 0
1077
+ #define ompt_addr_none ~0
1078
+ #define ompt_mutex_impl_none 0
1079
+ #define ompt_wait_id_none 0
1080
+
1081
+ #define ompd_segment_none 0
1082
+
1083
+ #endif /* __OMPT__ */
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cuda_stdint.h ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2009-2017 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions
6
+ * are met:
7
+ * * Redistributions of source code must retain the above copyright
8
+ * notice, this list of conditions and the following disclaimer.
9
+ * * Redistributions in binary form must reproduce the above copyright
10
+ * notice, this list of conditions and the following disclaimer in the
11
+ * documentation and/or other materials provided with the distribution.
12
+ * * Neither the name of NVIDIA CORPORATION nor the names of its
13
+ * contributors may be used to endorse or promote products derived
14
+ * from this software without specific prior written permission.
15
+ *
16
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ */
28
+
29
+ #ifndef __cuda_stdint_h__
30
+ #define __cuda_stdint_h__
31
+
32
+ // Compiler-specific treatment for C99's stdint.h
33
+ //
34
+ // By default, this header will use the standard headers (so it
35
+ // is your responsibility to make sure they are available), except
36
+ // on MSVC before Visual Studio 2010, when they were not provided.
37
+ // To support old MSVC, a few of the commonly-used definitions are
38
+ // provided here. If more definitions are needed, add them here,
39
+ // or replace these definitions with a complete implementation,
40
+ // such as the ones available from Google, Boost, or MSVC10. You
41
+ // can prevent the definition of any of these types (in order to
42
+ // use your own) by #defining CU_STDINT_TYPES_ALREADY_DEFINED.
43
+
44
+ #if !defined(CU_STDINT_TYPES_ALREADY_DEFINED)
45
+
46
+ // In VS including stdint.h forces the C++ runtime dep - provide an opt-out
47
+ // (CU_STDINT_VS_FORCE_NO_STDINT_H) for users that care (notably static
48
+ // cudart).
49
+ #if defined(_MSC_VER) && ((_MSC_VER < 1600) || defined(CU_STDINT_VS_FORCE_NO_STDINT_H))
50
+
51
+ // These definitions can be used with MSVC 8 and 9,
52
+ // which don't ship with stdint.h:
53
+
54
+ typedef unsigned char uint8_t;
55
+
56
+ typedef short int16_t;
57
+ typedef unsigned short uint16_t;
58
+
59
+ // To keep it consistent with all MSVC build. define those types
60
+ // in the exact same way they are defined with the MSVC headers
61
+ #if defined(_MSC_VER)
62
+ typedef signed char int8_t;
63
+
64
+ typedef int int32_t;
65
+ typedef unsigned int uint32_t;
66
+
67
+ typedef long long int64_t;
68
+ typedef unsigned long long uint64_t;
69
+ #else
70
+ typedef char int8_t;
71
+
72
+ typedef long int32_t;
73
+ typedef unsigned long uint32_t;
74
+
75
+ typedef __int64 int64_t;
76
+ typedef unsigned __int64 uint64_t;
77
+ #endif
78
+
79
+ #elif defined(__DJGPP__)
80
+
81
+ // These definitions can be used when compiling
82
+ // C code with DJGPP, which only provides stdint.h
83
+ // when compiling C++ code with TR1 enabled.
84
+
85
+ typedef char int8_t;
86
+ typedef unsigned char uint8_t;
87
+
88
+ typedef short int16_t;
89
+ typedef unsigned short uint16_t;
90
+
91
+ typedef long int32_t;
92
+ typedef unsigned long uint32_t;
93
+
94
+ typedef long long int64_t;
95
+ typedef unsigned long long uint64_t;
96
+
97
+ #else
98
+
99
+ // Use standard headers, as specified by C99 and C++ TR1.
100
+ // Known to be provided by:
101
+ // - gcc/glibc, supported by all versions of glibc
102
+ // - djgpp, supported since 2001
103
+ // - MSVC, supported by Visual Studio 2010 and later
104
+
105
+ #include <stdint.h>
106
+
107
+ #endif
108
+
109
+ #endif // !defined(CU_STDINT_TYPES_ALREADY_DEFINED)
110
+
111
+
112
+ #endif // file guard
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti.h ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2010-2017 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(_CUPTI_H_)
51
+ #define _CUPTI_H_
52
+
53
+ #ifdef _WIN32
54
+ #ifndef WIN32_LEAN_AND_MEAN
55
+ #define WIN32_LEAN_AND_MEAN
56
+ #endif
57
+ #ifdef NOMINMAX
58
+ #include <windows.h>
59
+ #else
60
+ #define NOMINMAX
61
+ #include <windows.h>
62
+ #undef NOMINMAX
63
+ #endif
64
+ #endif
65
+
66
+ #include <cuda.h>
67
+ #include <cupti_result.h>
68
+ #include <cupti_version.h>
69
+
70
+ /* Activity, callback, event and metric APIs */
71
+ #include <cupti_activity.h>
72
+ #include <cupti_callbacks.h>
73
+ #include <cupti_events.h>
74
+ #include <cupti_metrics.h>
75
+
76
+ /* Runtime, driver, and nvtx function identifiers */
77
+ #include <cupti_driver_cbid.h>
78
+ #include <cupti_runtime_cbid.h>
79
+ #include <cupti_nvtx_cbid.h>
80
+
81
+ /* To support function parameter structures for obsoleted API. See
82
+ cuda.h for the actual definition of these structures. */
83
+ typedef unsigned int CUdeviceptr_v1;
84
+ typedef struct CUDA_MEMCPY2D_v1_st { int dummy; } CUDA_MEMCPY2D_v1;
85
+ typedef struct CUDA_MEMCPY3D_v1_st { int dummy; } CUDA_MEMCPY3D_v1;
86
+ typedef struct CUDA_ARRAY_DESCRIPTOR_v1_st { int dummy; } CUDA_ARRAY_DESCRIPTOR_v1;
87
+ typedef struct CUDA_ARRAY3D_DESCRIPTOR_v1_st { int dummy; } CUDA_ARRAY3D_DESCRIPTOR_v1;
88
+
89
+ /* Function parameter structures */
90
+ #include <generated_cuda_runtime_api_meta.h>
91
+ #include <generated_cuda_meta.h>
92
+
93
+ /* The following parameter structures cannot be included unless a
94
+ header that defines GL_VERSION is included before including them.
95
+ If these are needed then make sure such a header is included
96
+ already. */
97
+ #ifdef GL_VERSION
98
+ #include <generated_cuda_gl_interop_meta.h>
99
+ #include <generated_cudaGL_meta.h>
100
+ #endif
101
+
102
+ //#include <generated_nvtx_meta.h>
103
+
104
+ /* The following parameter structures cannot be included by default as
105
+ they are not guaranteed to be available on all systems. Uncomment
106
+ the includes that are available, or use the include explicitly. */
107
+ #if defined(__linux__)
108
+ //#include <generated_cuda_vdpau_interop_meta.h>
109
+ //#include <generated_cudaVDPAU_meta.h>
110
+ #endif
111
+
112
+ #ifdef _WIN32
113
+ //#include <generated_cuda_d3d9_interop_meta.h>
114
+ //#include <generated_cuda_d3d10_interop_meta.h>
115
+ //#include <generated_cuda_d3d11_interop_meta.h>
116
+ //#include <generated_cudaD3D9_meta.h>
117
+ //#include <generated_cudaD3D10_meta.h>
118
+ //#include <generated_cudaD3D11_meta.h>
119
+ #endif
120
+
121
+ #endif /*_CUPTI_H_*/
122
+
123
+
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_activity.h ADDED
The diff for this file is too large to render. See raw diff
 
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_activity_deprecated.h ADDED
The diff for this file is too large to render. See raw diff
 
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_callbacks.h ADDED
@@ -0,0 +1,863 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2010-2023 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(__CUPTI_CALLBACKS_H__)
51
+ #define __CUPTI_CALLBACKS_H__
52
+
53
+ #include <cuda.h>
54
+ #include <builtin_types.h>
55
+ #include <string.h>
56
+ #include <cuda_stdint.h>
57
+ #include <cupti_result.h>
58
+
59
+ #ifndef CUPTIAPI
60
+ #ifdef _WIN32
61
+ #define CUPTIAPI __stdcall
62
+ #else
63
+ #define CUPTIAPI
64
+ #endif
65
+ #endif
66
+
67
+ #if defined(__cplusplus)
68
+ extern "C" {
69
+ #endif
70
+
71
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
72
+ #pragma GCC visibility push(default)
73
+ #endif
74
+
75
+ /**
76
+ * \defgroup CUPTI_CALLBACK_API CUPTI Callback API
77
+ * Functions, types, and enums that implement the CUPTI Callback API.
78
+ * @{
79
+ */
80
+
81
+ /**
82
+ * \brief Specifies the point in an API call that a callback is issued.
83
+ *
84
+ * Specifies the point in an API call that a callback is issued. This
85
+ * value is communicated to the callback function via \ref
86
+ * CUpti_CallbackData::callbackSite.
87
+ */
88
+ typedef enum {
89
+ /**
90
+ * The callback is at the entry of the API call.
91
+ */
92
+ CUPTI_API_ENTER = 0,
93
+ /**
94
+ * The callback is at the exit of the API call.
95
+ */
96
+ CUPTI_API_EXIT = 1,
97
+ CUPTI_API_CBSITE_FORCE_INT = 0x7fffffff
98
+ } CUpti_ApiCallbackSite;
99
+
100
+ /**
101
+ * \brief Callback domains.
102
+ *
103
+ * Callback domains. Each domain represents callback points for a
104
+ * group of related API functions or CUDA driver activity.
105
+ */
106
+ typedef enum {
107
+ /**
108
+ * Invalid domain.
109
+ */
110
+ CUPTI_CB_DOMAIN_INVALID = 0,
111
+ /**
112
+ * Domain containing callback points for all driver API functions.
113
+ */
114
+ CUPTI_CB_DOMAIN_DRIVER_API = 1,
115
+ /**
116
+ * Domain containing callback points for all runtime API
117
+ * functions.
118
+ */
119
+ CUPTI_CB_DOMAIN_RUNTIME_API = 2,
120
+ /**
121
+ * Domain containing callback points for CUDA resource tracking.
122
+ */
123
+ CUPTI_CB_DOMAIN_RESOURCE = 3,
124
+ /**
125
+ * Domain containing callback points for CUDA synchronization.
126
+ */
127
+ CUPTI_CB_DOMAIN_SYNCHRONIZE = 4,
128
+ /**
129
+ * Domain containing callback points for NVTX API functions.
130
+ */
131
+ CUPTI_CB_DOMAIN_NVTX = 5,
132
+ /**
133
+ * Domain containing callback points for various states.
134
+ */
135
+ CUPTI_CB_DOMAIN_STATE = 6,
136
+
137
+ CUPTI_CB_DOMAIN_SIZE,
138
+
139
+ CUPTI_CB_DOMAIN_FORCE_INT = 0x7fffffff
140
+ } CUpti_CallbackDomain;
141
+
142
+ /**
143
+ * \brief Callback IDs for resource domain.
144
+ *
145
+ * Callback IDs for resource domain, CUPTI_CB_DOMAIN_RESOURCE. This
146
+ * value is communicated to the callback function via the \p cbid
147
+ * parameter.
148
+ */
149
+ typedef enum {
150
+ /**
151
+ * Invalid resource callback ID.
152
+ */
153
+ CUPTI_CBID_RESOURCE_INVALID = 0,
154
+ /**
155
+ * A new context has been created.
156
+ */
157
+ CUPTI_CBID_RESOURCE_CONTEXT_CREATED = 1,
158
+ /**
159
+ * A context is about to be destroyed.
160
+ */
161
+ CUPTI_CBID_RESOURCE_CONTEXT_DESTROY_STARTING = 2,
162
+ /**
163
+ * A new stream has been created.
164
+ */
165
+ CUPTI_CBID_RESOURCE_STREAM_CREATED = 3,
166
+ /**
167
+ * A stream is about to be destroyed.
168
+ */
169
+ CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING = 4,
170
+ /**
171
+ * The driver has finished initializing.
172
+ */
173
+ CUPTI_CBID_RESOURCE_CU_INIT_FINISHED = 5,
174
+ /**
175
+ * A module has been loaded.
176
+ */
177
+ CUPTI_CBID_RESOURCE_MODULE_LOADED = 6,
178
+ /**
179
+ * A module is about to be unloaded.
180
+ */
181
+ CUPTI_CBID_RESOURCE_MODULE_UNLOAD_STARTING = 7,
182
+ /**
183
+ * The current module which is being profiled.
184
+ */
185
+ CUPTI_CBID_RESOURCE_MODULE_PROFILED = 8,
186
+ /**
187
+ * CUDA graph has been created.
188
+ */
189
+ CUPTI_CBID_RESOURCE_GRAPH_CREATED = 9,
190
+ /**
191
+ * CUDA graph is about to be destroyed.
192
+ */
193
+ CUPTI_CBID_RESOURCE_GRAPH_DESTROY_STARTING = 10,
194
+ /**
195
+ * CUDA graph is cloned.
196
+ */
197
+ CUPTI_CBID_RESOURCE_GRAPH_CLONED = 11,
198
+ /**
199
+ * CUDA graph node is about to be created
200
+ */
201
+ CUPTI_CBID_RESOURCE_GRAPHNODE_CREATE_STARTING = 12,
202
+ /**
203
+ * CUDA graph node is created.
204
+ */
205
+ CUPTI_CBID_RESOURCE_GRAPHNODE_CREATED = 13,
206
+ /**
207
+ * CUDA graph node is about to be destroyed.
208
+ */
209
+ CUPTI_CBID_RESOURCE_GRAPHNODE_DESTROY_STARTING = 14,
210
+ /**
211
+ * Dependency on a CUDA graph node is created.
212
+ */
213
+ CUPTI_CBID_RESOURCE_GRAPHNODE_DEPENDENCY_CREATED = 15,
214
+ /**
215
+ * Dependency on a CUDA graph node is destroyed.
216
+ */
217
+ CUPTI_CBID_RESOURCE_GRAPHNODE_DEPENDENCY_DESTROY_STARTING = 16,
218
+ /**
219
+ * An executable CUDA graph is about to be created.
220
+ */
221
+ CUPTI_CBID_RESOURCE_GRAPHEXEC_CREATE_STARTING = 17,
222
+ /**
223
+ * An executable CUDA graph is created.
224
+ */
225
+ CUPTI_CBID_RESOURCE_GRAPHEXEC_CREATED = 18,
226
+ /**
227
+ * An executable CUDA graph is about to be destroyed.
228
+ */
229
+ CUPTI_CBID_RESOURCE_GRAPHEXEC_DESTROY_STARTING = 19,
230
+ /**
231
+ * CUDA graph node is cloned.
232
+ */
233
+ CUPTI_CBID_RESOURCE_GRAPHNODE_CLONED = 20,
234
+ /**
235
+ * CUDA stream attribute is changed.
236
+ */
237
+ CUPTI_CBID_RESOURCE_STREAM_ATTRIBUTE_CHANGED = 21,
238
+
239
+ CUPTI_CBID_RESOURCE_SIZE,
240
+ CUPTI_CBID_RESOURCE_FORCE_INT = 0x7fffffff
241
+ } CUpti_CallbackIdResource;
242
+
243
+ /**
244
+ * \brief Callback IDs for synchronization domain.
245
+ *
246
+ * Callback IDs for synchronization domain,
247
+ * CUPTI_CB_DOMAIN_SYNCHRONIZE. This value is communicated to the
248
+ * callback function via the \p cbid parameter.
249
+ */
250
+ typedef enum {
251
+ /**
252
+ * Invalid synchronize callback ID.
253
+ */
254
+ CUPTI_CBID_SYNCHRONIZE_INVALID = 0,
255
+ /**
256
+ * Stream synchronization has completed for the stream.
257
+ */
258
+ CUPTI_CBID_SYNCHRONIZE_STREAM_SYNCHRONIZED = 1,
259
+ /**
260
+ * Context synchronization has completed for the context.
261
+ */
262
+ CUPTI_CBID_SYNCHRONIZE_CONTEXT_SYNCHRONIZED = 2,
263
+ CUPTI_CBID_SYNCHRONIZE_SIZE,
264
+ CUPTI_CBID_SYNCHRONIZE_FORCE_INT = 0x7fffffff
265
+ } CUpti_CallbackIdSync;
266
+
267
+
268
+ /**
269
+ * \brief Callback IDs for state domain.
270
+ *
271
+ * Callback IDs for state domain,
272
+ * CUPTI_CB_DOMAIN_STATE. This value is communicated to the
273
+ * callback function via the \p cbid parameter.
274
+ */
275
+ typedef enum {
276
+ /**
277
+ * Invalid state callback ID.
278
+ */
279
+ CUPTI_CBID_STATE_INVALID = 0,
280
+ /**
281
+ * Notification of fatal errors - high impact, non-recoverable
282
+ * When encountered, CUPTI automatically invokes cuptiFinalize()
283
+ * User can control behavior of the application in future from
284
+ * receiving this callback - such as continuing without profiling, or
285
+ * terminating the whole application.
286
+ */
287
+ CUPTI_CBID_STATE_FATAL_ERROR = 1,
288
+ /**
289
+ * Notification of non fatal errors - high impact, but recoverable
290
+ * This notification is not issued in the current release.
291
+ */
292
+ CUPTI_CBID_STATE_ERROR = 2,
293
+ /**
294
+ * Notification of warnings - low impact, recoverable.
295
+ */
296
+ CUPTI_CBID_STATE_WARNING = 3,
297
+
298
+ CUPTI_CBID_STATE_SIZE,
299
+ CUPTI_CBID_STATE_FORCE_INT = 0x7fffffff
300
+ } CUpti_CallbackIdState;
301
+
302
+
303
+ /**
304
+ * \brief Data passed into a runtime or driver API callback function.
305
+ *
306
+ * Data passed into a runtime or driver API callback function as the
307
+ * \p cbdata argument to \ref CUpti_CallbackFunc. The \p cbdata will
308
+ * be this type for \p domain equal to CUPTI_CB_DOMAIN_DRIVER_API or
309
+ * CUPTI_CB_DOMAIN_RUNTIME_API. The callback data is valid only within
310
+ * the invocation of the callback function that is passed the data. If
311
+ * you need to retain some data for use outside of the callback, you
312
+ * must make a copy of that data. For example, if you make a shallow
313
+ * copy of CUpti_CallbackData within a callback, you cannot
314
+ * dereference \p functionParams outside of that callback to access
315
+ * the function parameters. \p functionName is an exception: the
316
+ * string pointed to by \p functionName is a global constant and so
317
+ * may be accessed outside of the callback.
318
+ */
319
+ typedef struct {
320
+ /**
321
+ * Point in the runtime or driver function from where the callback
322
+ * was issued.
323
+ */
324
+ CUpti_ApiCallbackSite callbackSite;
325
+
326
+ /**
327
+ * Name of the runtime or driver API function which issued the
328
+ * callback. This string is a global constant and so may be
329
+ * accessed outside of the callback.
330
+ */
331
+ const char *functionName;
332
+
333
+ /**
334
+ * Pointer to the arguments passed to the runtime or driver API
335
+ * call. See generated_cuda_runtime_api_meta.h and
336
+ * generated_cuda_meta.h for structure definitions for the
337
+ * parameters for each runtime and driver API function.
338
+ */
339
+ const void *functionParams;
340
+
341
+ /**
342
+ * Pointer to the return value of the runtime or driver API
343
+ * call. This field is only valid within the exit::CUPTI_API_EXIT
344
+ * callback. For a runtime API \p functionReturnValue points to a
345
+ * \p cudaError_t. For a driver API \p functionReturnValue points
346
+ * to a \p CUresult.
347
+ */
348
+ void *functionReturnValue;
349
+
350
+ /**
351
+ * Name of the symbol operated on by the runtime or driver API
352
+ * function which issued the callback. This entry is valid only for
353
+ * driver and runtime launch callbacks, where it returns the name of
354
+ * the kernel.
355
+ */
356
+ const char *symbolName;
357
+
358
+ /**
359
+ * Driver context current to the thread, or null if no context is
360
+ * current. This value can change from the entry to exit callback
361
+ * of a runtime API function if the runtime initializes a context.
362
+ */
363
+ CUcontext context;
364
+
365
+ /**
366
+ * Unique ID for the CUDA context associated with the thread. The
367
+ * UIDs are assigned sequentially as contexts are created and are
368
+ * unique within a process.
369
+ */
370
+ uint32_t contextUid;
371
+
372
+ /**
373
+ * Pointer to data shared between the entry and exit callbacks of
374
+ * a given runtime or drive API function invocation. This field
375
+ * can be used to pass 64-bit values from the entry callback to
376
+ * the corresponding exit callback.
377
+ */
378
+ uint64_t *correlationData;
379
+
380
+ /**
381
+ * The activity record correlation ID for this callback. For a
382
+ * driver domain callback (i.e. \p domain
383
+ * CUPTI_CB_DOMAIN_DRIVER_API) this ID will equal the correlation ID
384
+ * in the CUpti_ActivityAPI record corresponding to the CUDA driver
385
+ * function call. For a runtime domain callback (i.e. \p domain
386
+ * CUPTI_CB_DOMAIN_RUNTIME_API) this ID will equal the correlation
387
+ * ID in the CUpti_ActivityAPI record corresponding to the CUDA
388
+ * runtime function call. Within the callback, this ID can be
389
+ * recorded to correlate user data with the activity record. This
390
+ * field is new in 4.1.
391
+ */
392
+ uint32_t correlationId;
393
+
394
+ } CUpti_CallbackData;
395
+
396
+ /**
397
+ * \brief Data passed into a resource callback function.
398
+ *
399
+ * Data passed into a resource callback function as the \p cbdata
400
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
401
+ * type for \p domain equal to CUPTI_CB_DOMAIN_RESOURCE. The callback
402
+ * data is valid only within the invocation of the callback function
403
+ * that is passed the data. If you need to retain some data for use
404
+ * outside of the callback, you must make a copy of that data.
405
+ */
406
+ typedef struct {
407
+ /**
408
+ * For CUPTI_CBID_RESOURCE_CONTEXT_CREATED and
409
+ * CUPTI_CBID_RESOURCE_CONTEXT_DESTROY_STARTING, the context being
410
+ * created or destroyed. For CUPTI_CBID_RESOURCE_STREAM_CREATED and
411
+ * CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING, the context
412
+ * containing the stream being created or destroyed.
413
+ */
414
+ CUcontext context;
415
+
416
+ union {
417
+ /**
418
+ * For CUPTI_CBID_RESOURCE_STREAM_CREATED and
419
+ * CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING, the stream being
420
+ * created or destroyed.
421
+ */
422
+ CUstream stream;
423
+ } resourceHandle;
424
+
425
+ /**
426
+ * Reserved for future use.
427
+ */
428
+ void *resourceDescriptor;
429
+ } CUpti_ResourceData;
430
+
431
+
432
+ /**
433
+ * \brief Module data passed into a resource callback function.
434
+ *
435
+ * CUDA module data passed into a resource callback function as the \p cbdata
436
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
437
+ * type for \p domain equal to CUPTI_CB_DOMAIN_RESOURCE. The module
438
+ * data is valid only within the invocation of the callback function
439
+ * that is passed the data. If you need to retain some data for use
440
+ * outside of the callback, you must make a copy of that data.
441
+ */
442
+
443
+ typedef struct {
444
+ /**
445
+ * Identifier to associate with the CUDA module.
446
+ */
447
+ uint32_t moduleId;
448
+
449
+ /**
450
+ * The size of the cubin.
451
+ */
452
+ size_t cubinSize;
453
+
454
+ /**
455
+ * Pointer to the associated cubin.
456
+ */
457
+ const char *pCubin;
458
+ } CUpti_ModuleResourceData;
459
+
460
+ /**
461
+ * \brief CUDA graphs data passed into a resource callback function.
462
+ *
463
+ * CUDA graphs data passed into a resource callback function as the \p cbdata
464
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
465
+ * type for \p domain equal to CUPTI_CB_DOMAIN_RESOURCE. The graph
466
+ * data is valid only within the invocation of the callback function
467
+ * that is passed the data. If you need to retain some data for use
468
+ * outside of the callback, you must make a copy of that data.
469
+ */
470
+
471
+ typedef struct {
472
+ /**
473
+ * CUDA graph
474
+ */
475
+ CUgraph graph;
476
+ /**
477
+ * The original CUDA graph from which \param graph is cloned
478
+ */
479
+ CUgraph originalGraph;
480
+ /**
481
+ * CUDA graph node
482
+ */
483
+ CUgraphNode node;
484
+ /**
485
+ * The original CUDA graph node from which \param node is cloned
486
+ */
487
+ CUgraphNode originalNode;
488
+ /**
489
+ * Type of the \param node
490
+ */
491
+ CUgraphNodeType nodeType;
492
+ /**
493
+ * The dependent graph node
494
+ * The size of the array is \param numDependencies.
495
+ */
496
+ CUgraphNode dependency;
497
+ /**
498
+ * CUDA executable graph
499
+ */
500
+ CUgraphExec graphExec;
501
+ } CUpti_GraphData;
502
+
503
+ /**
504
+ * \brief Data passed into a synchronize callback function.
505
+ *
506
+ * Data passed into a synchronize callback function as the \p cbdata
507
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
508
+ * type for \p domain equal to CUPTI_CB_DOMAIN_SYNCHRONIZE. The
509
+ * callback data is valid only within the invocation of the callback
510
+ * function that is passed the data. If you need to retain some data
511
+ * for use outside of the callback, you must make a copy of that data.
512
+ */
513
+ typedef struct {
514
+ /**
515
+ * The context of the stream being synchronized.
516
+ */
517
+ CUcontext context;
518
+ /**
519
+ * The stream being synchronized.
520
+ */
521
+ CUstream stream;
522
+ } CUpti_SynchronizeData;
523
+
524
+ /**
525
+ * \brief Data passed into a NVTX callback function.
526
+ *
527
+ * Data passed into a NVTX callback function as the \p cbdata argument
528
+ * to \ref CUpti_CallbackFunc. The \p cbdata will be this type for \p
529
+ * domain equal to CUPTI_CB_DOMAIN_NVTX. Unless otherwise notes, the
530
+ * callback data is valid only within the invocation of the callback
531
+ * function that is passed the data. If you need to retain some data
532
+ * for use outside of the callback, you must make a copy of that data.
533
+ */
534
+ typedef struct {
535
+ /**
536
+ * Name of the NVTX API function which issued the callback. This
537
+ * string is a global constant and so may be accessed outside of the
538
+ * callback.
539
+ */
540
+ const char *functionName;
541
+
542
+ /**
543
+ * Pointer to the arguments passed to the NVTX API call. See
544
+ * generated_nvtx_meta.h for structure definitions for the
545
+ * parameters for each NVTX API function.
546
+ */
547
+ const void *functionParams;
548
+
549
+ /**
550
+ * Pointer to the return value of the NVTX API call. See
551
+ * nvToolsExt.h for each NVTX API function's return value.
552
+ */
553
+ const void *functionReturnValue;
554
+ } CUpti_NvtxData;
555
+
556
+ /**
557
+ * \brief Stream attribute data passed into a resource callback function
558
+ * for CUPTI_CBID_RESOURCE_STREAM_ATTRIBUTE_CHANGED callback
559
+
560
+ * Data passed into a resource callback function as the \p cbdata
561
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
562
+ * type for \p domain equal to CUPTI_CB_DOMAIN_RESOURCE. The
563
+ * stream attribute data is valid only within the invocation of the callback
564
+ * function that is passed the data. If you need to retain some data
565
+ * for use outside of the callback, you must make a copy of that data.
566
+ */
567
+ typedef struct {
568
+ /**
569
+ * The CUDA stream handle for the attribute
570
+ */
571
+ CUstream stream;
572
+
573
+ /**
574
+ * The type of the CUDA stream attribute
575
+ */
576
+ CUstreamAttrID attr;
577
+
578
+ /**
579
+ * The value of the CUDA stream attribute
580
+ */
581
+ const CUstreamAttrValue *value;
582
+ } CUpti_StreamAttrData;
583
+
584
+ /**
585
+ * \brief Data passed into a State callback function.
586
+ *
587
+ * Data passed into a State callback function as the \p cbdata argument
588
+ * to \ref CUpti_CallbackFunc. The \p cbdata will be this type for \p
589
+ * domain equal to CUPTI_CB_DOMAIN_STATE and callback Ids belonging to CUpti_CallbackIdState.
590
+ * Unless otherwise noted, the callback data is valid only within the invocation of the callback
591
+ * function that is passed the data. If you need to retain some data
592
+ * for use outside of the callback, you must make a copy of that data.
593
+ */
594
+ typedef struct {
595
+ union {
596
+ /**
597
+ * Data passed along with the callback Ids
598
+ * Enum CUpti_CallbackIdState used to denote callback ids
599
+ */
600
+ struct {
601
+ /**
602
+ * Error code
603
+ */
604
+ CUptiResult result;
605
+ /**
606
+ * String containing more details. It can be NULL.
607
+ */
608
+ const char *message;
609
+ } notification;
610
+ };
611
+ } CUpti_StateData;
612
+
613
+ /**
614
+ * \brief An ID for a driver API, runtime API, resource or
615
+ * synchronization callback.
616
+ *
617
+ * An ID for a driver API, runtime API, resource or synchronization
618
+ * callback. Within a driver API callback this should be interpreted
619
+ * as a CUpti_driver_api_trace_cbid value (these values are defined in
620
+ * cupti_driver_cbid.h). Within a runtime API callback this should be
621
+ * interpreted as a CUpti_runtime_api_trace_cbid value (these values
622
+ * are defined in cupti_runtime_cbid.h). Within a resource API
623
+ * callback this should be interpreted as a \ref
624
+ * CUpti_CallbackIdResource value. Within a synchronize API callback
625
+ * this should be interpreted as a \ref CUpti_CallbackIdSync value.
626
+ */
627
+ typedef uint32_t CUpti_CallbackId;
628
+
629
+ /**
630
+ * \brief Function type for a callback.
631
+ *
632
+ * Function type for a callback. The type of the data passed to the
633
+ * callback in \p cbdata depends on the \p domain. If \p domain is
634
+ * CUPTI_CB_DOMAIN_DRIVER_API or CUPTI_CB_DOMAIN_RUNTIME_API the type
635
+ * of \p cbdata will be CUpti_CallbackData. If \p domain is
636
+ * CUPTI_CB_DOMAIN_RESOURCE the type of \p cbdata will be
637
+ * CUpti_ResourceData. If \p domain is CUPTI_CB_DOMAIN_SYNCHRONIZE the
638
+ * type of \p cbdata will be CUpti_SynchronizeData. If \p domain is
639
+ * CUPTI_CB_DOMAIN_NVTX the type of \p cbdata will be CUpti_NvtxData.
640
+ *
641
+ * \param userdata User data supplied at subscription of the callback
642
+ * \param domain The domain of the callback
643
+ * \param cbid The ID of the callback
644
+ * \param cbdata Data passed to the callback.
645
+ */
646
+ typedef void (CUPTIAPI *CUpti_CallbackFunc)(
647
+ void *userdata,
648
+ CUpti_CallbackDomain domain,
649
+ CUpti_CallbackId cbid,
650
+ const void *cbdata);
651
+
652
+ /**
653
+ * \brief A callback subscriber.
654
+ */
655
+ typedef struct CUpti_Subscriber_st *CUpti_SubscriberHandle;
656
+
657
+ /**
658
+ * \brief Pointer to an array of callback domains.
659
+ */
660
+ typedef CUpti_CallbackDomain *CUpti_DomainTable;
661
+
662
+ /**
663
+ * \brief Get the available callback domains.
664
+ *
665
+ * Returns in \p *domainTable an array of size \p *domainCount of all
666
+ * the available callback domains.
667
+ * \note \b Thread-safety: this function is thread safe.
668
+ *
669
+ * \param domainCount Returns number of callback domains
670
+ * \param domainTable Returns pointer to array of available callback domains
671
+ *
672
+ * \retval CUPTI_SUCCESS on success
673
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialize CUPTI
674
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p domainCount or \p domainTable are NULL
675
+ */
676
+ CUptiResult CUPTIAPI cuptiSupportedDomains(size_t *domainCount,
677
+ CUpti_DomainTable *domainTable);
678
+
679
+ /**
680
+ * \brief Initialize a callback subscriber with a callback function
681
+ * and user data.
682
+ *
683
+ * Initializes a callback subscriber with a callback function and
684
+ * (optionally) a pointer to user data. The returned subscriber handle
685
+ * can be used to enable and disable the callback for specific domains
686
+ * and callback IDs.
687
+ * \note Only a single subscriber can be registered at a time. To ensure
688
+ * that no other CUPTI client interrupts the profiling session, it's the
689
+ * responsibility of all the CUPTI clients to call this function before
690
+ * starting the profling session. In case profiling session is already
691
+ * started by another CUPTI client, this function returns the error code
692
+ * CUPTI_ERROR_MULTIPLE_SUBSCRIBERS_NOT_SUPPORTED.
693
+ * Note that this function returns the same error when application is
694
+ * launched using NVIDIA tools like nvprof, Visual Profiler, Nsight Systems,
695
+ * Nsight Compute, cuda-gdb and cuda-memcheck.
696
+ * \note This function does not enable any callbacks.
697
+ * \note \b Thread-safety: this function is thread safe.
698
+ *
699
+ * \param subscriber Returns handle to initialize subscriber
700
+ * \param callback The callback function
701
+ * \param userdata A pointer to user data. This data will be passed to
702
+ * the callback function via the \p userdata parameter.
703
+ *
704
+ * \retval CUPTI_SUCCESS on success
705
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialize CUPTI
706
+ * \retval CUPTI_ERROR_MULTIPLE_SUBSCRIBERS_NOT_SUPPORTED if there is already a CUPTI subscriber
707
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber is NULL
708
+ */
709
+ CUptiResult CUPTIAPI cuptiSubscribe(CUpti_SubscriberHandle *subscriber,
710
+ CUpti_CallbackFunc callback,
711
+ void *userdata);
712
+
713
+ /**
714
+ * \brief Unregister a callback subscriber.
715
+ *
716
+ * Removes a callback subscriber so that no future callbacks will be
717
+ * issued to that subscriber.
718
+ * \note \b Thread-safety: this function is thread safe.
719
+ *
720
+ * \param subscriber Handle to the initialize subscriber
721
+ *
722
+ * \retval CUPTI_SUCCESS on success
723
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
724
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber is NULL or not initialized
725
+ */
726
+ CUptiResult CUPTIAPI cuptiUnsubscribe(CUpti_SubscriberHandle subscriber);
727
+
728
+ /**
729
+ * \brief Get the current enabled/disabled state of a callback for a specific
730
+ * domain and function ID.
731
+ *
732
+ * Returns non-zero in \p *enable if the callback for a domain and
733
+ * callback ID is enabled, and zero if not enabled.
734
+ *
735
+ * \note \b Thread-safety: a subscriber must serialize access to
736
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
737
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackState(sub,
738
+ * d, c) and cuptiEnableCallback(sub, d, c) are called concurrently,
739
+ * the results are undefined.
740
+ *
741
+ * \param enable Returns non-zero if callback enabled, zero if not enabled
742
+ * \param subscriber Handle to the initialize subscriber
743
+ * \param domain The domain of the callback
744
+ * \param cbid The ID of the callback
745
+ *
746
+ * \retval CUPTI_SUCCESS on success
747
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
748
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p enabled is NULL, or if \p
749
+ * subscriber, \p domain or \p cbid is invalid.
750
+ */
751
+ CUptiResult CUPTIAPI cuptiGetCallbackState(uint32_t *enable,
752
+ CUpti_SubscriberHandle subscriber,
753
+ CUpti_CallbackDomain domain,
754
+ CUpti_CallbackId cbid);
755
+
756
+ /**
757
+ * \brief Enable or disabled callbacks for a specific domain and
758
+ * callback ID.
759
+ *
760
+ * Enable or disabled callbacks for a subscriber for a specific domain
761
+ * and callback ID.
762
+ *
763
+ * \note \b Thread-safety: a subscriber must serialize access to
764
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
765
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackState(sub,
766
+ * d, c) and cuptiEnableCallback(sub, d, c) are called concurrently,
767
+ * the results are undefined.
768
+ *
769
+ * \param enable New enable state for the callback. Zero disables the
770
+ * callback, non-zero enables the callback.
771
+ * \param subscriber - Handle to callback subscription
772
+ * \param domain The domain of the callback
773
+ * \param cbid The ID of the callback
774
+ *
775
+ * \retval CUPTI_SUCCESS on success
776
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
777
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber, \p domain or \p
778
+ * cbid is invalid.
779
+ */
780
+ CUptiResult CUPTIAPI cuptiEnableCallback(uint32_t enable,
781
+ CUpti_SubscriberHandle subscriber,
782
+ CUpti_CallbackDomain domain,
783
+ CUpti_CallbackId cbid);
784
+
785
+ /**
786
+ * \brief Enable or disabled all callbacks for a specific domain.
787
+ *
788
+ * Enable or disabled all callbacks for a specific domain.
789
+ *
790
+ * \note \b Thread-safety: a subscriber must serialize access to
791
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
792
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackEnabled(sub,
793
+ * d, *) and cuptiEnableDomain(sub, d) are called concurrently, the
794
+ * results are undefined.
795
+ *
796
+ * \param enable New enable state for all callbacks in the
797
+ * domain. Zero disables all callbacks, non-zero enables all
798
+ * callbacks.
799
+ * \param subscriber - Handle to callback subscription
800
+ * \param domain The domain of the callback
801
+ *
802
+ * \retval CUPTI_SUCCESS on success
803
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
804
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber or \p domain is invalid
805
+ */
806
+ CUptiResult CUPTIAPI cuptiEnableDomain(uint32_t enable,
807
+ CUpti_SubscriberHandle subscriber,
808
+ CUpti_CallbackDomain domain);
809
+
810
+ /**
811
+ * \brief Enable or disable all callbacks in all domains.
812
+ *
813
+ * Enable or disable all callbacks in all domains.
814
+ *
815
+ * \note \b Thread-safety: a subscriber must serialize access to
816
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
817
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackState(sub,
818
+ * d, *) and cuptiEnableAllDomains(sub) are called concurrently, the
819
+ * results are undefined.
820
+ *
821
+ * \param enable New enable state for all callbacks in all
822
+ * domain. Zero disables all callbacks, non-zero enables all
823
+ * callbacks.
824
+ * \param subscriber - Handle to callback subscription
825
+ *
826
+ * \retval CUPTI_SUCCESS on success
827
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
828
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber is invalid
829
+ */
830
+ CUptiResult CUPTIAPI cuptiEnableAllDomains(uint32_t enable,
831
+ CUpti_SubscriberHandle subscriber);
832
+
833
+ /**
834
+ * \brief Get the name of a callback for a specific domain and callback ID.
835
+ *
836
+ * Returns a pointer to the name c_string in \p **name.
837
+ *
838
+ * \note \b Names are available only for the DRIVER and RUNTIME domains.
839
+ *
840
+ * \param domain The domain of the callback
841
+ * \param cbid The ID of the callback
842
+ * \param name Returns pointer to the name string on success, NULL otherwise
843
+ *
844
+ * \retval CUPTI_SUCCESS on success
845
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p name is NULL, or if
846
+ * \p domain or \p cbid is invalid.
847
+ */
848
+ CUptiResult CUPTIAPI cuptiGetCallbackName(CUpti_CallbackDomain domain,
849
+ uint32_t cbid,
850
+ const char **name);
851
+
852
+ /** @} */ /* END CUPTI_CALLBACK_API */
853
+
854
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
855
+ #pragma GCC visibility pop
856
+ #endif
857
+
858
+ #if defined(__cplusplus)
859
+ }
860
+ #endif
861
+
862
+ #endif // file guard
863
+
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_checkpoint.h ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ #include <cuda.h>
4
+ #include <cupti_result.h>
5
+
6
+ #include <stddef.h>
7
+ #include <stdint.h>
8
+
9
+ namespace NV { namespace Cupti { namespace Checkpoint {
10
+
11
+ #ifdef __cplusplus
12
+ extern "C"
13
+ {
14
+ #endif
15
+
16
+ /**
17
+ * \defgroup CUPTI_CHECKPOINT_API CUPTI Checkpoint API
18
+ * Functions, types, and enums that implement the CUPTI Checkpoint API.
19
+ * @{
20
+ */
21
+
22
+ /**
23
+ * \brief Specifies optimization options for a checkpoint, may be OR'd together to specify multiple options.
24
+ */
25
+ typedef enum
26
+ {
27
+ CUPTI_CHECKPOINT_OPT_NONE = 0, //!< Default behavior
28
+ CUPTI_CHECKPOINT_OPT_TRANSFER = 1, //!< Determine which mem blocks have changed, and only restore those. This optimization is cached, which means cuptiCheckpointRestore must always be called at the same point in the application when this option is enabled, or the result may be incorrect.
29
+ } CUpti_CheckpointOptimizations;
30
+
31
+ /**
32
+ * \brief Configuration and handle for a CUPTI Checkpoint
33
+ *
34
+ * A CUptiCheckpoint object should be initialized with desired options prior to passing into any
35
+ * CUPTI Checkpoint API function. The first call into a Checkpoint API function will initialize internal
36
+ * state based on these options. Subsequent changes to these options will not have any effect.
37
+ *
38
+ * Checkpoint data is saved in device, host, and filesystem space. There are options to reserve memory
39
+ * at each level (device, host, filesystem) which are intended to allow a guarantee that a certain amount
40
+ * of memory will remain free for use after the checkpoint is saved.
41
+ * Note, however, that falling back to slower levels of memory (host, and then filesystem) to save the checkpoint
42
+ * will result in performance degradation.
43
+ * Currently, the filesystem limitation is not implemented. Note that falling back to filesystem storage may
44
+ * significantly impact the performance for saving and restoring a checkpoint.
45
+ */
46
+ typedef struct
47
+ {
48
+ size_t structSize; //!< [in] Must be set to CUpti_Checkpoint_STRUCT_SIZE
49
+
50
+ CUcontext ctx; //!< [in] Set to context to save from, or will use current context if NULL
51
+
52
+ size_t reserveDeviceMB; //!< [in] Restrict checkpoint from using last N MB of device memory (-1 = use no device memory)
53
+ size_t reserveHostMB; //!< [in] Restrict checkpoint from using last N MB of host memory (-1 = use no host memory)
54
+ uint8_t allowOverwrite; //!< [in] Boolean, Allow checkpoint to save over existing checkpoint
55
+ uint8_t optimizations; //!< [in] Mask of CUpti_CheckpointOptimizations flags for this checkpoint
56
+
57
+ void * pPriv; //!< [in] Assign to NULL
58
+ } CUpti_Checkpoint;
59
+
60
+ #define CUpti_Checkpoint_STRUCT_SIZE \
61
+ (offsetof(CUpti_Checkpoint, pPriv) + \
62
+ sizeof(((CUpti_Checkpoint*)(nullptr))->pPriv))
63
+
64
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
65
+ #pragma GCC visibility push(default)
66
+ #endif
67
+
68
+ /**
69
+ * \brief Initialize and save a checkpoint of the device state associated with the handle context
70
+ *
71
+ * Uses the handle options to configure and save a checkpoint of the device state associated with the specified context.
72
+ *
73
+ * \param handle A pointer to a CUpti_Checkpoint object
74
+ *
75
+ * \retval CUPTI_SUCCESS if a checkpoint was successfully initialized and saved
76
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p handle does not appear to refer to a valid CUpti_Checkpoint
77
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
78
+ * \retval CUPTI_ERROR_INVALID_DEVICE if device associated with context is not compatible with checkpoint API
79
+ * \retval CUPTI_ERROR_INVALID_OPERATION if Save is requested over an existing checkpoint, but \p allowOverwrite was not originally specified
80
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY if as configured, not enough backing storage space to save the checkpoint
81
+ */
82
+ CUptiResult cuptiCheckpointSave(CUpti_Checkpoint * const handle);
83
+
84
+ /**
85
+ * \brief Restore a checkpoint to the device associated with its context
86
+ *
87
+ * Restores device, pinned, and allocated memory to the state when the checkpoint was saved
88
+ *
89
+ * \param handle A pointer to a previously saved CUpti_Checkpoint object
90
+ *
91
+ * \retval CUTPI_SUCCESS if the checkpoint was successfully restored
92
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if the checkpoint was not previously initialized
93
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
94
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if the handle appears invalid
95
+ * \retval CUPTI_ERROR_UNKNOWN if the restore or optimization operation fails
96
+ */
97
+ CUptiResult cuptiCheckpointRestore(CUpti_Checkpoint * const handle);
98
+
99
+ /**
100
+ * \brief Free the backing data for a checkpoint
101
+ *
102
+ * Frees all associated device, host memory and filesystem storage used for this context.
103
+ * After freeing a handle, it may be re-used as if it was new - options may be re-configured and will
104
+ * take effect on the next call to \p cuptiCheckpointSave.
105
+ *
106
+ * \param handle A pointer to a previously saved CUpti_Checkpoint object
107
+ *
108
+ * \retval CUPTI_SUCCESS if the handle was successfully freed
109
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if the handle was already freed or appears invalid
110
+ * \retval CUPTI_ERROR_INVALID_CONTEXT if the context is no longer valid
111
+ */
112
+ CUptiResult cuptiCheckpointFree(CUpti_Checkpoint * const handle);
113
+
114
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
115
+ #pragma GCC visibility pop
116
+ #endif
117
+
118
+ /**
119
+ * @}
120
+ */
121
+
122
+ #ifdef __cplusplus
123
+ }
124
+ #endif
125
+
126
+ // Exit namespace NV::Cupti::Checkpoint
127
+ }}}
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_common.h ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2023 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(__CUPTI_COMMON_H__)
51
+ #define __CUPTI_COMMON_H__
52
+
53
+ #ifndef CUPTIAPI
54
+ #ifdef _WIN32
55
+ #define CUPTIAPI __stdcall
56
+ #else
57
+ #define CUPTIAPI
58
+ #endif
59
+ #endif
60
+
61
+ #ifndef CUPTIUTILAPI
62
+ #ifdef _WIN32
63
+ #define CUPTIUTILAPI __stdcall
64
+ #else
65
+ #define CUPTIUTILAPI
66
+ #endif
67
+ #endif
68
+
69
+ #if defined(__LP64__)
70
+ #define CUPTILP64 1
71
+ #elif defined(_WIN64)
72
+ #define CUPTILP64 1
73
+ #else
74
+ #undef CUPTILP64
75
+ #endif
76
+
77
+ #define ACTIVITY_RECORD_ALIGNMENT 8
78
+ #if defined(_WIN32) // Windows 32- and 64-bit
79
+ #define START_PACKED_ALIGNMENT __pragma(pack(push,1)) // exact fit - no padding
80
+ #define PACKED_ALIGNMENT __declspec(align(ACTIVITY_RECORD_ALIGNMENT))
81
+ #define END_PACKED_ALIGNMENT __pragma(pack(pop))
82
+ #elif defined(__GNUC__) // GCC
83
+ #define START_PACKED_ALIGNMENT
84
+ #define PACKED_ALIGNMENT __attribute__ ((__packed__)) __attribute__ ((aligned (ACTIVITY_RECORD_ALIGNMENT)))
85
+ #define END_PACKED_ALIGNMENT
86
+ #else // all other compilers
87
+ #define START_PACKED_ALIGNMENT
88
+ #define PACKED_ALIGNMENT
89
+ #define END_PACKED_ALIGNMENT
90
+ #endif
91
+
92
+ #endif /*__CUPTI_COMMON_H__*/
93
+
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_driver_cbid.h ADDED
@@ -0,0 +1,799 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ // *************************************************************************
3
+ // Definitions of indices for API functions, unique across entire API
4
+ // *************************************************************************
5
+
6
+ // This file is generated. Any changes you make will be lost during the next clean build.
7
+ // CUDA public interface, for type definitions and cu* function prototypes
8
+
9
+ #if !defined(_CUPTI_DRIVER_CBID_H_)
10
+ #define _CUPTI_DRIVER_CBID_H_
11
+
12
+ typedef enum CUpti_driver_api_trace_cbid_enum {
13
+ CUPTI_DRIVER_TRACE_CBID_INVALID = 0,
14
+ CUPTI_DRIVER_TRACE_CBID_cuInit = 1,
15
+ CUPTI_DRIVER_TRACE_CBID_cuDriverGetVersion = 2,
16
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGet = 3,
17
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetCount = 4,
18
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetName = 5,
19
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceComputeCapability = 6,
20
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceTotalMem = 7,
21
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetProperties = 8,
22
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetAttribute = 9,
23
+ CUPTI_DRIVER_TRACE_CBID_cuCtxCreate = 10,
24
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDestroy = 11,
25
+ CUPTI_DRIVER_TRACE_CBID_cuCtxAttach = 12,
26
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDetach = 13,
27
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPushCurrent = 14,
28
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPopCurrent = 15,
29
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetDevice = 16,
30
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSynchronize = 17,
31
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoad = 18,
32
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoadData = 19,
33
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoadDataEx = 20,
34
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoadFatBinary = 21,
35
+ CUPTI_DRIVER_TRACE_CBID_cuModuleUnload = 22,
36
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetFunction = 23,
37
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetGlobal = 24,
38
+ CUPTI_DRIVER_TRACE_CBID_cu64ModuleGetGlobal = 25,
39
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetTexRef = 26,
40
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetInfo = 27,
41
+ CUPTI_DRIVER_TRACE_CBID_cu64MemGetInfo = 28,
42
+ CUPTI_DRIVER_TRACE_CBID_cuMemAlloc = 29,
43
+ CUPTI_DRIVER_TRACE_CBID_cu64MemAlloc = 30,
44
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocPitch = 31,
45
+ CUPTI_DRIVER_TRACE_CBID_cu64MemAllocPitch = 32,
46
+ CUPTI_DRIVER_TRACE_CBID_cuMemFree = 33,
47
+ CUPTI_DRIVER_TRACE_CBID_cu64MemFree = 34,
48
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAddressRange = 35,
49
+ CUPTI_DRIVER_TRACE_CBID_cu64MemGetAddressRange = 36,
50
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocHost = 37,
51
+ CUPTI_DRIVER_TRACE_CBID_cuMemFreeHost = 38,
52
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostAlloc = 39,
53
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostGetDevicePointer = 40,
54
+ CUPTI_DRIVER_TRACE_CBID_cu64MemHostGetDevicePointer = 41,
55
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostGetFlags = 42,
56
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoD = 43,
57
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyHtoD = 44,
58
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoH = 45,
59
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoH = 46,
60
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoD = 47,
61
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoD = 48,
62
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoA = 49,
63
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoA = 50,
64
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoD = 51,
65
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyAtoD = 52,
66
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoA = 53,
67
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoH = 54,
68
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoA = 55,
69
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2D = 56,
70
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DUnaligned = 57,
71
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3D = 58,
72
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy3D = 59,
73
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoDAsync = 60,
74
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyHtoDAsync = 61,
75
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoHAsync = 62,
76
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoHAsync = 63,
77
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoDAsync = 64,
78
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoDAsync = 65,
79
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoAAsync = 66,
80
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoHAsync = 67,
81
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DAsync = 68,
82
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DAsync = 69,
83
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy3DAsync = 70,
84
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8 = 71,
85
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD8 = 72,
86
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16 = 73,
87
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD16 = 74,
88
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32 = 75,
89
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD32 = 76,
90
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8 = 77,
91
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D8 = 78,
92
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16 = 79,
93
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D16 = 80,
94
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32 = 81,
95
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D32 = 82,
96
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetBlockShape = 83,
97
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetSharedSize = 84,
98
+ CUPTI_DRIVER_TRACE_CBID_cuFuncGetAttribute = 85,
99
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetCacheConfig = 86,
100
+ CUPTI_DRIVER_TRACE_CBID_cuArrayCreate = 87,
101
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetDescriptor = 88,
102
+ CUPTI_DRIVER_TRACE_CBID_cuArrayDestroy = 89,
103
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DCreate = 90,
104
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DGetDescriptor = 91,
105
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefCreate = 92,
106
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefDestroy = 93,
107
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetArray = 94,
108
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress = 95,
109
+ CUPTI_DRIVER_TRACE_CBID_cu64TexRefSetAddress = 96,
110
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress2D = 97,
111
+ CUPTI_DRIVER_TRACE_CBID_cu64TexRefSetAddress2D = 98,
112
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetFormat = 99,
113
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddressMode = 100,
114
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetFilterMode = 101,
115
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetFlags = 102,
116
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetAddress = 103,
117
+ CUPTI_DRIVER_TRACE_CBID_cu64TexRefGetAddress = 104,
118
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetArray = 105,
119
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetAddressMode = 106,
120
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetFilterMode = 107,
121
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetFormat = 108,
122
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetFlags = 109,
123
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetSize = 110,
124
+ CUPTI_DRIVER_TRACE_CBID_cuParamSeti = 111,
125
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetf = 112,
126
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetv = 113,
127
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetTexRef = 114,
128
+ CUPTI_DRIVER_TRACE_CBID_cuLaunch = 115,
129
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchGrid = 116,
130
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchGridAsync = 117,
131
+ CUPTI_DRIVER_TRACE_CBID_cuEventCreate = 118,
132
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecord = 119,
133
+ CUPTI_DRIVER_TRACE_CBID_cuEventQuery = 120,
134
+ CUPTI_DRIVER_TRACE_CBID_cuEventSynchronize = 121,
135
+ CUPTI_DRIVER_TRACE_CBID_cuEventDestroy = 122,
136
+ CUPTI_DRIVER_TRACE_CBID_cuEventElapsedTime = 123,
137
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCreate = 124,
138
+ CUPTI_DRIVER_TRACE_CBID_cuStreamQuery = 125,
139
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSynchronize = 126,
140
+ CUPTI_DRIVER_TRACE_CBID_cuStreamDestroy = 127,
141
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsUnregisterResource = 128,
142
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsSubResourceGetMappedArray = 129,
143
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedPointer = 130,
144
+ CUPTI_DRIVER_TRACE_CBID_cu64GraphicsResourceGetMappedPointer = 131,
145
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceSetMapFlags = 132,
146
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsMapResources = 133,
147
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsUnmapResources = 134,
148
+ CUPTI_DRIVER_TRACE_CBID_cuGetExportTable = 135,
149
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetLimit = 136,
150
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetLimit = 137,
151
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10GetDevice = 138,
152
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10CtxCreate = 139,
153
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsD3D10RegisterResource = 140,
154
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10RegisterResource = 141,
155
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10UnregisterResource = 142,
156
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10MapResources = 143,
157
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10UnmapResources = 144,
158
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceSetMapFlags = 145,
159
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedArray = 146,
160
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPointer = 147,
161
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedSize = 148,
162
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPitch = 149,
163
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetSurfaceDimensions = 150,
164
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11GetDevice = 151,
165
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11CtxCreate = 152,
166
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsD3D11RegisterResource = 153,
167
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9GetDevice = 154,
168
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9CtxCreate = 155,
169
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsD3D9RegisterResource = 156,
170
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9GetDirect3DDevice = 157,
171
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9RegisterResource = 158,
172
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnregisterResource = 159,
173
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9MapResources = 160,
174
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnmapResources = 161,
175
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceSetMapFlags = 162,
176
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetSurfaceDimensions = 163,
177
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedArray = 164,
178
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPointer = 165,
179
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedSize = 166,
180
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPitch = 167,
181
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9Begin = 168,
182
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9End = 169,
183
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9RegisterVertexBuffer = 170,
184
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9MapVertexBuffer = 171,
185
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnmapVertexBuffer = 172,
186
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnregisterVertexBuffer = 173,
187
+ CUPTI_DRIVER_TRACE_CBID_cuGLCtxCreate = 174,
188
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsGLRegisterBuffer = 175,
189
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsGLRegisterImage = 176,
190
+ CUPTI_DRIVER_TRACE_CBID_cuWGLGetDevice = 177,
191
+ CUPTI_DRIVER_TRACE_CBID_cuGLInit = 178,
192
+ CUPTI_DRIVER_TRACE_CBID_cuGLRegisterBufferObject = 179,
193
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObject = 180,
194
+ CUPTI_DRIVER_TRACE_CBID_cuGLUnmapBufferObject = 181,
195
+ CUPTI_DRIVER_TRACE_CBID_cuGLUnregisterBufferObject = 182,
196
+ CUPTI_DRIVER_TRACE_CBID_cuGLSetBufferObjectMapFlags = 183,
197
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObjectAsync = 184,
198
+ CUPTI_DRIVER_TRACE_CBID_cuGLUnmapBufferObjectAsync = 185,
199
+ CUPTI_DRIVER_TRACE_CBID_cuVDPAUGetDevice = 186,
200
+ CUPTI_DRIVER_TRACE_CBID_cuVDPAUCtxCreate = 187,
201
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsVDPAURegisterVideoSurface = 188,
202
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsVDPAURegisterOutputSurface = 189,
203
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetSurfRef = 190,
204
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefCreate = 191,
205
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefDestroy = 192,
206
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefSetFormat = 193,
207
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefSetArray = 194,
208
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefGetFormat = 195,
209
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefGetArray = 196,
210
+ CUPTI_DRIVER_TRACE_CBID_cu64DeviceTotalMem = 197,
211
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetMappedPointer = 198,
212
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetMappedSize = 199,
213
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetMappedPitch = 200,
214
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetSurfaceDimensions = 201,
215
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetSurfaceDimensions = 202,
216
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetMappedPointer = 203,
217
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetMappedSize = 204,
218
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetMappedPitch = 205,
219
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9MapVertexBuffer = 206,
220
+ CUPTI_DRIVER_TRACE_CBID_cu64GLMapBufferObject = 207,
221
+ CUPTI_DRIVER_TRACE_CBID_cu64GLMapBufferObjectAsync = 208,
222
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11GetDevices = 209,
223
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11CtxCreateOnDevice = 210,
224
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10GetDevices = 211,
225
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10CtxCreateOnDevice = 212,
226
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9GetDevices = 213,
227
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9CtxCreateOnDevice = 214,
228
+ CUPTI_DRIVER_TRACE_CBID_cu64MemHostAlloc = 215,
229
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8Async = 216,
230
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD8Async = 217,
231
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16Async = 218,
232
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD16Async = 219,
233
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32Async = 220,
234
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD32Async = 221,
235
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8Async = 222,
236
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D8Async = 223,
237
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16Async = 224,
238
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D16Async = 225,
239
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32Async = 226,
240
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D32Async = 227,
241
+ CUPTI_DRIVER_TRACE_CBID_cu64ArrayCreate = 228,
242
+ CUPTI_DRIVER_TRACE_CBID_cu64ArrayGetDescriptor = 229,
243
+ CUPTI_DRIVER_TRACE_CBID_cu64Array3DCreate = 230,
244
+ CUPTI_DRIVER_TRACE_CBID_cu64Array3DGetDescriptor = 231,
245
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy2D = 232,
246
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy2DUnaligned = 233,
247
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy2DAsync = 234,
248
+ CUPTI_DRIVER_TRACE_CBID_cuCtxCreate_v2 = 235,
249
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10CtxCreate_v2 = 236,
250
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11CtxCreate_v2 = 237,
251
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9CtxCreate_v2 = 238,
252
+ CUPTI_DRIVER_TRACE_CBID_cuGLCtxCreate_v2 = 239,
253
+ CUPTI_DRIVER_TRACE_CBID_cuVDPAUCtxCreate_v2 = 240,
254
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetGlobal_v2 = 241,
255
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetInfo_v2 = 242,
256
+ CUPTI_DRIVER_TRACE_CBID_cuMemAlloc_v2 = 243,
257
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocPitch_v2 = 244,
258
+ CUPTI_DRIVER_TRACE_CBID_cuMemFree_v2 = 245,
259
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAddressRange_v2 = 246,
260
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostGetDevicePointer_v2 = 247,
261
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy_v2 = 248,
262
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8_v2 = 249,
263
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16_v2 = 250,
264
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32_v2 = 251,
265
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8_v2 = 252,
266
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16_v2 = 253,
267
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32_v2 = 254,
268
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress_v2 = 255,
269
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress2D_v2 = 256,
270
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetAddress_v2 = 257,
271
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedPointer_v2 = 258,
272
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceTotalMem_v2 = 259,
273
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPointer_v2 = 260,
274
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedSize_v2 = 261,
275
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPitch_v2 = 262,
276
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetSurfaceDimensions_v2 = 263,
277
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetSurfaceDimensions_v2 = 264,
278
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPointer_v2 = 265,
279
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedSize_v2 = 266,
280
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPitch_v2 = 267,
281
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9MapVertexBuffer_v2 = 268,
282
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObject_v2 = 269,
283
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObjectAsync_v2 = 270,
284
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostAlloc_v2 = 271,
285
+ CUPTI_DRIVER_TRACE_CBID_cuArrayCreate_v2 = 272,
286
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetDescriptor_v2 = 273,
287
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DCreate_v2 = 274,
288
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DGetDescriptor_v2 = 275,
289
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoD_v2 = 276,
290
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoDAsync_v2 = 277,
291
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoH_v2 = 278,
292
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoHAsync_v2 = 279,
293
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoD_v2 = 280,
294
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoDAsync_v2 = 281,
295
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoH_v2 = 282,
296
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoHAsync_v2 = 283,
297
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoD_v2 = 284,
298
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoA_v2 = 285,
299
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoA_v2 = 286,
300
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2D_v2 = 287,
301
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DUnaligned_v2 = 288,
302
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DAsync_v2 = 289,
303
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3D_v2 = 290,
304
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DAsync_v2 = 291,
305
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoA_v2 = 292,
306
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoAAsync_v2 = 293,
307
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocHost_v2 = 294,
308
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitEvent = 295,
309
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetApiVersion = 296,
310
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10GetDirect3DDevice = 297,
311
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11GetDirect3DDevice = 298,
312
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetCacheConfig = 299,
313
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetCacheConfig = 300,
314
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostRegister = 301,
315
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostUnregister = 302,
316
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetCurrent = 303,
317
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetCurrent = 304,
318
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy = 305,
319
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAsync = 306,
320
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernel = 307,
321
+ CUPTI_DRIVER_TRACE_CBID_cuProfilerStart = 308,
322
+ CUPTI_DRIVER_TRACE_CBID_cuProfilerStop = 309,
323
+ CUPTI_DRIVER_TRACE_CBID_cuPointerGetAttribute = 310,
324
+ CUPTI_DRIVER_TRACE_CBID_cuProfilerInitialize = 311,
325
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceCanAccessPeer = 312,
326
+ CUPTI_DRIVER_TRACE_CBID_cuCtxEnablePeerAccess = 313,
327
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDisablePeerAccess = 314,
328
+ CUPTI_DRIVER_TRACE_CBID_cuMemPeerRegister = 315,
329
+ CUPTI_DRIVER_TRACE_CBID_cuMemPeerUnregister = 316,
330
+ CUPTI_DRIVER_TRACE_CBID_cuMemPeerGetDevicePointer = 317,
331
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeer = 318,
332
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeerAsync = 319,
333
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeer = 320,
334
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeerAsync = 321,
335
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDestroy_v2 = 322,
336
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPushCurrent_v2 = 323,
337
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPopCurrent_v2 = 324,
338
+ CUPTI_DRIVER_TRACE_CBID_cuEventDestroy_v2 = 325,
339
+ CUPTI_DRIVER_TRACE_CBID_cuStreamDestroy_v2 = 326,
340
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress2D_v3 = 327,
341
+ CUPTI_DRIVER_TRACE_CBID_cuIpcGetMemHandle = 328,
342
+ CUPTI_DRIVER_TRACE_CBID_cuIpcOpenMemHandle = 329,
343
+ CUPTI_DRIVER_TRACE_CBID_cuIpcCloseMemHandle = 330,
344
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetByPCIBusId = 331,
345
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetPCIBusId = 332,
346
+ CUPTI_DRIVER_TRACE_CBID_cuGLGetDevices = 333,
347
+ CUPTI_DRIVER_TRACE_CBID_cuIpcGetEventHandle = 334,
348
+ CUPTI_DRIVER_TRACE_CBID_cuIpcOpenEventHandle = 335,
349
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetSharedMemConfig = 336,
350
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetSharedMemConfig = 337,
351
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetSharedMemConfig = 338,
352
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectCreate = 339,
353
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectDestroy = 340,
354
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectGetResourceDesc = 341,
355
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectGetTextureDesc = 342,
356
+ CUPTI_DRIVER_TRACE_CBID_cuSurfObjectCreate = 343,
357
+ CUPTI_DRIVER_TRACE_CBID_cuSurfObjectDestroy = 344,
358
+ CUPTI_DRIVER_TRACE_CBID_cuSurfObjectGetResourceDesc = 345,
359
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAddCallback = 346,
360
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayCreate = 347,
361
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayGetLevel = 348,
362
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayDestroy = 349,
363
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmappedArray = 350,
364
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmapFilterMode = 351,
365
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmapLevelBias = 352,
366
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmapLevelClamp = 353,
367
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMaxAnisotropy = 354,
368
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmappedArray = 355,
369
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmapFilterMode = 356,
370
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmapLevelBias = 357,
371
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmapLevelClamp = 358,
372
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMaxAnisotropy = 359,
373
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedMipmappedArray = 360,
374
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectGetResourceViewDesc = 361,
375
+ CUPTI_DRIVER_TRACE_CBID_cuLinkCreate = 362,
376
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddData = 363,
377
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddFile = 364,
378
+ CUPTI_DRIVER_TRACE_CBID_cuLinkComplete = 365,
379
+ CUPTI_DRIVER_TRACE_CBID_cuLinkDestroy = 366,
380
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCreateWithPriority = 367,
381
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetPriority = 368,
382
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetFlags = 369,
383
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetStreamPriorityRange = 370,
384
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocManaged = 371,
385
+ CUPTI_DRIVER_TRACE_CBID_cuGetErrorString = 372,
386
+ CUPTI_DRIVER_TRACE_CBID_cuGetErrorName = 373,
387
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxActiveBlocksPerMultiprocessor = 374,
388
+ CUPTI_DRIVER_TRACE_CBID_cuCompilePtx = 375,
389
+ CUPTI_DRIVER_TRACE_CBID_cuBinaryFree = 376,
390
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAttachMemAsync = 377,
391
+ CUPTI_DRIVER_TRACE_CBID_cuPointerSetAttribute = 378,
392
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostRegister_v2 = 379,
393
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceSetMapFlags_v2 = 380,
394
+ CUPTI_DRIVER_TRACE_CBID_cuLinkCreate_v2 = 381,
395
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddData_v2 = 382,
396
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddFile_v2 = 383,
397
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxPotentialBlockSize = 384,
398
+ CUPTI_DRIVER_TRACE_CBID_cuGLGetDevices_v2 = 385,
399
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxRetain = 386,
400
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxRelease = 387,
401
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxSetFlags = 388,
402
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxReset = 389,
403
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsEGLRegisterImage = 390,
404
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetFlags = 391,
405
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxGetState = 392,
406
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerConnect = 393,
407
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerDisconnect = 394,
408
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerAcquireFrame = 395,
409
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerReleaseFrame = 396,
410
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoD_v2_ptds = 397,
411
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoH_v2_ptds = 398,
412
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoD_v2_ptds = 399,
413
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoA_v2_ptds = 400,
414
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoD_v2_ptds = 401,
415
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoA_v2_ptds = 402,
416
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoH_v2_ptds = 403,
417
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoA_v2_ptds = 404,
418
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2D_v2_ptds = 405,
419
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DUnaligned_v2_ptds = 406,
420
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3D_v2_ptds = 407,
421
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy_ptds = 408,
422
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeer_ptds = 409,
423
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeer_ptds = 410,
424
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8_v2_ptds = 411,
425
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16_v2_ptds = 412,
426
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32_v2_ptds = 413,
427
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8_v2_ptds = 414,
428
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16_v2_ptds = 415,
429
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32_v2_ptds = 416,
430
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObject_v2_ptds = 417,
431
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAsync_ptsz = 418,
432
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoAAsync_v2_ptsz = 419,
433
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoHAsync_v2_ptsz = 420,
434
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoDAsync_v2_ptsz = 421,
435
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoHAsync_v2_ptsz = 422,
436
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoDAsync_v2_ptsz = 423,
437
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DAsync_v2_ptsz = 424,
438
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DAsync_v2_ptsz = 425,
439
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeerAsync_ptsz = 426,
440
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeerAsync_ptsz = 427,
441
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8Async_ptsz = 428,
442
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16Async_ptsz = 429,
443
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32Async_ptsz = 430,
444
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8Async_ptsz = 431,
445
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16Async_ptsz = 432,
446
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32Async_ptsz = 433,
447
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetPriority_ptsz = 434,
448
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetFlags_ptsz = 435,
449
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitEvent_ptsz = 436,
450
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAddCallback_ptsz = 437,
451
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAttachMemAsync_ptsz = 438,
452
+ CUPTI_DRIVER_TRACE_CBID_cuStreamQuery_ptsz = 439,
453
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSynchronize_ptsz = 440,
454
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecord_ptsz = 441,
455
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernel_ptsz = 442,
456
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsMapResources_ptsz = 443,
457
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsUnmapResources_ptsz = 444,
458
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObjectAsync_v2_ptsz = 445,
459
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerConnect = 446,
460
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerDisconnect = 447,
461
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerPresentFrame = 448,
462
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedEglFrame = 449,
463
+ CUPTI_DRIVER_TRACE_CBID_cuPointerGetAttributes = 450,
464
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = 451,
465
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxPotentialBlockSizeWithFlags = 452,
466
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerReturnFrame = 453,
467
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetP2PAttribute = 454,
468
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetBorderColor = 455,
469
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetBorderColor = 456,
470
+ CUPTI_DRIVER_TRACE_CBID_cuMemAdvise = 457,
471
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32 = 458,
472
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32_ptsz = 459,
473
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32 = 460,
474
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32_ptsz = 461,
475
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp = 462,
476
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp_ptsz = 463,
477
+ CUPTI_DRIVER_TRACE_CBID_cuNVNbufferGetPointer = 464,
478
+ CUPTI_DRIVER_TRACE_CBID_cuNVNtextureGetArray = 465,
479
+ CUPTI_DRIVER_TRACE_CBID_cuNNSetAllocator = 466,
480
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync = 467,
481
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync_ptsz = 468,
482
+ CUPTI_DRIVER_TRACE_CBID_cuEventCreateFromNVNSync = 469,
483
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerConnectWithFlags = 470,
484
+ CUPTI_DRIVER_TRACE_CBID_cuMemRangeGetAttribute = 471,
485
+ CUPTI_DRIVER_TRACE_CBID_cuMemRangeGetAttributes = 472,
486
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64 = 473,
487
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64_ptsz = 474,
488
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64 = 475,
489
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64_ptsz = 476,
490
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchCooperativeKernel = 477,
491
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchCooperativeKernel_ptsz = 478,
492
+ CUPTI_DRIVER_TRACE_CBID_cuEventCreateFromEGLSync = 479,
493
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchCooperativeKernelMultiDevice = 480,
494
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetAttribute = 481,
495
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetUuid = 482,
496
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCtx = 483,
497
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCtx_ptsz = 484,
498
+ CUPTI_DRIVER_TRACE_CBID_cuImportExternalMemory = 485,
499
+ CUPTI_DRIVER_TRACE_CBID_cuExternalMemoryGetMappedBuffer = 486,
500
+ CUPTI_DRIVER_TRACE_CBID_cuExternalMemoryGetMappedMipmappedArray = 487,
501
+ CUPTI_DRIVER_TRACE_CBID_cuDestroyExternalMemory = 488,
502
+ CUPTI_DRIVER_TRACE_CBID_cuImportExternalSemaphore = 489,
503
+ CUPTI_DRIVER_TRACE_CBID_cuSignalExternalSemaphoresAsync = 490,
504
+ CUPTI_DRIVER_TRACE_CBID_cuSignalExternalSemaphoresAsync_ptsz = 491,
505
+ CUPTI_DRIVER_TRACE_CBID_cuWaitExternalSemaphoresAsync = 492,
506
+ CUPTI_DRIVER_TRACE_CBID_cuWaitExternalSemaphoresAsync_ptsz = 493,
507
+ CUPTI_DRIVER_TRACE_CBID_cuDestroyExternalSemaphore = 494,
508
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture = 495,
509
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture_ptsz = 496,
510
+ CUPTI_DRIVER_TRACE_CBID_cuStreamEndCapture = 497,
511
+ CUPTI_DRIVER_TRACE_CBID_cuStreamEndCapture_ptsz = 498,
512
+ CUPTI_DRIVER_TRACE_CBID_cuStreamIsCapturing = 499,
513
+ CUPTI_DRIVER_TRACE_CBID_cuStreamIsCapturing_ptsz = 500,
514
+ CUPTI_DRIVER_TRACE_CBID_cuGraphCreate = 501,
515
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddKernelNode = 502,
516
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeGetParams = 503,
517
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemcpyNode = 504,
518
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemcpyNodeGetParams = 505,
519
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemsetNode = 506,
520
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemsetNodeGetParams = 507,
521
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemsetNodeSetParams = 508,
522
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetType = 509,
523
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetRootNodes = 510,
524
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependencies = 511,
525
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependentNodes = 512,
526
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiate = 513,
527
+ CUPTI_DRIVER_TRACE_CBID_cuGraphLaunch = 514,
528
+ CUPTI_DRIVER_TRACE_CBID_cuGraphLaunch_ptsz = 515,
529
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecDestroy = 516,
530
+ CUPTI_DRIVER_TRACE_CBID_cuGraphDestroy = 517,
531
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddDependencies = 518,
532
+ CUPTI_DRIVER_TRACE_CBID_cuGraphRemoveDependencies = 519,
533
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemcpyNodeSetParams = 520,
534
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeSetParams = 521,
535
+ CUPTI_DRIVER_TRACE_CBID_cuGraphDestroyNode = 522,
536
+ CUPTI_DRIVER_TRACE_CBID_cuGraphClone = 523,
537
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeFindInClone = 524,
538
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddChildGraphNode = 525,
539
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddEmptyNode = 526,
540
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchHostFunc = 527,
541
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchHostFunc_ptsz = 528,
542
+ CUPTI_DRIVER_TRACE_CBID_cuGraphChildGraphNodeGetGraph = 529,
543
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddHostNode = 530,
544
+ CUPTI_DRIVER_TRACE_CBID_cuGraphHostNodeGetParams = 531,
545
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetLuid = 532,
546
+ CUPTI_DRIVER_TRACE_CBID_cuGraphHostNodeSetParams = 533,
547
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetNodes = 534,
548
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetEdges = 535,
549
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo = 536,
550
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_ptsz = 537,
551
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecKernelNodeSetParams = 538,
552
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture_v2 = 539,
553
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture_v2_ptsz = 540,
554
+ CUPTI_DRIVER_TRACE_CBID_cuThreadExchangeStreamCaptureMode = 541,
555
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetNvSciSyncAttributes = 542,
556
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyAvailableDynamicSMemPerBlock = 543,
557
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxRelease_v2 = 544,
558
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxReset_v2 = 545,
559
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxSetFlags_v2 = 546,
560
+ CUPTI_DRIVER_TRACE_CBID_cuMemAddressReserve = 547,
561
+ CUPTI_DRIVER_TRACE_CBID_cuMemAddressFree = 548,
562
+ CUPTI_DRIVER_TRACE_CBID_cuMemCreate = 549,
563
+ CUPTI_DRIVER_TRACE_CBID_cuMemRelease = 550,
564
+ CUPTI_DRIVER_TRACE_CBID_cuMemMap = 551,
565
+ CUPTI_DRIVER_TRACE_CBID_cuMemUnmap = 552,
566
+ CUPTI_DRIVER_TRACE_CBID_cuMemSetAccess = 553,
567
+ CUPTI_DRIVER_TRACE_CBID_cuMemExportToShareableHandle = 554,
568
+ CUPTI_DRIVER_TRACE_CBID_cuMemImportFromShareableHandle = 555,
569
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAllocationGranularity = 556,
570
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAllocationPropertiesFromHandle = 557,
571
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAccess = 558,
572
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetFlags = 559,
573
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetFlags_ptsz = 560,
574
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecUpdate = 561,
575
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecMemcpyNodeSetParams = 562,
576
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecMemsetNodeSetParams = 563,
577
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecHostNodeSetParams = 564,
578
+ CUPTI_DRIVER_TRACE_CBID_cuMemRetainAllocationHandle = 565,
579
+ CUPTI_DRIVER_TRACE_CBID_cuFuncGetModule = 566,
580
+ CUPTI_DRIVER_TRACE_CBID_cuIpcOpenMemHandle_v2 = 567,
581
+ CUPTI_DRIVER_TRACE_CBID_cuCtxResetPersistingL2Cache = 568,
582
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeCopyAttributes = 569,
583
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeGetAttribute = 570,
584
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeSetAttribute = 571,
585
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCopyAttributes = 572,
586
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCopyAttributes_ptsz = 573,
587
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetAttribute = 574,
588
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetAttribute_ptsz = 575,
589
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetAttribute = 576,
590
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetAttribute_ptsz = 577,
591
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiate_v2 = 578,
592
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetTexture1DLinearMaxWidth = 579,
593
+ CUPTI_DRIVER_TRACE_CBID_cuGraphUpload = 580,
594
+ CUPTI_DRIVER_TRACE_CBID_cuGraphUpload_ptsz = 581,
595
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetSparseProperties = 582,
596
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayGetSparseProperties = 583,
597
+ CUPTI_DRIVER_TRACE_CBID_cuMemMapArrayAsync = 584,
598
+ CUPTI_DRIVER_TRACE_CBID_cuMemMapArrayAsync_ptsz = 585,
599
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecChildGraphNodeSetParams = 586,
600
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecordWithFlags = 587,
601
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecordWithFlags_ptsz = 588,
602
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddEventRecordNode = 589,
603
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddEventWaitNode = 590,
604
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventRecordNodeGetEvent = 591,
605
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventWaitNodeGetEvent = 592,
606
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventRecordNodeSetEvent = 593,
607
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventWaitNodeSetEvent = 594,
608
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecEventRecordNodeSetEvent = 595,
609
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecEventWaitNodeSetEvent = 596,
610
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetPlane = 597,
611
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocAsync = 598,
612
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocAsync_ptsz = 599,
613
+ CUPTI_DRIVER_TRACE_CBID_cuMemFreeAsync = 600,
614
+ CUPTI_DRIVER_TRACE_CBID_cuMemFreeAsync_ptsz = 601,
615
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolTrimTo = 602,
616
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolSetAttribute = 603,
617
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolGetAttribute = 604,
618
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolSetAccess = 605,
619
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetDefaultMemPool = 606,
620
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolCreate = 607,
621
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolDestroy = 608,
622
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceSetMemPool = 609,
623
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetMemPool = 610,
624
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocFromPoolAsync = 611,
625
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocFromPoolAsync_ptsz = 612,
626
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolExportToShareableHandle = 613,
627
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolImportFromShareableHandle = 614,
628
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolExportPointer = 615,
629
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolImportPointer = 616,
630
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolGetAccess = 617,
631
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddExternalSemaphoresSignalNode = 618,
632
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresSignalNodeGetParams = 619,
633
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresSignalNodeSetParams = 620,
634
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddExternalSemaphoresWaitNode = 621,
635
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresWaitNodeGetParams = 622,
636
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresWaitNodeSetParams = 623,
637
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecExternalSemaphoresSignalNodeSetParams = 624,
638
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecExternalSemaphoresWaitNodeSetParams = 625,
639
+ CUPTI_DRIVER_TRACE_CBID_cuGetProcAddress = 626,
640
+ CUPTI_DRIVER_TRACE_CBID_cuFlushGPUDirectRDMAWrites = 627,
641
+ CUPTI_DRIVER_TRACE_CBID_cuGraphDebugDotPrint = 628,
642
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v2 = 629,
643
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v2_ptsz = 630,
644
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies = 631,
645
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies_ptsz = 632,
646
+ CUPTI_DRIVER_TRACE_CBID_cuUserObjectCreate = 633,
647
+ CUPTI_DRIVER_TRACE_CBID_cuUserObjectRetain = 634,
648
+ CUPTI_DRIVER_TRACE_CBID_cuUserObjectRelease = 635,
649
+ CUPTI_DRIVER_TRACE_CBID_cuGraphRetainUserObject = 636,
650
+ CUPTI_DRIVER_TRACE_CBID_cuGraphReleaseUserObject = 637,
651
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemAllocNode = 638,
652
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemFreeNode = 639,
653
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGraphMemTrim = 640,
654
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetGraphMemAttribute = 641,
655
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceSetGraphMemAttribute = 642,
656
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiateWithFlags = 643,
657
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetExecAffinitySupport = 644,
658
+ CUPTI_DRIVER_TRACE_CBID_cuCtxCreate_v3 = 645,
659
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetExecAffinity = 646,
660
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetUuid_v2 = 647,
661
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemAllocNodeGetParams = 648,
662
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemFreeNodeGetParams = 649,
663
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeSetEnabled = 650,
664
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetEnabled = 651,
665
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernelEx = 652,
666
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernelEx_ptsz = 653,
667
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetMemoryRequirements = 654,
668
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayGetMemoryRequirements = 655,
669
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiateWithParams = 656,
670
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiateWithParams_ptsz = 657,
671
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecGetFlags = 658,
672
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32_v2 = 659,
673
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32_v2_ptsz = 660,
674
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64_v2 = 661,
675
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64_v2_ptsz = 662,
676
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32_v2 = 663,
677
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32_v2_ptsz = 664,
678
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64_v2 = 665,
679
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64_v2_ptsz = 666,
680
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp_v2 = 667,
681
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp_v2_ptsz = 668,
682
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddBatchMemOpNode = 669,
683
+ CUPTI_DRIVER_TRACE_CBID_cuGraphBatchMemOpNodeGetParams = 670,
684
+ CUPTI_DRIVER_TRACE_CBID_cuGraphBatchMemOpNodeSetParams = 671,
685
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecBatchMemOpNodeSetParams = 672,
686
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetLoadingMode = 673,
687
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetHandleForAddressRange = 674,
688
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxPotentialClusterSize = 675,
689
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxActiveClusters = 676,
690
+ CUPTI_DRIVER_TRACE_CBID_cuGetProcAddress_v2 = 677,
691
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryLoadData = 678,
692
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryLoadFromFile = 679,
693
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryUnload = 680,
694
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetKernel = 681,
695
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetModule = 682,
696
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetFunction = 683,
697
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetGlobal = 684,
698
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetManaged = 685,
699
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetAttribute = 686,
700
+ CUPTI_DRIVER_TRACE_CBID_cuKernelSetAttribute = 687,
701
+ CUPTI_DRIVER_TRACE_CBID_cuKernelSetCacheConfig = 688,
702
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddKernelNode_v2 = 689,
703
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeGetParams_v2 = 690,
704
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeSetParams_v2 = 691,
705
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecKernelNodeSetParams_v2 = 692,
706
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetId = 693,
707
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetId_ptsz = 694,
708
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetId = 695,
709
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecUpdate_v2 = 696,
710
+ CUPTI_DRIVER_TRACE_CBID_cuTensorMapEncodeTiled = 697,
711
+ CUPTI_DRIVER_TRACE_CBID_cuTensorMapEncodeIm2col = 698,
712
+ CUPTI_DRIVER_TRACE_CBID_cuTensorMapReplaceAddress = 699,
713
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetUnifiedFunction = 700,
714
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpGetAttribute = 701,
715
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpGetAttributeGlobal = 702,
716
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpSetAttribute = 703,
717
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpSetAttributeGlobal = 704,
718
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetFlags = 705,
719
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastCreate = 706,
720
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastAddDevice = 707,
721
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastBindMem = 708,
722
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastBindAddr = 709,
723
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastUnbind = 710,
724
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastGetGranularity = 711,
725
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddNode = 712,
726
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeSetParams = 713,
727
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecNodeSetParams = 714,
728
+ CUPTI_DRIVER_TRACE_CBID_cuMemAdvise_v2 = 715,
729
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync_v2 = 716,
730
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync_v2_ptsz = 717,
731
+ CUPTI_DRIVER_TRACE_CBID_cuFuncGetName = 718,
732
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetName = 719,
733
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCaptureToGraph = 720,
734
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCaptureToGraph_ptsz = 721,
735
+ CUPTI_DRIVER_TRACE_CBID_cuGraphConditionalHandleCreate = 722,
736
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddNode_v2 = 723,
737
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetEdges_v2 = 724,
738
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependencies_v2 = 725,
739
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependentNodes_v2 = 726,
740
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddDependencies_v2 = 727,
741
+ CUPTI_DRIVER_TRACE_CBID_cuGraphRemoveDependencies_v2 = 728,
742
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v3 = 729,
743
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v3_ptsz = 730,
744
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies_v2 = 731,
745
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies_v2_ptsz = 732,
746
+ CUPTI_DRIVER_TRACE_CBID_cuFuncGetParamInfo = 733,
747
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetParamInfo = 734,
748
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceRegisterAsyncNotification = 735,
749
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceUnregisterAsyncNotification = 736,
750
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetFunctionCount = 737,
751
+ CUPTI_DRIVER_TRACE_CBID_cuModuleEnumerateFunctions = 738,
752
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetKernelCount = 739,
753
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryEnumerateKernels = 740,
754
+ CUPTI_DRIVER_TRACE_CBID_cuFuncIsLoaded = 741,
755
+ CUPTI_DRIVER_TRACE_CBID_cuFuncLoad = 742,
756
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxCreate = 743,
757
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxDestroy = 744,
758
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetDevResource = 745,
759
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetDevResource = 746,
760
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxGetDevResource = 747,
761
+ CUPTI_DRIVER_TRACE_CBID_cuDevResourceGenerateDesc = 748,
762
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxRecordEvent = 749,
763
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxWaitEvent = 750,
764
+ CUPTI_DRIVER_TRACE_CBID_cuDevSmResourceSplitByCount = 751,
765
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetGreenCtx = 752,
766
+ CUPTI_DRIVER_TRACE_CBID_cuCtxFromGreenCtx = 753,
767
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetLibrary = 754,
768
+ CUPTI_DRIVER_TRACE_CBID_cuCtxRecordEvent = 755,
769
+ CUPTI_DRIVER_TRACE_CBID_cuCtxWaitEvent = 756,
770
+ CUPTI_DRIVER_TRACE_CBID_cuCtxCreate_v4 = 757,
771
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxStreamCreate = 758,
772
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCtx_v2 = 759,
773
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCtx_v2_ptsz = 760,
774
+ CUPTI_DRIVER_TRACE_CBID_cuMemBatchDecompressAsync = 761,
775
+ CUPTI_DRIVER_TRACE_CBID_cuMemBatchDecompressAsync_ptsz = 762,
776
+ CUPTI_DRIVER_TRACE_CBID_cuLogsRegisterCallback = 763,
777
+ CUPTI_DRIVER_TRACE_CBID_cuLogsUnregisterCallback = 764,
778
+ CUPTI_DRIVER_TRACE_CBID_cuLogsCurrent = 765,
779
+ CUPTI_DRIVER_TRACE_CBID_cuLogsDumpToFile = 766,
780
+ CUPTI_DRIVER_TRACE_CBID_cuLogsDumpToMemory = 767,
781
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessGetRestoreThreadId = 768,
782
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessGetState = 769,
783
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessLock = 770,
784
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessCheckpoint = 771,
785
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessRestore = 772,
786
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessUnlock = 773,
787
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetDevice = 774,
788
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetDevice_ptsz = 775,
789
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyBatchAsync = 776,
790
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyBatchAsync_ptsz = 777,
791
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DBatchAsync = 778,
792
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DBatchAsync_ptsz = 779,
793
+ CUPTI_DRIVER_TRACE_CBID_cuEventElapsedTime_v2 = 780,
794
+ CUPTI_DRIVER_TRACE_CBID_cuTensorMapEncodeIm2colWide = 781,
795
+ CUPTI_DRIVER_TRACE_CBID_SIZE = 782,
796
+ CUPTI_DRIVER_TRACE_CBID_FORCE_INT = 0x7fffffff
797
+ } CUpti_driver_api_trace_cbid;
798
+
799
+ #endif
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_events.h ADDED
@@ -0,0 +1,1349 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2010-2024 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(_CUPTI_EVENTS_H_)
51
+ #define _CUPTI_EVENTS_H_
52
+
53
+ #include <cuda.h>
54
+ #include <string.h>
55
+ #include <cuda_stdint.h>
56
+ #include <cupti_result.h>
57
+
58
+ #ifndef CUPTIAPI
59
+ #ifdef _WIN32
60
+ #define CUPTIAPI __stdcall
61
+ #else
62
+ #define CUPTIAPI
63
+ #endif
64
+ #endif
65
+
66
+ #if defined(__cplusplus)
67
+ extern "C" {
68
+ #endif
69
+
70
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
71
+ #pragma GCC visibility push(default)
72
+ #endif
73
+
74
+ /**
75
+ * \defgroup CUPTI_EVENT_API CUPTI Event API
76
+ * Functions, types, and enums that implement the CUPTI Event API.
77
+ *
78
+ * \note The CUPTI event API from the header cupti_events.h is not supported on devices
79
+ * with compute capability 7.5 and higher (i.e. Turing and later GPU architectures).
80
+ * This API is deprecated in CUDA 12.8 release and will be removed in a future CUDA release.
81
+ * This is replaced by the host profiling API in the header cupti_profiler_host.h and
82
+ * target profiling API in the header cupti_range_profiler.h which are supported on
83
+ * devices with compute capability 7.0 and higher (i.e. Volta and later GPU architectures).
84
+ *
85
+ * @{
86
+ */
87
+
88
+ /**
89
+ * \brief ID for an event.
90
+ *
91
+ * An event represents a countable activity, action, or occurrence on
92
+ * the device.
93
+ */
94
+ typedef uint32_t CUpti_EventID;
95
+
96
+ /**
97
+ * \brief ID for an event domain.
98
+ *
99
+ * ID for an event domain. An event domain represents a group of
100
+ * related events. A device may have multiple instances of a domain,
101
+ * indicating that the device can simultaneously record multiple
102
+ * instances of each event within that domain.
103
+ */
104
+ typedef uint32_t CUpti_EventDomainID;
105
+
106
+ /**
107
+ * \brief A group of events.
108
+ *
109
+ * An event group is a collection of events that are managed
110
+ * together. All events in an event group must belong to the same
111
+ * domain.
112
+ */
113
+ typedef void *CUpti_EventGroup;
114
+
115
+ /**
116
+ * \brief Device class.
117
+ *
118
+ * Enumeration of device classes for device attribute
119
+ * CUPTI_DEVICE_ATTR_DEVICE_CLASS.
120
+ */
121
+ typedef enum {
122
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_TESLA = 0,
123
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_QUADRO = 1,
124
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_GEFORCE = 2,
125
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_TEGRA = 3,
126
+ } CUpti_DeviceAttributeDeviceClass;
127
+
128
+ /**
129
+ * \brief Device attributes.
130
+ *
131
+ * CUPTI device attributes. These attributes can be read using \ref
132
+ * cuptiDeviceGetAttribute.
133
+ */
134
+ typedef enum {
135
+ /**
136
+ * Number of event IDs for a device. Value is a uint32_t.
137
+ */
138
+ CUPTI_DEVICE_ATTR_MAX_EVENT_ID = 1,
139
+ /**
140
+ * Number of event domain IDs for a device. Value is a uint32_t.
141
+ */
142
+ CUPTI_DEVICE_ATTR_MAX_EVENT_DOMAIN_ID = 2,
143
+ /**
144
+ * Get global memory bandwidth in Kbytes/sec. Value is a uint64_t.
145
+ */
146
+ CUPTI_DEVICE_ATTR_GLOBAL_MEMORY_BANDWIDTH = 3,
147
+ /**
148
+ * Get theoretical maximum number of instructions per cycle. Value
149
+ * is a uint32_t.
150
+ */
151
+ CUPTI_DEVICE_ATTR_INSTRUCTION_PER_CYCLE = 4,
152
+ /**
153
+ * Get theoretical maximum number of single precision instructions
154
+ * that can be executed per second. Value is a uint64_t.
155
+ */
156
+ CUPTI_DEVICE_ATTR_INSTRUCTION_THROUGHPUT_SINGLE_PRECISION = 5,
157
+ /**
158
+ * Get number of frame buffers for device. Value is a uint64_t.
159
+ */
160
+ CUPTI_DEVICE_ATTR_MAX_FRAME_BUFFERS = 6,
161
+ /**
162
+ * Get PCIE link rate in Mega bits/sec for device. Return 0 if bus-type
163
+ * is non-PCIE. Value is a uint64_t.
164
+ */
165
+ CUPTI_DEVICE_ATTR_PCIE_LINK_RATE = 7,
166
+ /**
167
+ * Get PCIE link width for device. Return 0 if bus-type
168
+ * is non-PCIE. Value is a uint64_t.
169
+ */
170
+ CUPTI_DEVICE_ATTR_PCIE_LINK_WIDTH = 8,
171
+ /**
172
+ * Get PCIE generation for device. Return 0 if bus-type
173
+ * is non-PCIE. Value is a uint64_t.
174
+ */
175
+ CUPTI_DEVICE_ATTR_PCIE_GEN = 9,
176
+ /**
177
+ * Get the class for the device. Value is a
178
+ * CUpti_DeviceAttributeDeviceClass.
179
+ */
180
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS = 10,
181
+ /**
182
+ * Get the peak single precision flop per cycle. Value is a uint64_t.
183
+ */
184
+ CUPTI_DEVICE_ATTR_FLOP_SP_PER_CYCLE = 11,
185
+ /**
186
+ * Get the peak double precision flop per cycle. Value is a uint64_t.
187
+ */
188
+ CUPTI_DEVICE_ATTR_FLOP_DP_PER_CYCLE = 12,
189
+ /**
190
+ * Get number of L2 units. Value is a uint64_t.
191
+ */
192
+ CUPTI_DEVICE_ATTR_MAX_L2_UNITS = 13,
193
+ /**
194
+ * Get the maximum shared memory for the CU_FUNC_CACHE_PREFER_SHARED
195
+ * preference. Value is a uint64_t.
196
+ */
197
+ CUPTI_DEVICE_ATTR_MAX_SHARED_MEMORY_CACHE_CONFIG_PREFER_SHARED = 14,
198
+ /**
199
+ * Get the maximum shared memory for the CU_FUNC_CACHE_PREFER_L1
200
+ * preference. Value is a uint64_t.
201
+ */
202
+ CUPTI_DEVICE_ATTR_MAX_SHARED_MEMORY_CACHE_CONFIG_PREFER_L1 = 15,
203
+ /**
204
+ * Get the maximum shared memory for the CU_FUNC_CACHE_PREFER_EQUAL
205
+ * preference. Value is a uint64_t.
206
+ */
207
+ CUPTI_DEVICE_ATTR_MAX_SHARED_MEMORY_CACHE_CONFIG_PREFER_EQUAL = 16,
208
+ /**
209
+ * Get the peak half precision flop per cycle. Value is a uint64_t.
210
+ */
211
+ CUPTI_DEVICE_ATTR_FLOP_HP_PER_CYCLE = 17,
212
+ /**
213
+ * Check if Nvlink is connected to device. Returns 1, if at least one
214
+ * Nvlink is connected to the device, returns 0 otherwise.
215
+ * Value is a uint32_t.
216
+ */
217
+ CUPTI_DEVICE_ATTR_NVLINK_PRESENT = 18,
218
+ /**
219
+ * Check if Nvlink is present between GPU and CPU. Returns Bandwidth,
220
+ * in Bytes/sec, if Nvlink is present, returns 0 otherwise.
221
+ * Value is a uint64_t.
222
+ */
223
+ CUPTI_DEVICE_ATTR_GPU_CPU_NVLINK_BW = 19,
224
+ /**
225
+ * Check if NVSwitch is present in the underlying topology.
226
+ * Returns 1, if present, returns 0 otherwise.
227
+ * Value is a uint32_t.
228
+ */
229
+ CUPTI_DEVICE_ATTR_NVSWITCH_PRESENT = 20,
230
+ CUPTI_DEVICE_ATTR_FORCE_INT = 0x7fffffff,
231
+ } CUpti_DeviceAttribute;
232
+
233
+ /**
234
+ * \brief Event domain attributes.
235
+ *
236
+ * Event domain attributes. Except where noted, all the attributes can
237
+ * be read using either \ref cuptiDeviceGetEventDomainAttribute or
238
+ * \ref cuptiEventDomainGetAttribute.
239
+ */
240
+ typedef enum {
241
+ /**
242
+ * Event domain name. Value is a null terminated const c-string.
243
+ */
244
+ CUPTI_EVENT_DOMAIN_ATTR_NAME = 0,
245
+ /**
246
+ * Number of instances of the domain for which event counts will be
247
+ * collected. The domain may have additional instances that cannot
248
+ * be profiled (see CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT).
249
+ * Can be read only with \ref
250
+ * cuptiDeviceGetEventDomainAttribute. Value is a uint32_t.
251
+ */
252
+ CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT = 1,
253
+ /**
254
+ * Total number of instances of the domain, including instances that
255
+ * cannot be profiled. Use CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT
256
+ * to get the number of instances that can be profiled. Can be read
257
+ * only with \ref cuptiDeviceGetEventDomainAttribute. Value is a
258
+ * uint32_t.
259
+ */
260
+ CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT = 3,
261
+ /**
262
+ * Collection method used for events contained in the event domain.
263
+ * Value is a \ref CUpti_EventCollectionMethod.
264
+ */
265
+ CUPTI_EVENT_DOMAIN_ATTR_COLLECTION_METHOD = 4,
266
+
267
+ CUPTI_EVENT_DOMAIN_ATTR_FORCE_INT = 0x7fffffff,
268
+ } CUpti_EventDomainAttribute;
269
+
270
+ /**
271
+ * \brief The collection method used for an event.
272
+ *
273
+ * The collection method indicates how an event is collected.
274
+ */
275
+ typedef enum {
276
+ /**
277
+ * Event is collected using a hardware global performance monitor.
278
+ */
279
+ CUPTI_EVENT_COLLECTION_METHOD_PM = 0,
280
+ /**
281
+ * Event is collected using a hardware SM performance monitor.
282
+ */
283
+ CUPTI_EVENT_COLLECTION_METHOD_SM = 1,
284
+ /**
285
+ * Event is collected using software instrumentation.
286
+ */
287
+ CUPTI_EVENT_COLLECTION_METHOD_INSTRUMENTED = 2,
288
+ /**
289
+ * Event is collected using NvLink throughput counter method.
290
+ */
291
+ CUPTI_EVENT_COLLECTION_METHOD_NVLINK_TC = 3,
292
+ CUPTI_EVENT_COLLECTION_METHOD_FORCE_INT = 0x7fffffff
293
+ } CUpti_EventCollectionMethod;
294
+
295
+ /**
296
+ * \brief Event group attributes.
297
+ *
298
+ * Event group attributes. These attributes can be read using \ref
299
+ * cuptiEventGroupGetAttribute. Attributes marked [rw] can also be
300
+ * written using \ref cuptiEventGroupSetAttribute.
301
+ */
302
+ typedef enum {
303
+ /**
304
+ * The domain to which the event group is bound. This attribute is
305
+ * set when the first event is added to the group. Value is a
306
+ * CUpti_EventDomainID.
307
+ */
308
+ CUPTI_EVENT_GROUP_ATTR_EVENT_DOMAIN_ID = 0,
309
+ /**
310
+ * [rw] Profile all the instances of the domain for this
311
+ * eventgroup. This feature can be used to get load balancing
312
+ * across all instances of a domain. Value is an integer.
313
+ */
314
+ CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES = 1,
315
+ /**
316
+ * [rw] Reserved for user data.
317
+ */
318
+ CUPTI_EVENT_GROUP_ATTR_USER_DATA = 2,
319
+ /**
320
+ * Number of events in the group. Value is a uint32_t.
321
+ */
322
+ CUPTI_EVENT_GROUP_ATTR_NUM_EVENTS = 3,
323
+ /**
324
+ * Enumerates events in the group. Value is a pointer to buffer of
325
+ * size sizeof(CUpti_EventID) * num_of_events in the eventgroup.
326
+ * num_of_events can be queried using
327
+ * CUPTI_EVENT_GROUP_ATTR_NUM_EVENTS.
328
+ */
329
+ CUPTI_EVENT_GROUP_ATTR_EVENTS = 4,
330
+ /**
331
+ * Number of instances of the domain bound to this event group that
332
+ * will be counted. Value is a uint32_t.
333
+ */
334
+ CUPTI_EVENT_GROUP_ATTR_INSTANCE_COUNT = 5,
335
+ /**
336
+ * Event group scope can be set to CUPTI_EVENT_PROFILING_SCOPE_DEVICE or
337
+ * CUPTI_EVENT_PROFILING_SCOPE_CONTEXT for an eventGroup, before
338
+ * adding any event.
339
+ * Sets the scope of eventgroup as CUPTI_EVENT_PROFILING_SCOPE_DEVICE or
340
+ * CUPTI_EVENT_PROFILING_SCOPE_CONTEXT when the scope of the events
341
+ * that will be added is CUPTI_EVENT_PROFILING_SCOPE_BOTH.
342
+ * If profiling scope of event is either
343
+ * CUPTI_EVENT_PROFILING_SCOPE_DEVICE or CUPTI_EVENT_PROFILING_SCOPE_CONTEXT
344
+ * then setting this attribute will not affect the default scope.
345
+ * It is not allowed to add events of different scope to same eventgroup.
346
+ * Value is a uint32_t.
347
+ */
348
+ CUPTI_EVENT_GROUP_ATTR_PROFILING_SCOPE = 6,
349
+ CUPTI_EVENT_GROUP_ATTR_FORCE_INT = 0x7fffffff,
350
+ } CUpti_EventGroupAttribute;
351
+
352
+ /**
353
+ * \brief Profiling scope for event.
354
+ *
355
+ * Profiling scope of event indicates if the event can be collected at context
356
+ * scope or device scope or both i.e. it can be collected at any of context or
357
+ * device scope.
358
+ */
359
+ typedef enum {
360
+ /**
361
+ * Event is collected at context scope.
362
+ */
363
+ CUPTI_EVENT_PROFILING_SCOPE_CONTEXT = 0,
364
+ /**
365
+ * Event is collected at device scope.
366
+ */
367
+ CUPTI_EVENT_PROFILING_SCOPE_DEVICE = 1,
368
+ /**
369
+ * Event can be collected at device or context scope.
370
+ * The scope can be set using \ref cuptiEventGroupSetAttribute API.
371
+ */
372
+ CUPTI_EVENT_PROFILING_SCOPE_BOTH = 2,
373
+ CUPTI_EVENT_PROFILING_SCOPE_FORCE_INT = 0x7fffffff
374
+ } CUpti_EventProfilingScope;
375
+
376
+ /**
377
+ * \brief Event attributes.
378
+ *
379
+ * Event attributes. These attributes can be read using \ref
380
+ * cuptiEventGetAttribute.
381
+ */
382
+ typedef enum {
383
+ /**
384
+ * Event name. Value is a null terminated const c-string.
385
+ */
386
+ CUPTI_EVENT_ATTR_NAME = 0,
387
+ /**
388
+ * Short description of event. Value is a null terminated const
389
+ * c-string.
390
+ */
391
+ CUPTI_EVENT_ATTR_SHORT_DESCRIPTION = 1,
392
+ /**
393
+ * Long description of event. Value is a null terminated const
394
+ * c-string.
395
+ */
396
+ CUPTI_EVENT_ATTR_LONG_DESCRIPTION = 2,
397
+ /**
398
+ * Category of event. Value is CUpti_EventCategory.
399
+ */
400
+ CUPTI_EVENT_ATTR_CATEGORY = 3,
401
+ /**
402
+ * Profiling scope of the events. It can be either device or context or both.
403
+ * Value is a \ref CUpti_EventProfilingScope.
404
+ */
405
+ CUPTI_EVENT_ATTR_PROFILING_SCOPE = 5,
406
+
407
+ CUPTI_EVENT_ATTR_FORCE_INT = 0x7fffffff,
408
+ } CUpti_EventAttribute;
409
+
410
+ /**
411
+ * \brief Event collection modes.
412
+ *
413
+ * The event collection mode determines the period over which the
414
+ * events within the enabled event groups will be collected.
415
+ */
416
+ typedef enum {
417
+ /**
418
+ * Events are collected for the entire duration between the
419
+ * cuptiEventGroupEnable and cuptiEventGroupDisable calls.
420
+ * Event values are reset when the events are read.
421
+ * For CUDA toolkit v6.0 and older this was the default mode.
422
+ */
423
+ CUPTI_EVENT_COLLECTION_MODE_CONTINUOUS = 0,
424
+ /**
425
+ * Events are collected only for the durations of kernel executions
426
+ * that occur between the cuptiEventGroupEnable and
427
+ * cuptiEventGroupDisable calls. Event collection begins when a
428
+ * kernel execution begins, and stops when kernel execution
429
+ * completes. Event values are reset to zero when each kernel
430
+ * execution begins. If multiple kernel executions occur between the
431
+ * cuptiEventGroupEnable and cuptiEventGroupDisable calls then the
432
+ * event values must be read after each kernel launch if those
433
+ * events need to be associated with the specific kernel launch.
434
+ * Note that collection in this mode may significantly change the
435
+ * overall performance characteristics of the application because
436
+ * kernel executions that occur between the cuptiEventGroupEnable and
437
+ * cuptiEventGroupDisable calls are serialized on the GPU.
438
+ * This is the default mode from CUDA toolkit v6.5
439
+ */
440
+ CUPTI_EVENT_COLLECTION_MODE_KERNEL = 1,
441
+ CUPTI_EVENT_COLLECTION_MODE_FORCE_INT = 0x7fffffff
442
+ } CUpti_EventCollectionMode;
443
+
444
+ /**
445
+ * \brief An event category.
446
+ *
447
+ * Each event is assigned to a category that represents the general
448
+ * type of the event. A event's category is accessed using \ref
449
+ * cuptiEventGetAttribute and the CUPTI_EVENT_ATTR_CATEGORY attribute.
450
+ */
451
+ typedef enum {
452
+ /**
453
+ * An instruction related event.
454
+ */
455
+ CUPTI_EVENT_CATEGORY_INSTRUCTION = 0,
456
+ /**
457
+ * A memory related event.
458
+ */
459
+ CUPTI_EVENT_CATEGORY_MEMORY = 1,
460
+ /**
461
+ * A cache related event.
462
+ */
463
+ CUPTI_EVENT_CATEGORY_CACHE = 2,
464
+ /**
465
+ * A profile-trigger event.
466
+ */
467
+ CUPTI_EVENT_CATEGORY_PROFILE_TRIGGER = 3,
468
+ /**
469
+ * A system event.
470
+ */
471
+ CUPTI_EVENT_CATEGORY_SYSTEM = 4,
472
+ CUPTI_EVENT_CATEGORY_FORCE_INT = 0x7fffffff
473
+ } CUpti_EventCategory;
474
+
475
+ /**
476
+ * \brief The overflow value for a CUPTI event.
477
+ *
478
+ * The CUPTI event value that indicates an overflow.
479
+ */
480
+ #define CUPTI_EVENT_OVERFLOW ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
481
+
482
+ /**
483
+ * \brief The value that indicates the event value is invalid
484
+ */
485
+ #define CUPTI_EVENT_INVALID ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
486
+
487
+ /**
488
+ * \brief Flags for cuptiEventGroupReadEvent an
489
+ * cuptiEventGroupReadAllEvents.
490
+ *
491
+ * Flags for \ref cuptiEventGroupReadEvent an \ref
492
+ * cuptiEventGroupReadAllEvents.
493
+ */
494
+ typedef enum {
495
+ /**
496
+ * No flags.
497
+ */
498
+ CUPTI_EVENT_READ_FLAG_NONE = 0,
499
+ CUPTI_EVENT_READ_FLAG_FORCE_INT = 0x7fffffff,
500
+ } CUpti_ReadEventFlags;
501
+
502
+
503
+ /**
504
+ * \brief A set of event groups.
505
+ *
506
+ * A set of event groups. When returned by \ref
507
+ * cuptiEventGroupSetsCreate and \ref cuptiMetricCreateEventGroupSets
508
+ * a set indicates that event groups that can be enabled at the same
509
+ * time (i.e. all the events in the set can be collected
510
+ * simultaneously).
511
+ */
512
+ typedef struct {
513
+ /**
514
+ * The number of event groups in the set.
515
+ */
516
+ uint32_t numEventGroups;
517
+ /**
518
+ * An array of \p numEventGroups event groups.
519
+ */
520
+ CUpti_EventGroup *eventGroups;
521
+ } CUpti_EventGroupSet;
522
+
523
+ /**
524
+ * \brief A set of event group sets.
525
+ *
526
+ * A set of event group sets. When returned by \ref
527
+ * cuptiEventGroupSetsCreate and \ref cuptiMetricCreateEventGroupSets
528
+ * a CUpti_EventGroupSets indicates the number of passes required to
529
+ * collect all the events, and the event groups that should be
530
+ * collected during each pass.
531
+ */
532
+ typedef struct {
533
+ /**
534
+ * Number of event group sets.
535
+ */
536
+ uint32_t numSets;
537
+ /**
538
+ * An array of \p numSets event group sets.
539
+ */
540
+ CUpti_EventGroupSet *sets;
541
+ } CUpti_EventGroupSets;
542
+
543
+ /**
544
+ * \brief Set the event collection mode.
545
+ *
546
+ * Set the event collection mode for a \p context. The \p mode
547
+ * controls the event collection behavior of all events in event
548
+ * groups created in the \p context. This API is invalid in kernel
549
+ * replay mode.
550
+ * \note \b Thread-safety: this function is thread safe.
551
+ *
552
+ * \param context The context
553
+ * \param mode The event collection mode
554
+ *
555
+ * \retval CUPTI_SUCCESS
556
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
557
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
558
+ * \retval CUPTI_ERROR_INVALID_OPERATION if called when replay mode is enabled
559
+ * \retval CUPTI_ERROR_NOT_SUPPORTED if mode is not supported on the device
560
+ */
561
+
562
+ CUptiResult CUPTIAPI cuptiSetEventCollectionMode(CUcontext context,
563
+ CUpti_EventCollectionMode mode);
564
+
565
+ /**
566
+ * \brief Read a device attribute.
567
+ *
568
+ * Read a device attribute and return it in \p *value.
569
+ * \note \b Thread-safety: this function is thread safe.
570
+ *
571
+ * \param device The CUDA device
572
+ * \param attrib The attribute to read
573
+ * \param valueSize Size of buffer pointed by the value, and
574
+ * returns the number of bytes written to \p value
575
+ * \param value Returns the value of the attribute
576
+ *
577
+ * \retval CUPTI_SUCCESS
578
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
579
+ * \retval CUPTI_ERROR_INVALID_DEVICE
580
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
581
+ * is NULL, or if \p attrib is not a device attribute
582
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
583
+ * attribute values, indicates that the \p value buffer is too small
584
+ * to hold the attribute value.
585
+ */
586
+ CUptiResult CUPTIAPI cuptiDeviceGetAttribute(CUdevice device,
587
+ CUpti_DeviceAttribute attrib,
588
+ size_t *valueSize,
589
+ void *value);
590
+
591
+ /**
592
+ * \brief Get the number of domains for a device.
593
+ *
594
+ * Returns the number of domains in \p numDomains for a device.
595
+ * \note \b Thread-safety: this function is thread safe.
596
+ *
597
+ * \param device The CUDA device
598
+ * \param numDomains Returns the number of domains
599
+ *
600
+ * \retval CUPTI_SUCCESS
601
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
602
+ * \retval CUPTI_ERROR_INVALID_DEVICE
603
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numDomains is NULL
604
+ */
605
+ CUptiResult CUPTIAPI cuptiDeviceGetNumEventDomains(CUdevice device,
606
+ uint32_t *numDomains);
607
+
608
+ /**
609
+ * \brief Get the event domains for a device.
610
+ *
611
+ * Returns the event domains IDs in \p domainArray for a device. The
612
+ * size of the \p domainArray buffer is given by \p
613
+ * *arraySizeBytes. The size of the \p domainArray buffer must be at
614
+ * least \p numdomains * sizeof(CUpti_EventDomainID) or else all
615
+ * domains will not be returned. The value returned in \p
616
+ * *arraySizeBytes contains the number of bytes returned in \p
617
+ * domainArray.
618
+ * \note \b Thread-safety: this function is thread safe.
619
+ *
620
+ * \param device The CUDA device
621
+ * \param arraySizeBytes The size of \p domainArray in bytes, and
622
+ * returns the number of bytes written to \p domainArray
623
+ * \param domainArray Returns the IDs of the event domains for the device
624
+ *
625
+ * \retval CUPTI_SUCCESS
626
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
627
+ * \retval CUPTI_ERROR_INVALID_DEVICE
628
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
629
+ * \p domainArray are NULL
630
+ */
631
+ CUptiResult CUPTIAPI cuptiDeviceEnumEventDomains(CUdevice device,
632
+ size_t *arraySizeBytes,
633
+ CUpti_EventDomainID *domainArray);
634
+
635
+ /**
636
+ * \brief Read an event domain attribute.
637
+ *
638
+ * Returns an event domain attribute in \p *value. The size of the \p
639
+ * value buffer is given by \p *valueSize. The value returned in \p
640
+ * *valueSize contains the number of bytes returned in \p value.
641
+ *
642
+ * If the attribute value is a c-string that is longer than \p
643
+ * *valueSize, then only the first \p *valueSize characters will be
644
+ * returned and there will be no terminating null byte.
645
+ * \note \b Thread-safety: this function is thread safe.
646
+ *
647
+ * \param device The CUDA device
648
+ * \param eventDomain ID of the event domain
649
+ * \param attrib The event domain attribute to read
650
+ * \param valueSize The size of the \p value buffer in bytes, and
651
+ * returns the number of bytes written to \p value
652
+ * \param value Returns the attribute's value
653
+ *
654
+ * \retval CUPTI_SUCCESS
655
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
656
+ * \retval CUPTI_ERROR_INVALID_DEVICE
657
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
658
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
659
+ * is NULL, or if \p attrib is not an event domain attribute
660
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
661
+ * attribute values, indicates that the \p value buffer is too small
662
+ * to hold the attribute value.
663
+ */
664
+ CUptiResult CUPTIAPI cuptiDeviceGetEventDomainAttribute(CUdevice device,
665
+ CUpti_EventDomainID eventDomain,
666
+ CUpti_EventDomainAttribute attrib,
667
+ size_t *valueSize,
668
+ void *value);
669
+
670
+ /**
671
+ * \brief Get the number of event domains available on any device.
672
+ *
673
+ * Returns the total number of event domains available on any
674
+ * CUDA-capable device.
675
+ * \note \b Thread-safety: this function is thread safe.
676
+ *
677
+ * \param numDomains Returns the number of domains
678
+ *
679
+ * \retval CUPTI_SUCCESS
680
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numDomains is NULL
681
+ */
682
+ CUptiResult CUPTIAPI cuptiGetNumEventDomains(uint32_t *numDomains);
683
+
684
+ /**
685
+ * \brief Get the event domains available on any device.
686
+ *
687
+ * Returns all the event domains available on any CUDA-capable device.
688
+ * Event domain IDs are returned in \p domainArray. The size of the \p
689
+ * domainArray buffer is given by \p *arraySizeBytes. The size of the
690
+ * \p domainArray buffer must be at least \p numDomains *
691
+ * sizeof(CUpti_EventDomainID) or all domains will not be
692
+ * returned. The value returned in \p *arraySizeBytes contains the
693
+ * number of bytes returned in \p domainArray.
694
+ * \note \b Thread-safety: this function is thread safe.
695
+ *
696
+ * \param arraySizeBytes The size of \p domainArray in bytes, and
697
+ * returns the number of bytes written to \p domainArray
698
+ * \param domainArray Returns all the event domains
699
+ *
700
+ * \retval CUPTI_SUCCESS
701
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
702
+ * \p domainArray are NULL
703
+ */
704
+ CUptiResult CUPTIAPI cuptiEnumEventDomains(size_t *arraySizeBytes,
705
+ CUpti_EventDomainID *domainArray);
706
+
707
+ /**
708
+ * \brief Read an event domain attribute.
709
+ *
710
+ * Returns an event domain attribute in \p *value. The size of the \p
711
+ * value buffer is given by \p *valueSize. The value returned in \p
712
+ * *valueSize contains the number of bytes returned in \p value.
713
+ *
714
+ * If the attribute value is a c-string that is longer than \p
715
+ * *valueSize, then only the first \p *valueSize characters will be
716
+ * returned and there will be no terminating null byte.
717
+ * \note \b Thread-safety: this function is thread safe.
718
+ *
719
+ * \param eventDomain ID of the event domain
720
+ * \param attrib The event domain attribute to read
721
+ * \param valueSize The size of the \p value buffer in bytes, and
722
+ * returns the number of bytes written to \p value
723
+ * \param value Returns the attribute's value
724
+ *
725
+ * \retval CUPTI_SUCCESS
726
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
727
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
728
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
729
+ * is NULL, or if \p attrib is not an event domain attribute
730
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
731
+ * attribute values, indicates that the \p value buffer is too small
732
+ * to hold the attribute value.
733
+ */
734
+ CUptiResult CUPTIAPI cuptiEventDomainGetAttribute(CUpti_EventDomainID eventDomain,
735
+ CUpti_EventDomainAttribute attrib,
736
+ size_t *valueSize,
737
+ void *value);
738
+
739
+ /**
740
+ * \brief Get number of events in a domain.
741
+ *
742
+ * Returns the number of events in \p numEvents for a domain.
743
+ * \note \b Thread-safety: this function is thread safe.
744
+ *
745
+ * \param eventDomain ID of the event domain
746
+ * \param numEvents Returns the number of events in the domain
747
+ *
748
+ * \retval CUPTI_SUCCESS
749
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
750
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
751
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numEvents is NULL
752
+ */
753
+ CUptiResult CUPTIAPI cuptiEventDomainGetNumEvents(CUpti_EventDomainID eventDomain,
754
+ uint32_t *numEvents);
755
+
756
+ /**
757
+ * \brief Get the events in a domain.
758
+ *
759
+ * Returns the event IDs in \p eventArray for a domain. The size of
760
+ * the \p eventArray buffer is given by \p *arraySizeBytes. The size
761
+ * of the \p eventArray buffer must be at least \p numdomainevents *
762
+ * sizeof(CUpti_EventID) or else all events will not be returned. The
763
+ * value returned in \p *arraySizeBytes contains the number of bytes
764
+ * returned in \p eventArray.
765
+ * \note \b Thread-safety: this function is thread safe.
766
+ *
767
+ * \param eventDomain ID of the event domain
768
+ * \param arraySizeBytes The size of \p eventArray in bytes, and
769
+ * returns the number of bytes written to \p eventArray
770
+ * \param eventArray Returns the IDs of the events in the domain
771
+ *
772
+ * \retval CUPTI_SUCCESS
773
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
774
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
775
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or \p
776
+ * eventArray are NULL
777
+ */
778
+ CUptiResult CUPTIAPI cuptiEventDomainEnumEvents(CUpti_EventDomainID eventDomain,
779
+ size_t *arraySizeBytes,
780
+ CUpti_EventID *eventArray);
781
+
782
+ /**
783
+ * \brief Get an event attribute.
784
+ *
785
+ * Returns an event attribute in \p *value. The size of the \p
786
+ * value buffer is given by \p *valueSize. The value returned in \p
787
+ * *valueSize contains the number of bytes returned in \p value.
788
+ *
789
+ * If the attribute value is a c-string that is longer than \p
790
+ * *valueSize, then only the first \p *valueSize characters will be
791
+ * returned and there will be no terminating null byte.
792
+ * \note \b Thread-safety: this function is thread safe.
793
+ *
794
+ * \param event ID of the event
795
+ * \param attrib The event attribute to read
796
+ * \param valueSize The size of the \p value buffer in bytes, and
797
+ * returns the number of bytes written to \p value
798
+ * \param value Returns the attribute's value
799
+ *
800
+ * \retval CUPTI_SUCCESS
801
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
802
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
803
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
804
+ * is NULL, or if \p attrib is not an event attribute
805
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
806
+ * attribute values, indicates that the \p value buffer is too small
807
+ * to hold the attribute value.
808
+ */
809
+ CUptiResult CUPTIAPI cuptiEventGetAttribute(CUpti_EventID event,
810
+ CUpti_EventAttribute attrib,
811
+ size_t *valueSize,
812
+ void *value);
813
+
814
+ /**
815
+ * \brief Find an event by name.
816
+ *
817
+ * Find an event by name and return the event ID in \p *event.
818
+ * \note \b Thread-safety: this function is thread safe.
819
+ *
820
+ * \param device The CUDA device
821
+ * \param eventName The name of the event to find
822
+ * \param event Returns the ID of the found event or undefined if
823
+ * unable to find the event
824
+ *
825
+ * \retval CUPTI_SUCCESS
826
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
827
+ * \retval CUPTI_ERROR_INVALID_DEVICE
828
+ * \retval CUPTI_ERROR_INVALID_EVENT_NAME if unable to find an event
829
+ * with name \p eventName. In this case \p *event is undefined
830
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventName or \p event are NULL
831
+ */
832
+ CUptiResult CUPTIAPI cuptiEventGetIdFromName(CUdevice device,
833
+ const char *eventName,
834
+ CUpti_EventID *event);
835
+
836
+ /**
837
+ * \brief Create a new event group for a context.
838
+ *
839
+ * Creates a new event group for \p context and returns the new group
840
+ * in \p *eventGroup.
841
+ * \note \p flags are reserved for future use and should be set to zero.
842
+ * \note \b Thread-safety: this function is thread safe.
843
+ *
844
+ * \param context The context for the event group
845
+ * \param eventGroup Returns the new event group
846
+ * \param flags Reserved - must be zero
847
+ *
848
+ * \retval CUPTI_SUCCESS
849
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
850
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
851
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY
852
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
853
+ */
854
+ CUptiResult CUPTIAPI cuptiEventGroupCreate(CUcontext context,
855
+ CUpti_EventGroup *eventGroup,
856
+ uint32_t flags);
857
+
858
+ /**
859
+ * \brief Destroy an event group.
860
+ *
861
+ * Destroy an \p eventGroup and free its resources. An event group
862
+ * cannot be destroyed if it is enabled.
863
+ * \note \b Thread-safety: this function is thread safe.
864
+ *
865
+ * \param eventGroup The event group to destroy
866
+ *
867
+ * \retval CUPTI_SUCCESS
868
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
869
+ * \retval CUPTI_ERROR_INVALID_OPERATION if the event group is enabled
870
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if eventGroup is NULL
871
+ */
872
+ CUptiResult CUPTIAPI cuptiEventGroupDestroy(CUpti_EventGroup eventGroup);
873
+
874
+ /**
875
+ * \brief Read an event group attribute.
876
+ *
877
+ * Read an event group attribute and return it in \p *value.
878
+ * \note \b Thread-safety: this function is thread safe but client
879
+ * must guard against simultaneous destruction or modification of \p
880
+ * eventGroup (for example, client must guard against simultaneous
881
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
882
+ * etc.), and must guard against simultaneous destruction of the
883
+ * context in which \p eventGroup was created (for example, client
884
+ * must guard against simultaneous calls to cudaDeviceReset,
885
+ * cuCtxDestroy, etc.).
886
+ *
887
+ * \param eventGroup The event group
888
+ * \param attrib The attribute to read
889
+ * \param valueSize Size of buffer pointed by the value, and
890
+ * returns the number of bytes written to \p value
891
+ * \param value Returns the value of the attribute
892
+ *
893
+ * \retval CUPTI_SUCCESS
894
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
895
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
896
+ * is NULL, or if \p attrib is not an eventgroup attribute
897
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
898
+ * attribute values, indicates that the \p value buffer is too small
899
+ * to hold the attribute value.
900
+ */
901
+ CUptiResult CUPTIAPI cuptiEventGroupGetAttribute(CUpti_EventGroup eventGroup,
902
+ CUpti_EventGroupAttribute attrib,
903
+ size_t *valueSize,
904
+ void *value);
905
+
906
+ /**
907
+ * \brief Write an event group attribute.
908
+ *
909
+ * Write an event group attribute.
910
+ * \note \b Thread-safety: this function is thread safe.
911
+ *
912
+ * \param eventGroup The event group
913
+ * \param attrib The attribute to write
914
+ * \param valueSize The size, in bytes, of the value
915
+ * \param value The attribute value to write
916
+ *
917
+ * \retval CUPTI_SUCCESS
918
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
919
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
920
+ * is NULL, or if \p attrib is not an event group attribute, or if
921
+ * \p attrib is not a writable attribute
922
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT Indicates that
923
+ * the \p value buffer is too small to hold the attribute value.
924
+ */
925
+ CUptiResult CUPTIAPI cuptiEventGroupSetAttribute(CUpti_EventGroup eventGroup,
926
+ CUpti_EventGroupAttribute attrib,
927
+ size_t valueSize,
928
+ void *value);
929
+
930
+ /**
931
+ * \brief Add an event to an event group.
932
+ *
933
+ * Add an event to an event group. The event add can fail for a number of reasons:
934
+ * \li The event group is enabled
935
+ * \li The event does not belong to the same event domain as the
936
+ * events that are already in the event group
937
+ * \li Device limitations on the events that can belong to the same group
938
+ * \li The event group is full
939
+ *
940
+ * \note \b Thread-safety: this function is thread safe.
941
+ *
942
+ * \param eventGroup The event group
943
+ * \param event The event to add to the group
944
+ *
945
+ * \retval CUPTI_SUCCESS
946
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
947
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
948
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY
949
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
950
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p event belongs to a
951
+ * different event domain than the events already in \p eventGroup, or
952
+ * if a device limitation prevents \p event from being collected at
953
+ * the same time as the events already in \p eventGroup
954
+ * \retval CUPTI_ERROR_MAX_LIMIT_REACHED if \p eventGroup is full
955
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
956
+ */
957
+ CUptiResult CUPTIAPI cuptiEventGroupAddEvent(CUpti_EventGroup eventGroup,
958
+ CUpti_EventID event);
959
+
960
+ /**
961
+ * \brief Remove an event from an event group.
962
+ *
963
+ * Remove \p event from the an event group. The event cannot be
964
+ * removed if the event group is enabled.
965
+ * \note \b Thread-safety: this function is thread safe.
966
+ *
967
+ * \param eventGroup The event group
968
+ * \param event The event to remove from the group
969
+ *
970
+ * \retval CUPTI_SUCCESS
971
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
972
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
973
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
974
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
975
+ */
976
+ CUptiResult CUPTIAPI cuptiEventGroupRemoveEvent(CUpti_EventGroup eventGroup,
977
+ CUpti_EventID event);
978
+
979
+ /**
980
+ * \brief Remove all events from an event group.
981
+ *
982
+ * Remove all events from an event group. Events cannot be removed if
983
+ * the event group is enabled.
984
+ * \note \b Thread-safety: this function is thread safe.
985
+ *
986
+ * \param eventGroup The event group
987
+ *
988
+ * \retval CUPTI_SUCCESS
989
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
990
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
991
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
992
+ */
993
+ CUptiResult CUPTIAPI cuptiEventGroupRemoveAllEvents(CUpti_EventGroup eventGroup);
994
+
995
+ /**
996
+ * \brief Zero all the event counts in an event group.
997
+ *
998
+ * Zero all the event counts in an event group.
999
+ * \note \b Thread-safety: this function is thread safe but client
1000
+ * must guard against simultaneous destruction or modification of \p
1001
+ * eventGroup (for example, client must guard against simultaneous
1002
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
1003
+ * etc.), and must guard against simultaneous destruction of the
1004
+ * context in which \p eventGroup was created (for example, client
1005
+ * must guard against simultaneous calls to cudaDeviceReset,
1006
+ * cuCtxDestroy, etc.).
1007
+ *
1008
+ * \param eventGroup The event group
1009
+ *
1010
+ * \retval CUPTI_SUCCESS
1011
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1012
+ * \retval CUPTI_ERROR_HARDWARE
1013
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
1014
+ */
1015
+ CUptiResult CUPTIAPI cuptiEventGroupResetAllEvents(CUpti_EventGroup eventGroup);
1016
+
1017
+ /**
1018
+ * \brief Enable an event group.
1019
+ *
1020
+ * Enable an event group. Enabling an event group zeros the value of
1021
+ * all the events in the group and then starts collection of those
1022
+ * events.
1023
+ * \note \b Thread-safety: this function is thread safe.
1024
+ *
1025
+ * \param eventGroup The event group
1026
+ *
1027
+ * \retval CUPTI_SUCCESS
1028
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1029
+ * \retval CUPTI_ERROR_HARDWARE
1030
+ * \retval CUPTI_ERROR_NOT_READY if \p eventGroup does not contain any events
1031
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p eventGroup cannot be
1032
+ * enabled due to other already enabled event groups
1033
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
1034
+ * \retval CUPTI_ERROR_HARDWARE_BUSY if another client is profiling
1035
+ * and hardware is busy
1036
+ */
1037
+ CUptiResult CUPTIAPI cuptiEventGroupEnable(CUpti_EventGroup eventGroup);
1038
+
1039
+ /**
1040
+ * \brief Disable an event group.
1041
+ *
1042
+ * Disable an event group. Disabling an event group stops collection
1043
+ * of events contained in the group.
1044
+ * \note \b Thread-safety: this function is thread safe.
1045
+ *
1046
+ * \param eventGroup The event group
1047
+ *
1048
+ * \retval CUPTI_SUCCESS
1049
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1050
+ * \retval CUPTI_ERROR_HARDWARE
1051
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
1052
+ */
1053
+ CUptiResult CUPTIAPI cuptiEventGroupDisable(CUpti_EventGroup eventGroup);
1054
+
1055
+ /**
1056
+ * \brief Read the value for an event in an event group.
1057
+ *
1058
+ * Read the value for an event in an event group. The event value is
1059
+ * returned in the \p eventValueBuffer buffer. \p
1060
+ * eventValueBufferSizeBytes indicates the size of the \p
1061
+ * eventValueBuffer buffer. The buffer must be at least sizeof(uint64)
1062
+ * if ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is not set
1063
+ * on the group containing the event. The buffer must be at least
1064
+ * (sizeof(uint64) * number of domain instances) if
1065
+ * ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is set on the
1066
+ * group.
1067
+ *
1068
+ * If any instance of an event counter overflows, the value returned
1069
+ * for that event instance will be ::CUPTI_EVENT_OVERFLOW.
1070
+ *
1071
+ * The only allowed value for \p flags is ::CUPTI_EVENT_READ_FLAG_NONE.
1072
+ *
1073
+ * Reading an event from a disabled event group is not allowed. After
1074
+ * being read, an event's value is reset to zero.
1075
+ * \note \b Thread-safety: this function is thread safe but client
1076
+ * must guard against simultaneous destruction or modification of \p
1077
+ * eventGroup (for example, client must guard against simultaneous
1078
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
1079
+ * etc.), and must guard against simultaneous destruction of the
1080
+ * context in which \p eventGroup was created (for example, client
1081
+ * must guard against simultaneous calls to cudaDeviceReset,
1082
+ * cuCtxDestroy, etc.). If \ref cuptiEventGroupResetAllEvents is
1083
+ * called simultaneously with this function, then returned event
1084
+ * values are undefined.
1085
+ *
1086
+ * \param eventGroup The event group
1087
+ * \param flags Flags controlling the reading mode
1088
+ * \param event The event to read
1089
+ * \param eventValueBufferSizeBytes The size of \p eventValueBuffer
1090
+ * in bytes, and returns the number of bytes written to \p
1091
+ * eventValueBuffer
1092
+ * \param eventValueBuffer Returns the event value(s)
1093
+ *
1094
+ * \retval CUPTI_SUCCESS
1095
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1096
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
1097
+ * \retval CUPTI_ERROR_HARDWARE
1098
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is disabled
1099
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup, \p
1100
+ * eventValueBufferSizeBytes or \p eventValueBuffer is NULL
1101
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if size of \p eventValueBuffer
1102
+ * is not sufficient
1103
+ */
1104
+ CUptiResult CUPTIAPI cuptiEventGroupReadEvent(CUpti_EventGroup eventGroup,
1105
+ CUpti_ReadEventFlags flags,
1106
+ CUpti_EventID event,
1107
+ size_t *eventValueBufferSizeBytes,
1108
+ uint64_t *eventValueBuffer);
1109
+
1110
+ /**
1111
+ * \brief Read the values for all the events in an event group.
1112
+ *
1113
+ * Read the values for all the events in an event group. The event
1114
+ * values are returned in the \p eventValueBuffer buffer. \p
1115
+ * eventValueBufferSizeBytes indicates the size of \p
1116
+ * eventValueBuffer. The buffer must be at least (sizeof(uint64) *
1117
+ * number of events in group) if
1118
+ * ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is not set on
1119
+ * the group containing the events. The buffer must be at least
1120
+ * (sizeof(uint64) * number of domain instances * number of events in
1121
+ * group) if ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is
1122
+ * set on the group.
1123
+ *
1124
+ * The data format returned in \p eventValueBuffer is:
1125
+ * - domain instance 0: event0 event1 ... eventN
1126
+ * - domain instance 1: event0 event1 ... eventN
1127
+ * - ...
1128
+ * - domain instance M: event0 event1 ... eventN
1129
+ *
1130
+ * The event order in \p eventValueBuffer is returned in \p
1131
+ * eventIdArray. The size of \p eventIdArray is specified in \p
1132
+ * eventIdArraySizeBytes. The size should be at least
1133
+ * (sizeof(CUpti_EventID) * number of events in group).
1134
+ *
1135
+ * If any instance of any event counter overflows, the value returned
1136
+ * for that event instance will be ::CUPTI_EVENT_OVERFLOW.
1137
+ *
1138
+ * The only allowed value for \p flags is ::CUPTI_EVENT_READ_FLAG_NONE.
1139
+ *
1140
+ * Reading events from a disabled event group is not allowed. After
1141
+ * being read, an event's value is reset to zero.
1142
+ * \note \b Thread-safety: this function is thread safe but client
1143
+ * must guard against simultaneous destruction or modification of \p
1144
+ * eventGroup (for example, client must guard against simultaneous
1145
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
1146
+ * etc.), and must guard against simultaneous destruction of the
1147
+ * context in which \p eventGroup was created (for example, client
1148
+ * must guard against simultaneous calls to cudaDeviceReset,
1149
+ * cuCtxDestroy, etc.). If \ref cuptiEventGroupResetAllEvents is
1150
+ * called simultaneously with this function, then returned event
1151
+ * values are undefined.
1152
+ *
1153
+ * \param eventGroup The event group
1154
+ * \param flags Flags controlling the reading mode
1155
+ * \param eventValueBufferSizeBytes The size of \p eventValueBuffer in
1156
+ * bytes, and returns the number of bytes written to \p
1157
+ * eventValueBuffer
1158
+ * \param eventValueBuffer Returns the event values
1159
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes,
1160
+ * and returns the number of bytes written to \p eventIdArray
1161
+ * \param eventIdArray Returns the IDs of the events in the same order
1162
+ * as the values return in eventValueBuffer.
1163
+ * \param numEventIdsRead Returns the number of event IDs returned
1164
+ * in \p eventIdArray
1165
+ *
1166
+ * \retval CUPTI_SUCCESS
1167
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1168
+ * \retval CUPTI_ERROR_HARDWARE
1169
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is disabled
1170
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup, \p
1171
+ * eventValueBufferSizeBytes, \p eventValueBuffer, \p
1172
+ * eventIdArraySizeBytes, \p eventIdArray or \p numEventIdsRead is
1173
+ * NULL
1174
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if size of \p eventValueBuffer
1175
+ * or \p eventIdArray is not sufficient
1176
+ */
1177
+ CUptiResult CUPTIAPI cuptiEventGroupReadAllEvents(CUpti_EventGroup eventGroup,
1178
+ CUpti_ReadEventFlags flags,
1179
+ size_t *eventValueBufferSizeBytes,
1180
+ uint64_t *eventValueBuffer,
1181
+ size_t *eventIdArraySizeBytes,
1182
+ CUpti_EventID *eventIdArray,
1183
+ size_t *numEventIdsRead);
1184
+
1185
+ /**
1186
+ * \brief For a set of events, get the grouping that indicates the
1187
+ * number of passes and the event groups necessary to collect the
1188
+ * events.
1189
+ *
1190
+ * The number of events that can be collected simultaneously varies by
1191
+ * device and by the type of the events. When events can be collected
1192
+ * simultaneously, they may need to be grouped into multiple event
1193
+ * groups because they are from different event domains. This function
1194
+ * takes a set of events and determines how many passes are required
1195
+ * to collect all those events, and which events can be collected
1196
+ * simultaneously in each pass.
1197
+ *
1198
+ * The CUpti_EventGroupSets returned in \p eventGroupPasses indicates
1199
+ * how many passes are required to collect the events with the \p
1200
+ * numSets field. Within each event group set, the \p sets array
1201
+ * indicates the event groups that should be collected on each pass.
1202
+ * \note \b Thread-safety: this function is thread safe, but client
1203
+ * must guard against another thread simultaneously destroying \p
1204
+ * context.
1205
+ *
1206
+ * \param context The context for event collection
1207
+ * \param eventIdArraySizeBytes Size of \p eventIdArray in bytes
1208
+ * \param eventIdArray Array of event IDs that need to be grouped
1209
+ * \param eventGroupPasses Returns a CUpti_EventGroupSets object that
1210
+ * indicates the number of passes required to collect the events and
1211
+ * the events to collect on each pass
1212
+ *
1213
+ * \retval CUPTI_SUCCESS
1214
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1215
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
1216
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
1217
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventIdArray or
1218
+ * \p eventGroupPasses is NULL
1219
+ */
1220
+ CUptiResult CUPTIAPI cuptiEventGroupSetsCreate(CUcontext context,
1221
+ size_t eventIdArraySizeBytes,
1222
+ CUpti_EventID *eventIdArray,
1223
+ CUpti_EventGroupSets **eventGroupPasses);
1224
+
1225
+ /**
1226
+ * \brief Destroy a event group sets object.
1227
+ *
1228
+ * Destroy a CUpti_EventGroupSets object.
1229
+ * \note \b Thread-safety: this function is thread safe.
1230
+ *
1231
+ * \param eventGroupSets The object to destroy
1232
+ *
1233
+ * \retval CUPTI_SUCCESS
1234
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1235
+ * \retval CUPTI_ERROR_INVALID_OPERATION if any of the event groups
1236
+ * contained in the sets is enabled
1237
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSets is NULL
1238
+ */
1239
+ CUptiResult CUPTIAPI cuptiEventGroupSetsDestroy(CUpti_EventGroupSets *eventGroupSets);
1240
+
1241
+
1242
+ /**
1243
+ * \brief Enable an event group set.
1244
+ *
1245
+ * Enable a set of event groups. Enabling a set of event groups zeros the value of
1246
+ * all the events in all the groups and then starts collection of those events.
1247
+ * \note \b Thread-safety: this function is thread safe.
1248
+ *
1249
+ * \param eventGroupSet The pointer to the event group set
1250
+ *
1251
+ * \retval CUPTI_SUCCESS
1252
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1253
+ * \retval CUPTI_ERROR_HARDWARE
1254
+ * \retval CUPTI_ERROR_NOT_READY if \p eventGroup does not contain any events
1255
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p eventGroup cannot be
1256
+ * enabled due to other already enabled event groups
1257
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSet is NULL
1258
+ * \retval CUPTI_ERROR_HARDWARE_BUSY if other client is profiling and hardware is
1259
+ * busy
1260
+ */
1261
+ CUptiResult CUPTIAPI cuptiEventGroupSetEnable(CUpti_EventGroupSet *eventGroupSet);
1262
+
1263
+ /**
1264
+ * \brief Disable an event group set.
1265
+ *
1266
+ * Disable a set of event groups. Disabling a set of event groups
1267
+ * stops collection of events contained in the groups.
1268
+ * \note \b Thread-safety: this function is thread safe.
1269
+ * \note \b If this call fails, some of the event groups in the set may be disabled
1270
+ * and other event groups may remain enabled.
1271
+ *
1272
+ * \param eventGroupSet The pointer to the event group set
1273
+ * \retval CUPTI_SUCCESS
1274
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1275
+ * \retval CUPTI_ERROR_HARDWARE
1276
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSet is NULL
1277
+ */
1278
+ CUptiResult CUPTIAPI cuptiEventGroupSetDisable(CUpti_EventGroupSet *eventGroupSet);
1279
+
1280
+ /**
1281
+ * \brief Enable kernel replay mode.
1282
+ *
1283
+ * Set profiling mode for the context to replay mode. In this mode,
1284
+ * any number of events can be collected in one run of the kernel. The
1285
+ * event collection mode will automatically switch to
1286
+ * CUPTI_EVENT_COLLECTION_MODE_KERNEL. In this mode, \ref
1287
+ * cuptiSetEventCollectionMode will return
1288
+ * CUPTI_ERROR_INVALID_OPERATION.
1289
+ * \note \b Kernels might take longer to run if many events are enabled.
1290
+ * \note \b Thread-safety: this function is thread safe.
1291
+ *
1292
+ * \param context The context
1293
+ * \retval CUPTI_SUCCESS
1294
+ */
1295
+ CUptiResult CUPTIAPI cuptiEnableKernelReplayMode(CUcontext context);
1296
+
1297
+ /**
1298
+ * \brief Disable kernel replay mode.
1299
+ *
1300
+ * Set profiling mode for the context to non-replay (default)
1301
+ * mode. Event collection mode will be set to
1302
+ * CUPTI_EVENT_COLLECTION_MODE_KERNEL. All previously enabled
1303
+ * event groups and event group sets will be disabled.
1304
+ * \note \b Thread-safety: this function is thread safe.
1305
+ *
1306
+ * \param context The context
1307
+ * \retval CUPTI_SUCCESS
1308
+ */
1309
+ CUptiResult CUPTIAPI cuptiDisableKernelReplayMode(CUcontext context);
1310
+
1311
+ /**
1312
+ * \brief Function type for getting updates on kernel replay.
1313
+ *
1314
+ * \param kernelName The mangled kernel name
1315
+ * \param numReplaysDone Number of replays done so far
1316
+ * \param customData Pointer of any custom data passed in when subscribing
1317
+ */
1318
+ typedef void (CUPTIAPI *CUpti_KernelReplayUpdateFunc)(
1319
+ const char *kernelName,
1320
+ int numReplaysDone,
1321
+ void *customData);
1322
+
1323
+ /**
1324
+ * \brief Subscribe to kernel replay updates.
1325
+ *
1326
+ * When subscribed, the function pointer passed in will be called each time a
1327
+ * kernel run is finished during kernel replay. Previously subscribed function
1328
+ * pointer will be replaced. Pass in NULL as the function pointer unsubscribes
1329
+ * the update.
1330
+ *
1331
+ * \param updateFunc The update function pointer
1332
+ * \param customData Pointer to any custom data
1333
+ * \retval CUPTI_SUCCESS
1334
+ */
1335
+ CUptiResult CUPTIAPI cuptiKernelReplaySubscribeUpdate(CUpti_KernelReplayUpdateFunc updateFunc, void *customData);
1336
+
1337
+ /** @} */ /* END CUPTI_EVENT_API */
1338
+
1339
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
1340
+ #pragma GCC visibility pop
1341
+ #endif
1342
+
1343
+ #if defined(__cplusplus)
1344
+ }
1345
+ #endif
1346
+
1347
+ #endif /*_CUPTI_EVENTS_H_*/
1348
+
1349
+
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_metrics.h ADDED
@@ -0,0 +1,824 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2011-2024 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(_CUPTI_METRIC_H_)
51
+ #define _CUPTI_METRIC_H_
52
+
53
+ #include <cuda.h>
54
+ #include <string.h>
55
+ #include <cuda_stdint.h>
56
+ #include <cupti_result.h>
57
+
58
+ #ifndef CUPTIAPI
59
+ #ifdef _WIN32
60
+ #define CUPTIAPI __stdcall
61
+ #else
62
+ #define CUPTIAPI
63
+ #endif
64
+ #endif
65
+
66
+ #if defined(__cplusplus)
67
+ extern "C" {
68
+ #endif
69
+
70
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
71
+ #pragma GCC visibility push(default)
72
+ #endif
73
+
74
+ /**
75
+ * \defgroup CUPTI_METRIC_API CUPTI Metric API
76
+ * Functions, types, and enums that implement the CUPTI Metric API.
77
+ *
78
+ * \note The CUPTI metric API from the header cupti_metrics.h is not supported on devices
79
+ * with compute capability 7.5 and higher (i.e. Turing and later GPU architectures).
80
+ * This API is deprecated in CUDA 12.8 release and will be removed in a future CUDA release.
81
+ * This is replaced by the host profiling API in the header cupti_profiler_host.h and
82
+ * target profiling API in the header cupti_range_profiler.h which are supported on
83
+ * devices with compute capability 7.0 and higher (i.e. Volta and later GPU architectures).
84
+ *
85
+ * @{
86
+ */
87
+
88
+ /**
89
+ * \brief ID for a metric.
90
+ *
91
+ * A metric provides a measure of some aspect of the device.
92
+ */
93
+ typedef uint32_t CUpti_MetricID;
94
+
95
+ /**
96
+ * \brief A metric category.
97
+ *
98
+ * Each metric is assigned to a category that represents the general
99
+ * type of the metric. A metric's category is accessed using \ref
100
+ * cuptiMetricGetAttribute and the CUPTI_METRIC_ATTR_CATEGORY
101
+ * attribute.
102
+ */
103
+ typedef enum {
104
+ /**
105
+ * A memory related metric.
106
+ */
107
+ CUPTI_METRIC_CATEGORY_MEMORY = 0,
108
+ /**
109
+ * An instruction related metric.
110
+ */
111
+ CUPTI_METRIC_CATEGORY_INSTRUCTION = 1,
112
+ /**
113
+ * A multiprocessor related metric.
114
+ */
115
+ CUPTI_METRIC_CATEGORY_MULTIPROCESSOR = 2,
116
+ /**
117
+ * A cache related metric.
118
+ */
119
+ CUPTI_METRIC_CATEGORY_CACHE = 3,
120
+ /**
121
+ * A texture related metric.
122
+ */
123
+ CUPTI_METRIC_CATEGORY_TEXTURE = 4,
124
+ /**
125
+ *A Nvlink related metric.
126
+ */
127
+ CUPTI_METRIC_CATEGORY_NVLINK = 5,
128
+ /**
129
+ *A PCIe related metric.
130
+ */
131
+ CUPTI_METRIC_CATEGORY_PCIE = 6,
132
+ CUPTI_METRIC_CATEGORY_FORCE_INT = 0x7fffffff,
133
+ } CUpti_MetricCategory;
134
+
135
+ /**
136
+ * \brief A metric evaluation mode.
137
+ *
138
+ * A metric can be evaluated per hardware instance to know the load balancing
139
+ * across instances of a domain or the metric can be evaluated in aggregate mode
140
+ * when the events involved in metric evaluation are from different event
141
+ * domains. It might be possible to evaluate some metrics in both
142
+ * modes for convenience. A metric's evaluation mode is accessed using \ref
143
+ * CUpti_MetricEvaluationMode and the CUPTI_METRIC_ATTR_EVALUATION_MODE
144
+ * attribute.
145
+ */
146
+ typedef enum {
147
+ /**
148
+ * If this bit is set, the metric can be profiled for each instance of the
149
+ * domain. The event values passed to \ref cuptiMetricGetValue can contain
150
+ * values for one instance of the domain. And \ref cuptiMetricGetValue can
151
+ * be called for each instance.
152
+ */
153
+ CUPTI_METRIC_EVALUATION_MODE_PER_INSTANCE = 1,
154
+ /**
155
+ * If this bit is set, the metric can be profiled over all instances. The
156
+ * event values passed to \ref cuptiMetricGetValue can be aggregated values
157
+ * of events for all instances of the domain.
158
+ */
159
+ CUPTI_METRIC_EVALUATION_MODE_AGGREGATE = 1 << 1,
160
+ CUPTI_METRIC_EVALUATION_MODE_FORCE_INT = 0x7fffffff,
161
+ } CUpti_MetricEvaluationMode;
162
+
163
+ /**
164
+ * \brief Kinds of metric values.
165
+ *
166
+ * Metric values can be one of several different kinds. Corresponding
167
+ * to each kind is a member of the CUpti_MetricValue union. The metric
168
+ * value returned by \ref cuptiMetricGetValue should be accessed using
169
+ * the appropriate member of that union based on its value kind.
170
+ */
171
+ typedef enum {
172
+ /**
173
+ * The metric value is a 64-bit double.
174
+ */
175
+ CUPTI_METRIC_VALUE_KIND_DOUBLE = 0,
176
+ /**
177
+ * The metric value is a 64-bit unsigned integer.
178
+ */
179
+ CUPTI_METRIC_VALUE_KIND_UINT64 = 1,
180
+ /**
181
+ * The metric value is a percentage represented by a 64-bit
182
+ * double. For example, 57.5% is represented by the value 57.5.
183
+ */
184
+ CUPTI_METRIC_VALUE_KIND_PERCENT = 2,
185
+ /**
186
+ * The metric value is a throughput represented by a 64-bit
187
+ * integer. The unit for throughput values is bytes/second.
188
+ */
189
+ CUPTI_METRIC_VALUE_KIND_THROUGHPUT = 3,
190
+ /**
191
+ * The metric value is a 64-bit signed integer.
192
+ */
193
+ CUPTI_METRIC_VALUE_KIND_INT64 = 4,
194
+ /**
195
+ * The metric value is a utilization level, as represented by
196
+ * CUpti_MetricValueUtilizationLevel.
197
+ */
198
+ CUPTI_METRIC_VALUE_KIND_UTILIZATION_LEVEL = 5,
199
+
200
+ CUPTI_METRIC_VALUE_KIND_FORCE_INT = 0x7fffffff
201
+ } CUpti_MetricValueKind;
202
+
203
+ /**
204
+ * \brief Enumeration of utilization levels for metrics values of kind
205
+ * CUPTI_METRIC_VALUE_KIND_UTILIZATION_LEVEL. Utilization values can
206
+ * vary from IDLE (0) to MAX (10) but the enumeration only provides
207
+ * specific names for a few values.
208
+ */
209
+ typedef enum {
210
+ CUPTI_METRIC_VALUE_UTILIZATION_IDLE = 0,
211
+ CUPTI_METRIC_VALUE_UTILIZATION_LOW = 2,
212
+ CUPTI_METRIC_VALUE_UTILIZATION_MID = 5,
213
+ CUPTI_METRIC_VALUE_UTILIZATION_HIGH = 8,
214
+ CUPTI_METRIC_VALUE_UTILIZATION_MAX = 10,
215
+ CUPTI_METRIC_VALUE_UTILIZATION_FORCE_INT = 0x7fffffff
216
+ } CUpti_MetricValueUtilizationLevel;
217
+
218
+ /**
219
+ * \brief Metric attributes.
220
+ *
221
+ * Metric attributes describe properties of a metric. These attributes
222
+ * can be read using \ref cuptiMetricGetAttribute.
223
+ */
224
+ typedef enum {
225
+ /**
226
+ * Metric name. Value is a null terminated const c-string.
227
+ */
228
+ CUPTI_METRIC_ATTR_NAME = 0,
229
+ /**
230
+ * Short description of metric. Value is a null terminated const c-string.
231
+ */
232
+ CUPTI_METRIC_ATTR_SHORT_DESCRIPTION = 1,
233
+ /**
234
+ * Long description of metric. Value is a null terminated const c-string.
235
+ */
236
+ CUPTI_METRIC_ATTR_LONG_DESCRIPTION = 2,
237
+ /**
238
+ * Category of the metric. Value is of type CUpti_MetricCategory.
239
+ */
240
+ CUPTI_METRIC_ATTR_CATEGORY = 3,
241
+ /**
242
+ * Value type of the metric. Value is of type CUpti_MetricValueKind.
243
+ */
244
+ CUPTI_METRIC_ATTR_VALUE_KIND = 4,
245
+ /**
246
+ * Metric evaluation mode. Value is of type CUpti_MetricEvaluationMode.
247
+ */
248
+ CUPTI_METRIC_ATTR_EVALUATION_MODE = 5,
249
+ CUPTI_METRIC_ATTR_FORCE_INT = 0x7fffffff,
250
+ } CUpti_MetricAttribute;
251
+
252
+ /**
253
+ * \brief A metric value.
254
+ *
255
+ * Metric values can be one of several different kinds. Corresponding
256
+ * to each kind is a member of the CUpti_MetricValue union. The metric
257
+ * value returned by \ref cuptiMetricGetValue should be accessed using
258
+ * the appropriate member of that union based on its value kind.
259
+ */
260
+ typedef union {
261
+ /*
262
+ * Value for CUPTI_METRIC_VALUE_KIND_DOUBLE.
263
+ */
264
+ double metricValueDouble;
265
+ /*
266
+ * Value for CUPTI_METRIC_VALUE_KIND_UINT64.
267
+ */
268
+ uint64_t metricValueUint64;
269
+ /*
270
+ * Value for CUPTI_METRIC_VALUE_KIND_INT64.
271
+ */
272
+ int64_t metricValueInt64;
273
+ /*
274
+ * Value for CUPTI_METRIC_VALUE_KIND_PERCENT. For example, 57.5% is
275
+ * represented by the value 57.5.
276
+ */
277
+ double metricValuePercent;
278
+ /*
279
+ * Value for CUPTI_METRIC_VALUE_KIND_THROUGHPUT. The unit for
280
+ * throughput values is bytes/second.
281
+ */
282
+ uint64_t metricValueThroughput;
283
+ /*
284
+ * Value for CUPTI_METRIC_VALUE_KIND_UTILIZATION_LEVEL.
285
+ */
286
+ CUpti_MetricValueUtilizationLevel metricValueUtilizationLevel;
287
+ } CUpti_MetricValue;
288
+
289
+ /**
290
+ * \brief Device class.
291
+ *
292
+ * Enumeration of device classes for metric property
293
+ * CUPTI_METRIC_PROPERTY_DEVICE_CLASS.
294
+ */
295
+ typedef enum {
296
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_TESLA = 0,
297
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_QUADRO = 1,
298
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_GEFORCE = 2,
299
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_TEGRA = 3,
300
+ } CUpti_MetricPropertyDeviceClass;
301
+
302
+ /**
303
+ * \brief Metric device properties.
304
+ *
305
+ * Metric device properties describe device properties which are needed for a metric.
306
+ * Some of these properties can be collected using cuDeviceGetAttribute.
307
+ */
308
+ typedef enum {
309
+ /*
310
+ * Number of multiprocessors on a device. This can be collected
311
+ * using value of \param CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT of
312
+ * cuDeviceGetAttribute.
313
+ */
314
+ CUPTI_METRIC_PROPERTY_MULTIPROCESSOR_COUNT,
315
+ /*
316
+ * Maximum number of warps on a multiprocessor. This can be
317
+ * collected using ratio of value of \param
318
+ * CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR and \param
319
+ * CU_DEVICE_ATTRIBUTE_WARP_SIZE of cuDeviceGetAttribute.
320
+ */
321
+ CUPTI_METRIC_PROPERTY_WARPS_PER_MULTIPROCESSOR,
322
+ /*
323
+ * GPU Time for kernel in ns. This should be profiled using CUPTI
324
+ * Activity API.
325
+ */
326
+ CUPTI_METRIC_PROPERTY_KERNEL_GPU_TIME,
327
+ /*
328
+ * Clock rate for device in KHz. This should be collected using
329
+ * value of \param CU_DEVICE_ATTRIBUTE_CLOCK_RATE of
330
+ * cuDeviceGetAttribute.
331
+ */
332
+ CUPTI_METRIC_PROPERTY_CLOCK_RATE,
333
+ /*
334
+ * Number of Frame buffer units for device. This should be collected
335
+ * using value of \param CUPTI_DEVICE_ATTRIBUTE_MAX_FRAME_BUFFERS of
336
+ * cuptiDeviceGetAttribute.
337
+ */
338
+ CUPTI_METRIC_PROPERTY_FRAME_BUFFER_COUNT,
339
+ /*
340
+ * Global memory bandwidth in KBytes/sec. This should be collected
341
+ * using value of \param CUPTI_DEVICE_ATTR_GLOBAL_MEMORY_BANDWIDTH
342
+ * of cuptiDeviceGetAttribute.
343
+ */
344
+ CUPTI_METRIC_PROPERTY_GLOBAL_MEMORY_BANDWIDTH,
345
+ /*
346
+ * PCIE link rate in Mega bits/sec. This should be collected using
347
+ * value of \param CUPTI_DEVICE_ATTR_PCIE_LINK_RATE of
348
+ * cuptiDeviceGetAttribute.
349
+ */
350
+ CUPTI_METRIC_PROPERTY_PCIE_LINK_RATE,
351
+ /*
352
+ * PCIE link width for device. This should be collected using
353
+ * value of \param CUPTI_DEVICE_ATTR_PCIE_LINK_WIDTH of
354
+ * cuptiDeviceGetAttribute.
355
+ */
356
+ CUPTI_METRIC_PROPERTY_PCIE_LINK_WIDTH,
357
+ /*
358
+ * PCIE generation for device. This should be collected using
359
+ * value of \param CUPTI_DEVICE_ATTR_PCIE_GEN of
360
+ * cuptiDeviceGetAttribute.
361
+ */
362
+ CUPTI_METRIC_PROPERTY_PCIE_GEN,
363
+ /*
364
+ * The device class. This should be collected using
365
+ * value of \param CUPTI_DEVICE_ATTR_DEVICE_CLASS of
366
+ * cuptiDeviceGetAttribute.
367
+ */
368
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS,
369
+ /*
370
+ * Peak single precision floating point operations that
371
+ * can be performed in one cycle by the device.
372
+ * This should be collected using value of
373
+ * \param CUPTI_DEVICE_ATTR_FLOP_SP_PER_CYCLE of
374
+ * cuptiDeviceGetAttribute.
375
+ */
376
+ CUPTI_METRIC_PROPERTY_FLOP_SP_PER_CYCLE,
377
+ /*
378
+ * Peak double precision floating point operations that
379
+ * can be performed in one cycle by the device.
380
+ * This should be collected using value of
381
+ * \param CUPTI_DEVICE_ATTR_FLOP_DP_PER_CYCLE of
382
+ * cuptiDeviceGetAttribute.
383
+ */
384
+ CUPTI_METRIC_PROPERTY_FLOP_DP_PER_CYCLE,
385
+ /*
386
+ * Number of L2 units on a device. This can be collected
387
+ * using value of \param CUPTI_DEVICE_ATTR_MAX_L2_UNITS of
388
+ * cuDeviceGetAttribute.
389
+ */
390
+ CUPTI_METRIC_PROPERTY_L2_UNITS,
391
+ /*
392
+ * Whether ECC support is enabled on the device. This can be
393
+ * collected using value of \param CU_DEVICE_ATTRIBUTE_ECC_ENABLED of
394
+ * cuDeviceGetAttribute.
395
+ */
396
+ CUPTI_METRIC_PROPERTY_ECC_ENABLED,
397
+ /*
398
+ * Peak half precision floating point operations that
399
+ * can be performed in one cycle by the device.
400
+ * This should be collected using value of
401
+ * \param CUPTI_DEVICE_ATTR_FLOP_HP_PER_CYCLE of
402
+ * cuptiDeviceGetAttribute.
403
+ */
404
+ CUPTI_METRIC_PROPERTY_FLOP_HP_PER_CYCLE,
405
+ /*
406
+ * NVLINK Bandwitdh for device. This should be collected
407
+ * using value of \param CUPTI_DEVICE_ATTR_GPU_CPU_NVLINK_BW of
408
+ * cuptiDeviceGetAttribute.
409
+ */
410
+ CUPTI_METRIC_PROPERTY_GPU_CPU_NVLINK_BANDWIDTH,
411
+ } CUpti_MetricPropertyID;
412
+
413
+ /**
414
+ * \brief Get the total number of metrics available on any device.
415
+ *
416
+ * Returns the total number of metrics available on any CUDA-capable
417
+ * devices.
418
+ *
419
+ * \param numMetrics Returns the number of metrics
420
+ *
421
+ * \retval CUPTI_SUCCESS
422
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numMetrics is NULL
423
+ */
424
+ CUptiResult CUPTIAPI cuptiGetNumMetrics(uint32_t *numMetrics);
425
+
426
+ /**
427
+ * \brief Get all the metrics available on any device.
428
+ *
429
+ * Returns the metric IDs in \p metricArray for all CUDA-capable
430
+ * devices. The size of the \p metricArray buffer is given by \p
431
+ * *arraySizeBytes. The size of the \p metricArray buffer must be at
432
+ * least \p numMetrics * sizeof(CUpti_MetricID) or all metric IDs will
433
+ * not be returned. The value returned in \p *arraySizeBytes contains
434
+ * the number of bytes returned in \p metricArray.
435
+ *
436
+ * \param arraySizeBytes The size of \p metricArray in bytes, and
437
+ * returns the number of bytes written to \p metricArray
438
+ * \param metricArray Returns the IDs of the metrics
439
+ *
440
+ * \retval CUPTI_SUCCESS
441
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
442
+ * \p metricArray are NULL
443
+ */
444
+ CUptiResult CUPTIAPI cuptiEnumMetrics(size_t *arraySizeBytes,
445
+ CUpti_MetricID *metricArray);
446
+
447
+ /**
448
+ * \brief Get the number of metrics for a device.
449
+ *
450
+ * Returns the number of metrics available for a device.
451
+ *
452
+ * \param device The CUDA device
453
+ * \param numMetrics Returns the number of metrics available for the
454
+ * device
455
+ *
456
+ * \retval CUPTI_SUCCESS
457
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
458
+ * \retval CUPTI_ERROR_INVALID_DEVICE
459
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numMetrics is NULL
460
+ */
461
+ CUptiResult CUPTIAPI cuptiDeviceGetNumMetrics(CUdevice device,
462
+ uint32_t *numMetrics);
463
+
464
+ /**
465
+ * \brief Get the metrics for a device.
466
+ *
467
+ * Returns the metric IDs in \p metricArray for a device. The size of
468
+ * the \p metricArray buffer is given by \p *arraySizeBytes. The size
469
+ * of the \p metricArray buffer must be at least \p numMetrics *
470
+ * sizeof(CUpti_MetricID) or else all metric IDs will not be
471
+ * returned. The value returned in \p *arraySizeBytes contains the
472
+ * number of bytes returned in \p metricArray.
473
+ *
474
+ * \param device The CUDA device
475
+ * \param arraySizeBytes The size of \p metricArray in bytes, and
476
+ * returns the number of bytes written to \p metricArray
477
+ * \param metricArray Returns the IDs of the metrics for the device
478
+ *
479
+ * \retval CUPTI_SUCCESS
480
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
481
+ * \retval CUPTI_ERROR_INVALID_DEVICE
482
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
483
+ * \p metricArray are NULL
484
+ */
485
+ CUptiResult CUPTIAPI cuptiDeviceEnumMetrics(CUdevice device,
486
+ size_t *arraySizeBytes,
487
+ CUpti_MetricID *metricArray);
488
+
489
+ /**
490
+ * \brief Get a metric attribute.
491
+ *
492
+ * Returns a metric attribute in \p *value. The size of the \p
493
+ * value buffer is given by \p *valueSize. The value returned in \p
494
+ * *valueSize contains the number of bytes returned in \p value.
495
+ *
496
+ * If the attribute value is a c-string that is longer than \p
497
+ * *valueSize, then only the first \p *valueSize characters will be
498
+ * returned and there will be no terminating null byte.
499
+ *
500
+ * \param metric ID of the metric
501
+ * \param attrib The metric attribute to read
502
+ * \param valueSize The size of the \p value buffer in bytes, and
503
+ * returns the number of bytes written to \p value
504
+ * \param value Returns the attribute's value
505
+ *
506
+ * \retval CUPTI_SUCCESS
507
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
508
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
509
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
510
+ * is NULL, or if \p attrib is not a metric attribute
511
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
512
+ * attribute values, indicates that the \p value buffer is too small
513
+ * to hold the attribute value.
514
+ */
515
+ CUptiResult CUPTIAPI cuptiMetricGetAttribute(CUpti_MetricID metric,
516
+ CUpti_MetricAttribute attrib,
517
+ size_t *valueSize,
518
+ void *value);
519
+
520
+ /**
521
+ * \brief Find an metric by name.
522
+ *
523
+ * Find a metric by name and return the metric ID in \p *metric.
524
+ *
525
+ * \param device The CUDA device
526
+ * \param metricName The name of metric to find
527
+ * \param metric Returns the ID of the found metric or undefined if
528
+ * unable to find the metric
529
+ *
530
+ * \retval CUPTI_SUCCESS
531
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
532
+ * \retval CUPTI_ERROR_INVALID_DEVICE
533
+ * \retval CUPTI_ERROR_INVALID_METRIC_NAME if unable to find a metric
534
+ * with name \p metricName. In this case \p *metric is undefined
535
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricName or \p
536
+ * metric are NULL.
537
+ */
538
+ CUptiResult CUPTIAPI cuptiMetricGetIdFromName(CUdevice device,
539
+ const char *metricName,
540
+ CUpti_MetricID *metric);
541
+
542
+ /**
543
+ * \brief Get number of events required to calculate a metric.
544
+ *
545
+ * Returns the number of events in \p numEvents that are required to
546
+ * calculate a metric.
547
+ *
548
+ * \param metric ID of the metric
549
+ * \param numEvents Returns the number of events required for the metric
550
+ *
551
+ * \retval CUPTI_SUCCESS
552
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
553
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
554
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numEvents is NULL
555
+ */
556
+ CUptiResult CUPTIAPI cuptiMetricGetNumEvents(CUpti_MetricID metric,
557
+ uint32_t *numEvents);
558
+
559
+ /**
560
+ * \brief Get the events required to calculating a metric.
561
+ *
562
+ * Gets the event IDs in \p eventIdArray required to calculate a \p
563
+ * metric. The size of the \p eventIdArray buffer is given by \p
564
+ * *eventIdArraySizeBytes and must be at least \p numEvents *
565
+ * sizeof(CUpti_EventID) or all events will not be returned. The value
566
+ * returned in \p *eventIdArraySizeBytes contains the number of bytes
567
+ * returned in \p eventIdArray.
568
+ *
569
+ * \param metric ID of the metric
570
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes,
571
+ * and returns the number of bytes written to \p eventIdArray
572
+ * \param eventIdArray Returns the IDs of the events required to
573
+ * calculate \p metric
574
+ *
575
+ * \retval CUPTI_SUCCESS
576
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
577
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
578
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventIdArraySizeBytes or \p
579
+ * eventIdArray are NULL.
580
+ */
581
+ CUptiResult CUPTIAPI cuptiMetricEnumEvents(CUpti_MetricID metric,
582
+ size_t *eventIdArraySizeBytes,
583
+ CUpti_EventID *eventIdArray);
584
+
585
+ /**
586
+ * \brief Get number of properties required to calculate a metric.
587
+ *
588
+ * Returns the number of properties in \p numProp that are required to
589
+ * calculate a metric.
590
+ *
591
+ * \param metric ID of the metric
592
+ * \param numProp Returns the number of properties required for the
593
+ * metric
594
+ *
595
+ * \retval CUPTI_SUCCESS
596
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
597
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
598
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numProp is NULL
599
+ */
600
+ CUptiResult CUPTIAPI cuptiMetricGetNumProperties(CUpti_MetricID metric,
601
+ uint32_t *numProp);
602
+
603
+ /**
604
+ * \brief Get the properties required to calculating a metric.
605
+ *
606
+ * Gets the property IDs in \p propIdArray required to calculate a \p
607
+ * metric. The size of the \p propIdArray buffer is given by \p
608
+ * *propIdArraySizeBytes and must be at least \p numProp *
609
+ * sizeof(CUpti_DeviceAttribute) or all properties will not be
610
+ * returned. The value returned in \p *propIdArraySizeBytes contains
611
+ * the number of bytes returned in \p propIdArray.
612
+ *
613
+ * \param metric ID of the metric
614
+ * \param propIdArraySizeBytes The size of \p propIdArray in bytes,
615
+ * and returns the number of bytes written to \p propIdArray
616
+ * \param propIdArray Returns the IDs of the properties required to
617
+ * calculate \p metric
618
+ *
619
+ * \retval CUPTI_SUCCESS
620
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
621
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
622
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p propIdArraySizeBytes or \p
623
+ * propIdArray are NULL.
624
+ */
625
+ CUptiResult CUPTIAPI cuptiMetricEnumProperties(CUpti_MetricID metric,
626
+ size_t *propIdArraySizeBytes,
627
+ CUpti_MetricPropertyID *propIdArray);
628
+
629
+
630
+ /**
631
+ * \brief For a metric get the groups of events that must be collected
632
+ * in the same pass.
633
+ *
634
+ * For a metric get the groups of events that must be collected in the
635
+ * same pass to ensure that the metric is calculated correctly. If the
636
+ * events are not collected as specified then the metric value may be
637
+ * inaccurate.
638
+ *
639
+ * The function returns NULL if a metric does not have any required
640
+ * event group. In this case the events needed for the metric can be
641
+ * grouped in any manner for collection.
642
+ *
643
+ * \param context The context for event collection
644
+ * \param metric The metric ID
645
+ * \param eventGroupSets Returns a CUpti_EventGroupSets object that
646
+ * indicates the events that must be collected in the same pass to
647
+ * ensure the metric is calculated correctly. Returns NULL if no
648
+ * grouping is required for metric
649
+ * \retval CUPTI_SUCCESS
650
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
651
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
652
+ */
653
+ CUptiResult CUPTIAPI cuptiMetricGetRequiredEventGroupSets(CUcontext context,
654
+ CUpti_MetricID metric,
655
+ CUpti_EventGroupSets **eventGroupSets);
656
+
657
+ /**
658
+ * \brief For a set of metrics, get the grouping that indicates the
659
+ * number of passes and the event groups necessary to collect the
660
+ * events required for those metrics.
661
+ *
662
+ * For a set of metrics, get the grouping that indicates the number of
663
+ * passes and the event groups necessary to collect the events
664
+ * required for those metrics.
665
+ *
666
+ * \see cuptiEventGroupSetsCreate for details on event group set
667
+ * creation.
668
+ *
669
+ * \param context The context for event collection
670
+ * \param metricIdArraySizeBytes Size of the metricIdArray in bytes
671
+ * \param metricIdArray Array of metric IDs
672
+ * \param eventGroupPasses Returns a CUpti_EventGroupSets object that
673
+ * indicates the number of passes required to collect the events and
674
+ * the events to collect on each pass
675
+ *
676
+ * \retval CUPTI_SUCCESS
677
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
678
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
679
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
680
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricIdArray or
681
+ * \p eventGroupPasses is NULL
682
+ */
683
+ CUptiResult CUPTIAPI cuptiMetricCreateEventGroupSets(CUcontext context,
684
+ size_t metricIdArraySizeBytes,
685
+ CUpti_MetricID *metricIdArray,
686
+ CUpti_EventGroupSets **eventGroupPasses);
687
+
688
+ /**
689
+ * \brief Calculate the value for a metric.
690
+ *
691
+ * Use the events collected for a metric to calculate the metric
692
+ * value. Metric value evaluation depends on the evaluation mode
693
+ * \ref CUpti_MetricEvaluationMode that the metric supports.
694
+ * If a metric has evaluation mode as CUPTI_METRIC_EVALUATION_MODE_PER_INSTANCE,
695
+ * then it assumes that the input event value is for one domain instance.
696
+ * If a metric has evaluation mode as CUPTI_METRIC_EVALUATION_MODE_AGGREGATE,
697
+ * it assumes that input event values are
698
+ * normalized to represent all domain instances on a device. For the
699
+ * most accurate metric collection, the events required for the metric
700
+ * should be collected for all profiled domain instances. For example,
701
+ * to collect all instances of an event, set the
702
+ * CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES attribute on
703
+ * the group containing the event to 1. The normalized value for the
704
+ * event is then: (\p sum_event_values * \p totalInstanceCount) / \p
705
+ * instanceCount, where \p sum_event_values is the summation of the
706
+ * event values across all profiled domain instances, \p
707
+ * totalInstanceCount is obtained from querying
708
+ * CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT and \p instanceCount
709
+ * is obtained from querying CUPTI_EVENT_GROUP_ATTR_INSTANCE_COUNT (or
710
+ * CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT).
711
+ *
712
+ * \param device The CUDA device that the metric is being calculated for
713
+ * \param metric The metric ID
714
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes
715
+ * \param eventIdArray The event IDs required to calculate \p metric
716
+ * \param eventValueArraySizeBytes The size of \p eventValueArray in bytes
717
+ * \param eventValueArray The normalized event values required to
718
+ * calculate \p metric. The values must be order to match the order of
719
+ * events in \p eventIdArray
720
+ * \param timeDuration The duration over which the events were
721
+ * collected, in ns
722
+ * \param metricValue Returns the value for the metric
723
+ *
724
+ * \retval CUPTI_SUCCESS
725
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
726
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
727
+ * \retval CUPTI_ERROR_INVALID_OPERATION
728
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if the
729
+ * eventIdArray does not contain all the events needed for metric
730
+ * \retval CUPTI_ERROR_INVALID_EVENT_VALUE if any of the
731
+ * event values required for the metric is CUPTI_EVENT_OVERFLOW
732
+ * \retval CUPTI_ERROR_INVALID_METRIC_VALUE if the computed metric value
733
+ * cannot be represented in the metric's value type. For example,
734
+ * if the metric value type is unsigned and the computed metric value is negative
735
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricValue,
736
+ * \p eventIdArray or \p eventValueArray is NULL
737
+ */
738
+ CUptiResult CUPTIAPI cuptiMetricGetValue(CUdevice device,
739
+ CUpti_MetricID metric,
740
+ size_t eventIdArraySizeBytes,
741
+ CUpti_EventID *eventIdArray,
742
+ size_t eventValueArraySizeBytes,
743
+ uint64_t *eventValueArray,
744
+ uint64_t timeDuration,
745
+ CUpti_MetricValue *metricValue);
746
+
747
+ /**
748
+ * \brief Calculate the value for a metric.
749
+ *
750
+ * Use the events and properties collected for a metric to calculate
751
+ * the metric value. Metric value evaluation depends on the evaluation
752
+ * mode \ref CUpti_MetricEvaluationMode that the metric supports. If
753
+ * a metric has evaluation mode as
754
+ * CUPTI_METRIC_EVALUATION_MODE_PER_INSTANCE, then it assumes that the
755
+ * input event value is for one domain instance. If a metric has
756
+ * evaluation mode as CUPTI_METRIC_EVALUATION_MODE_AGGREGATE, it
757
+ * assumes that input event values are normalized to represent all
758
+ * domain instances on a device. For the most accurate metric
759
+ * collection, the events required for the metric should be collected
760
+ * for all profiled domain instances. For example, to collect all
761
+ * instances of an event, set the
762
+ * CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES attribute on
763
+ * the group containing the event to 1. The normalized value for the
764
+ * event is then: (\p sum_event_values * \p totalInstanceCount) / \p
765
+ * instanceCount, where \p sum_event_values is the summation of the
766
+ * event values across all profiled domain instances, \p
767
+ * totalInstanceCount is obtained from querying
768
+ * CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT and \p instanceCount
769
+ * is obtained from querying CUPTI_EVENT_GROUP_ATTR_INSTANCE_COUNT (or
770
+ * CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT).
771
+ *
772
+ * \param metric The metric ID
773
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes
774
+ * \param eventIdArray The event IDs required to calculate \p metric
775
+ * \param eventValueArraySizeBytes The size of \p eventValueArray in bytes
776
+ * \param eventValueArray The normalized event values required to
777
+ * calculate \p metric. The values must be order to match the order of
778
+ * events in \p eventIdArray
779
+ * \param propIdArraySizeBytes The size of \p propIdArray in bytes
780
+ * \param propIdArray The metric property IDs required to calculate \p metric
781
+ * \param propValueArraySizeBytes The size of \p propValueArray in bytes
782
+ * \param propValueArray The metric property values required to
783
+ * calculate \p metric. The values must be order to match the order of
784
+ * metric properties in \p propIdArray
785
+ * \param metricValue Returns the value for the metric
786
+ *
787
+ * \retval CUPTI_SUCCESS
788
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
789
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
790
+ * \retval CUPTI_ERROR_INVALID_OPERATION
791
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if the
792
+ * eventIdArray does not contain all the events needed for metric
793
+ * \retval CUPTI_ERROR_INVALID_EVENT_VALUE if any of the
794
+ * event values required for the metric is CUPTI_EVENT_OVERFLOW
795
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if the computed metric value
796
+ * cannot be represented in the metric's value type. For example,
797
+ * if the metric value type is unsigned and the computed metric value is negative
798
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricValue,
799
+ * \p eventIdArray or \p eventValueArray is NULL
800
+ */
801
+ CUptiResult CUPTIAPI cuptiMetricGetValue2(CUpti_MetricID metric,
802
+ size_t eventIdArraySizeBytes,
803
+ CUpti_EventID *eventIdArray,
804
+ size_t eventValueArraySizeBytes,
805
+ uint64_t *eventValueArray,
806
+ size_t propIdArraySizeBytes,
807
+ CUpti_MetricPropertyID *propIdArray,
808
+ size_t propValueArraySizeBytes,
809
+ uint64_t *propValueArray,
810
+ CUpti_MetricValue *metricValue);
811
+
812
+ /** @} */ /* END CUPTI_METRIC_API */
813
+
814
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
815
+ #pragma GCC visibility pop
816
+ #endif
817
+
818
+ #if defined(__cplusplus)
819
+ }
820
+ #endif
821
+
822
+ #endif /*_CUPTI_METRIC_H_*/
823
+
824
+
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_nvtx_cbid.h ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2013-2017 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
51
+ #pragma GCC visibility push(default)
52
+ #endif
53
+
54
+ typedef enum {
55
+ CUPTI_CBID_NVTX_INVALID = 0,
56
+ CUPTI_CBID_NVTX_nvtxMarkA = 1,
57
+ CUPTI_CBID_NVTX_nvtxMarkW = 2,
58
+ CUPTI_CBID_NVTX_nvtxMarkEx = 3,
59
+ CUPTI_CBID_NVTX_nvtxRangeStartA = 4,
60
+ CUPTI_CBID_NVTX_nvtxRangeStartW = 5,
61
+ CUPTI_CBID_NVTX_nvtxRangeStartEx = 6,
62
+ CUPTI_CBID_NVTX_nvtxRangeEnd = 7,
63
+ CUPTI_CBID_NVTX_nvtxRangePushA = 8,
64
+ CUPTI_CBID_NVTX_nvtxRangePushW = 9,
65
+ CUPTI_CBID_NVTX_nvtxRangePushEx = 10,
66
+ CUPTI_CBID_NVTX_nvtxRangePop = 11,
67
+ CUPTI_CBID_NVTX_nvtxNameCategoryA = 12,
68
+ CUPTI_CBID_NVTX_nvtxNameCategoryW = 13,
69
+ CUPTI_CBID_NVTX_nvtxNameOsThreadA = 14,
70
+ CUPTI_CBID_NVTX_nvtxNameOsThreadW = 15,
71
+ CUPTI_CBID_NVTX_nvtxNameCuDeviceA = 16,
72
+ CUPTI_CBID_NVTX_nvtxNameCuDeviceW = 17,
73
+ CUPTI_CBID_NVTX_nvtxNameCuContextA = 18,
74
+ CUPTI_CBID_NVTX_nvtxNameCuContextW = 19,
75
+ CUPTI_CBID_NVTX_nvtxNameCuStreamA = 20,
76
+ CUPTI_CBID_NVTX_nvtxNameCuStreamW = 21,
77
+ CUPTI_CBID_NVTX_nvtxNameCuEventA = 22,
78
+ CUPTI_CBID_NVTX_nvtxNameCuEventW = 23,
79
+ CUPTI_CBID_NVTX_nvtxNameCudaDeviceA = 24,
80
+ CUPTI_CBID_NVTX_nvtxNameCudaDeviceW = 25,
81
+ CUPTI_CBID_NVTX_nvtxNameCudaStreamA = 26,
82
+ CUPTI_CBID_NVTX_nvtxNameCudaStreamW = 27,
83
+ CUPTI_CBID_NVTX_nvtxNameCudaEventA = 28,
84
+ CUPTI_CBID_NVTX_nvtxNameCudaEventW = 29,
85
+ CUPTI_CBID_NVTX_nvtxDomainMarkEx = 30,
86
+ CUPTI_CBID_NVTX_nvtxDomainRangeStartEx = 31,
87
+ CUPTI_CBID_NVTX_nvtxDomainRangeEnd = 32,
88
+ CUPTI_CBID_NVTX_nvtxDomainRangePushEx = 33,
89
+ CUPTI_CBID_NVTX_nvtxDomainRangePop = 34,
90
+ CUPTI_CBID_NVTX_nvtxDomainResourceCreate = 35,
91
+ CUPTI_CBID_NVTX_nvtxDomainResourceDestroy = 36,
92
+ CUPTI_CBID_NVTX_nvtxDomainNameCategoryA = 37,
93
+ CUPTI_CBID_NVTX_nvtxDomainNameCategoryW = 38,
94
+ CUPTI_CBID_NVTX_nvtxDomainRegisterStringA = 39,
95
+ CUPTI_CBID_NVTX_nvtxDomainRegisterStringW = 40,
96
+ CUPTI_CBID_NVTX_nvtxDomainCreateA = 41,
97
+ CUPTI_CBID_NVTX_nvtxDomainCreateW = 42,
98
+ CUPTI_CBID_NVTX_nvtxDomainDestroy = 43,
99
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserCreate = 44,
100
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserDestroy = 45,
101
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserAcquireStart = 46,
102
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserAcquireFailed = 47,
103
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserAcquireSuccess = 48,
104
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserReleasing = 49,
105
+ CUPTI_CBID_NVTX_SIZE,
106
+ CUPTI_CBID_NVTX_FORCE_INT = 0x7fffffff
107
+ } CUpti_nvtx_api_trace_cbid;
108
+
109
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
110
+ #pragma GCC visibility pop
111
+ #endif
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_pcsampling.h ADDED
@@ -0,0 +1,936 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2020-2022 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(_CUPTI_PCSAMPLING_H_)
51
+ #define _CUPTI_PCSAMPLING_H_
52
+
53
+ #include <cuda.h>
54
+ #include <stdint.h>
55
+ #include <stddef.h>
56
+ #include "cupti_result.h"
57
+ #include "cupti_common.h"
58
+
59
+
60
+ #if defined(__cplusplus)
61
+ extern "C" {
62
+ #endif
63
+
64
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
65
+ #pragma GCC visibility push(default)
66
+ #endif
67
+
68
+ /**
69
+ * \defgroup CUPTI_PCSAMPLING_API CUPTI PC Sampling API
70
+ * Functions, types, and enums that implement the CUPTI PC Sampling API.
71
+ * @{
72
+ */
73
+
74
+ #ifndef CUPTI_PCSAMPLING_STRUCT_SIZE
75
+ #define CUPTI_PCSAMPLING_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
76
+ #endif
77
+
78
+ #ifndef CUPTI_STALL_REASON_STRING_SIZE
79
+ #define CUPTI_STALL_REASON_STRING_SIZE 128
80
+ #endif
81
+
82
+ /**
83
+ * \brief PC Sampling collection mode
84
+ */
85
+ typedef enum
86
+ {
87
+ /**
88
+ * INVALID Value
89
+ */
90
+ CUPTI_PC_SAMPLING_COLLECTION_MODE_INVALID = 0,
91
+ /**
92
+ * Continuous mode. Kernels are not serialized in this mode.
93
+ */
94
+ CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS = 1,
95
+ /**
96
+ * Serialized mode. Kernels are serialized in this mode.
97
+ */
98
+ CUPTI_PC_SAMPLING_COLLECTION_MODE_KERNEL_SERIALIZED = 2,
99
+ } CUpti_PCSamplingCollectionMode;
100
+
101
+ /**
102
+ * \brief PC Sampling stall reasons
103
+ */
104
+ typedef struct PACKED_ALIGNMENT
105
+ {
106
+ /**
107
+ * [r] Collected stall reason index
108
+ */
109
+ uint32_t pcSamplingStallReasonIndex;
110
+ /**
111
+ * [r] Number of times the PC was sampled with the stallReason.
112
+ */
113
+ uint32_t samples;
114
+ } CUpti_PCSamplingStallReason;
115
+
116
+ /**
117
+ * \brief PC Sampling data
118
+ */
119
+ typedef struct PACKED_ALIGNMENT
120
+ {
121
+ /**
122
+ * [w] Size of the data structure.
123
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
124
+ * available in the structure. Used to preserve backward compatibility.
125
+ */
126
+ size_t size;
127
+ /**
128
+ * [r] Unique cubin id
129
+ */
130
+ uint64_t cubinCrc;
131
+ /**
132
+ * [r] PC offset
133
+ */
134
+ uint64_t pcOffset;
135
+ /**
136
+ * The function's unique symbol index in the module.
137
+ */
138
+ uint32_t functionIndex;
139
+ /**
140
+ * Padding
141
+ */
142
+ uint32_t pad;
143
+ /**
144
+ * [r] The function name. This name string might be shared across all the records
145
+ * including records from activity APIs representing the same function, and so it should not be
146
+ * modified or freed until post processing of all the records is done. Once done, it is user’s responsibility to
147
+ * free the memory using free() function.
148
+ */
149
+ char* functionName;
150
+ /**
151
+ * [r] Collected stall reason count
152
+ */
153
+ size_t stallReasonCount;
154
+ /**
155
+ * [r] Stall reason id
156
+ * Total samples
157
+ */
158
+ CUpti_PCSamplingStallReason *stallReason;
159
+ /**
160
+ * The correlation ID of the kernel to which this result is associated. Only valid for serialized mode of pc sampling collection.
161
+ * For continous mode of collection the correlationId will be set to 0.
162
+ */
163
+ uint32_t correlationId;
164
+ } CUpti_PCSamplingPCData;
165
+
166
+ /**
167
+ * \brief PC Sampling output data format
168
+ */
169
+ typedef enum
170
+ {
171
+ CUPTI_PC_SAMPLING_OUTPUT_DATA_FORMAT_INVALID = 0,
172
+ /**
173
+ * HW buffer data will be parsed during collection of data
174
+ */
175
+ CUPTI_PC_SAMPLING_OUTPUT_DATA_FORMAT_PARSED = 1,
176
+ } CUpti_PCSamplingOutputDataFormat;
177
+
178
+ /**
179
+ * \brief Collected PC Sampling data
180
+ *
181
+ */
182
+ typedef struct PACKED_ALIGNMENT
183
+ {
184
+ /**
185
+ * [w] Size of the data structure.
186
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
187
+ * available in the structure. Used to preserve backward compatibility.
188
+ */
189
+ size_t size;
190
+ /**
191
+ * [w] Number of PCs to be collected
192
+ */
193
+ size_t collectNumPcs;
194
+ /**
195
+ * [r] Number of samples collected across all PCs.
196
+ * It includes samples for user modules, samples for non-user kernels and dropped samples.
197
+ * It includes counts for all non selected stall reasons.
198
+ * CUPTI does not provide PC records for non-user kernels.
199
+ * CUPTI does not provide PC records for instructions for which all selected stall reason metrics counts are zero.
200
+ */
201
+ uint64_t totalSamples;
202
+ /**
203
+ * [r] Number of samples that were dropped by hardware due to backpressure/overflow.
204
+ */
205
+ uint64_t droppedSamples;
206
+ /**
207
+ * [r] Number of PCs collected
208
+ */
209
+ size_t totalNumPcs;
210
+ /**
211
+ * [r] Number of PCs available for collection
212
+ */
213
+ size_t remainingNumPcs;
214
+ /**
215
+ * [r] Unique identifier for each range.
216
+ * Data collected across multiple ranges in multiple buffers can be identified using range id.
217
+ */
218
+ uint64_t rangeId;
219
+ /**
220
+ * [r] Profiled PC data
221
+ * This data struct should have enough memory to collect number of PCs mentioned in \brief collectNumPcs
222
+ */
223
+ CUpti_PCSamplingPCData *pPcData;
224
+ /**
225
+ * [r] Number of samples collected across all non user kernels PCs.
226
+ * It includes samples for non-user kernels.
227
+ * It includes counts for all non selected stall reasons as well.
228
+ * CUPTI does not provide PC records for non-user kernels.
229
+ */
230
+ uint64_t nonUsrKernelsTotalSamples;
231
+
232
+ /**
233
+ * [r] Status of the hardware buffer.
234
+ * CUPTI returns the error code CUPTI_ERROR_OUT_OF_MEMORY when hardware buffer is full.
235
+ * When hardware buffer is full, user will get pc data as 0. To mitigate this issue, one or more of the below options can be tried:
236
+ * 1. Increase the hardware buffer size using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_HARDWARE_BUFFER_SIZE
237
+ * 2. Decrease the thread sleep span using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_WORKER_THREAD_PERIODIC_SLEEP_SPAN
238
+ * 3. Decrease the sampling frequency using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_PERIOD
239
+ */
240
+ uint8_t hardwareBufferFull;
241
+ } CUpti_PCSamplingData;
242
+
243
+ /**
244
+ * \brief PC Sampling configuration attributes
245
+ *
246
+ * PC Sampling configuration attribute types. These attributes can be read
247
+ * using \ref cuptiPCSamplingGetConfigurationAttribute and can be written
248
+ * using \ref cuptiPCSamplingSetConfigurationAttribute. Attributes marked
249
+ * [r] can only be read using \ref cuptiPCSamplingGetConfigurationAttribute
250
+ * [w] can only be written using \ref cuptiPCSamplingSetConfigurationAttribute
251
+ * [rw] can be read using \ref cuptiPCSamplingGetConfigurationAttribute and
252
+ * written using \ref cuptiPCSamplingSetConfigurationAttribute
253
+ */
254
+ typedef enum
255
+ {
256
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_INVALID = 0,
257
+ /**
258
+ * [rw] Sampling period for PC Sampling.
259
+ * DEFAULT - CUPTI defined value based on number of SMs
260
+ * Valid values for the sampling
261
+ * periods are between 5 to 31 both inclusive. This will set the
262
+ * sampling period to (2^samplingPeriod) cycles.
263
+ * For e.g. for sampling period = 5 to 31, cycles = 32, 64, 128,..., 2^31
264
+ * Value is a uint32_t
265
+ */
266
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_PERIOD = 1,
267
+ /**
268
+ * [w] Number of stall reasons to collect.
269
+ * DEFAULT - All stall reasons will be collected
270
+ * Value is a size_t
271
+ * [w] Stall reasons to collect
272
+ * DEFAULT - All stall reasons will be collected
273
+ * Input value should be a pointer pointing to array of stall reason indexes
274
+ * containing all the stall reason indexes to collect.
275
+ */
276
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_STALL_REASON = 2,
277
+ /**
278
+ * [rw] Size of SW buffer for raw PC counter data downloaded from HW buffer
279
+ * DEFAULT - 1 MB, which can accommodate approximately 5500 PCs
280
+ * with all stall reasons
281
+ * Approximately it takes 16 Bytes (and some fixed size memory)
282
+ * to accommodate one PC with one stall reason
283
+ * For e.g. 1 PC with 1 stall reason = 32 Bytes
284
+ * 1 PC with 2 stall reason = 48 Bytes
285
+ * 1 PC with 4 stall reason = 96 Bytes
286
+ * Value is a size_t
287
+ */
288
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SCRATCH_BUFFER_SIZE = 3,
289
+ /**
290
+ * [rw] Size of HW buffer in bytes
291
+ * DEFAULT - 512 MB
292
+ * If sampling period is too less, HW buffer can overflow
293
+ * and drop PC data
294
+ * Value is a size_t
295
+ */
296
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_HARDWARE_BUFFER_SIZE = 4,
297
+ /**
298
+ * [rw] PC Sampling collection mode
299
+ * DEFAULT - CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS
300
+ * Input value should be of type \ref CUpti_PCSamplingCollectionMode.
301
+ */
302
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_COLLECTION_MODE = 5,
303
+ /**
304
+ * [rw] Control over PC Sampling data collection range
305
+ * Default - 0
306
+ * 1 - Allows user to start and stop PC Sampling using APIs -
307
+ * \ref cuptiPCSamplingStart() - Start PC Sampling
308
+ * \ref cuptiPCSamplingStop() - Stop PC Sampling
309
+ * Value is a uint32_t
310
+ */
311
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL = 6,
312
+ /**
313
+ * [w] Value for output data format
314
+ * Default - CUPTI_PC_SAMPLING_OUTPUT_DATA_FORMAT_PARSED
315
+ * Input value should be of type \ref CUpti_PCSamplingOutputDataFormat.
316
+ */
317
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_OUTPUT_DATA_FORMAT = 7,
318
+ /**
319
+ * [w] Data buffer to hold collected PC Sampling data PARSED_DATA
320
+ * Default - none.
321
+ * Buffer type is void * which can point to PARSED_DATA
322
+ * Refer \ref CUpti_PCSamplingData for buffer format for PARSED_DATA
323
+ */
324
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_DATA_BUFFER = 8,
325
+ /**
326
+ * [rw] Control sleep time of the worker threads created by CUPTI for various PC sampling operations.
327
+ * CUPTI creates multiple worker threads to offload certain operations to these threads. This includes decoding of HW data to
328
+ * the CUPTI PC sampling data and correlating PC data to SASS instructions. CUPTI wakes up these threads periodically.
329
+ * Default - 100 milliseconds.
330
+ * Value is a uint32_t
331
+ */
332
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_WORKER_THREAD_PERIODIC_SLEEP_SPAN = 9,
333
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_FORCE_INT = 0x7fffffff,
334
+ } CUpti_PCSamplingConfigurationAttributeType;
335
+
336
+ /**
337
+ * \brief PC sampling configuration information structure
338
+ *
339
+ * This structure provides \ref CUpti_PCSamplingConfigurationAttributeType which can be configured
340
+ * or queried for PC sampling configuration
341
+ */
342
+ typedef struct
343
+ {
344
+ /**
345
+ * Refer \ref CUpti_PCSamplingConfigurationAttributeType for all supported attribute types
346
+ */
347
+ CUpti_PCSamplingConfigurationAttributeType attributeType;
348
+ /*
349
+ * Configure or query status for \p attributeType
350
+ * CUPTI_SUCCESS for valid \p attributeType and \p attributeData
351
+ * CUPTI_ERROR_INVALID_OPERATION if \p attributeData is not valid
352
+ * CUPTI_ERROR_INVALID_PARAMETER if \p attributeType is not valid
353
+ */
354
+ CUptiResult attributeStatus;
355
+ union
356
+ {
357
+ /**
358
+ * Invalid Value
359
+ */
360
+ struct
361
+ {
362
+ uint64_t data[3];
363
+ } invalidData;
364
+ /**
365
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_PERIOD
366
+ */
367
+ struct
368
+ {
369
+ uint32_t samplingPeriod;
370
+ } samplingPeriodData;
371
+ /**
372
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_STALL_REASON
373
+ */
374
+ struct
375
+ {
376
+ size_t stallReasonCount;
377
+ uint32_t *pStallReasonIndex;
378
+ } stallReasonData;
379
+ /**
380
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SCRATCH_BUFFER_SIZE
381
+ */
382
+ struct
383
+ {
384
+ size_t scratchBufferSize;
385
+ } scratchBufferSizeData;
386
+ /**
387
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_HARDWARE_BUFFER_SIZE
388
+ */
389
+ struct
390
+ {
391
+ size_t hardwareBufferSize;
392
+ } hardwareBufferSizeData;
393
+ /**
394
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_COLLECTION_MODE
395
+ */
396
+ struct
397
+ {
398
+ CUpti_PCSamplingCollectionMode collectionMode;
399
+ } collectionModeData;
400
+ /**
401
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL
402
+ */
403
+ struct
404
+ {
405
+ uint32_t enableStartStopControl;
406
+ } enableStartStopControlData;
407
+ /**
408
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_OUTPUT_DATA_FORMAT
409
+ */
410
+ struct
411
+ {
412
+ CUpti_PCSamplingOutputDataFormat outputDataFormat;
413
+ } outputDataFormatData;
414
+ /**
415
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_DATA_BUFFER
416
+ */
417
+ struct
418
+ {
419
+ void *samplingDataBuffer;
420
+ } samplingDataBufferData;
421
+ /**
422
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_WORKER_THREAD_PERIODIC_SLEEP_SPAN
423
+ */
424
+ struct
425
+ {
426
+ uint32_t workerThreadPeriodicSleepSpan;
427
+ } workerThreadPeriodicSleepSpanData;
428
+
429
+ } attributeData;
430
+ } CUpti_PCSamplingConfigurationInfo;
431
+
432
+ /**
433
+ * \brief PC sampling configuration structure
434
+ *
435
+ * This structure configures PC sampling using \ref cuptiPCSamplingSetConfigurationAttribute
436
+ * and queries PC sampling default configuration using \ref cuptiPCSamplingGetConfigurationAttribute
437
+ */
438
+ typedef struct
439
+ {
440
+ /**
441
+ * [w] Size of the data structure i.e. CUpti_PCSamplingConfigurationInfoParamsSize
442
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
443
+ * available in the structure. Used to preserve backward compatibility.
444
+ */
445
+ size_t size;
446
+ /**
447
+ * [w] Assign to NULL
448
+ */
449
+ void* pPriv;
450
+ /**
451
+ * [w] CUcontext
452
+ */
453
+ CUcontext ctx;
454
+ /**
455
+ * [w] Number of attributes to configure using \ref cuptiPCSamplingSetConfigurationAttribute or query
456
+ * using \ref cuptiPCSamplingGetConfigurationAttribute
457
+ */
458
+ size_t numAttributes;
459
+ /**
460
+ * Refer \ref CUpti_PCSamplingConfigurationInfo
461
+ */
462
+ CUpti_PCSamplingConfigurationInfo *pPCSamplingConfigurationInfo;
463
+ } CUpti_PCSamplingConfigurationInfoParams;
464
+ #define CUpti_PCSamplingConfigurationInfoParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingConfigurationInfoParams,pPCSamplingConfigurationInfo)
465
+
466
+ /**
467
+ * \brief Write PC Sampling configuration attribute.
468
+ *
469
+ * \param pParams A pointer to \ref CUpti_PCSamplingConfigurationInfoParams
470
+ * containing PC sampling configuration.
471
+ *
472
+ * \retval CUPTI_SUCCESS
473
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called with
474
+ * some invalid \p attrib.
475
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if attribute \p value is not valid
476
+ * or any \p pParams is not valid
477
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
478
+ * does not support the API
479
+ */
480
+ CUptiResult CUPTIAPI cuptiPCSamplingSetConfigurationAttribute(CUpti_PCSamplingConfigurationInfoParams *pParams);
481
+
482
+ /**
483
+ * \brief Read PC Sampling configuration attribute.
484
+ *
485
+ * \param pParams A pointer to \ref CUpti_PCSamplingConfigurationInfoParams
486
+ * containing PC sampling configuration.
487
+ *
488
+ * \retval CUPTI_SUCCESS
489
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called with
490
+ * some invalid attribute.
491
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p attrib is not valid
492
+ * or any \p pParams is not valid
493
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT indicates that
494
+ * the \p value buffer is too small to hold the attribute value
495
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
496
+ * does not support the API
497
+ */
498
+ CUptiResult CUPTIAPI cuptiPCSamplingGetConfigurationAttribute(CUpti_PCSamplingConfigurationInfoParams *pParams);
499
+
500
+ /**
501
+ * \brief Params for cuptiPCSamplingEnable
502
+ */
503
+ typedef struct
504
+ {
505
+ /**
506
+ * [w] Size of the data structure i.e. CUpti_PCSamplingGetDataParamsSize
507
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
508
+ * available in the structure. Used to preserve backward compatibility.
509
+ */
510
+ size_t size;
511
+ /**
512
+ * [w] Assign to NULL
513
+ */
514
+ void* pPriv;
515
+ /**
516
+ * [w] CUcontext
517
+ */
518
+ CUcontext ctx;
519
+ /**
520
+ * \param pcSamplingData Data buffer to hold collected PC Sampling data PARSED_DATA
521
+ * Buffer type is void * which can point to PARSED_DATA
522
+ * Refer \ref CUpti_PCSamplingData for buffer format for PARSED_DATA
523
+ */
524
+ void *pcSamplingData;
525
+ } CUpti_PCSamplingGetDataParams;
526
+ #define CUpti_PCSamplingGetDataParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingGetDataParams, pcSamplingData)
527
+ /**
528
+ * \brief Flush GPU PC sampling data periodically.
529
+ *
530
+ * Flushing of GPU PC Sampling data is required at following point to maintain uniqueness of PCs:
531
+ * For \brief CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS, after every module load-unload-load
532
+ * For \brief CUPTI_PC_SAMPLING_COLLECTION_MODE_KERNEL_SERIALIZED, after every kernel ends
533
+ * If configuration option \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL
534
+ * is enabled, then after every range end i.e. \brief cuptiPCSamplingStop()
535
+ *
536
+ * If application is profiled in \brief CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS, with disabled
537
+ * \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL, and there is no module unload,
538
+ * user can collect data in two ways:
539
+ * Use \brief cuptiPCSamplingGetData() API periodically
540
+ * Use \brief cuptiPCSamplingDisable() on application exit and read GPU PC sampling data from sampling
541
+ * data buffer passed during configuration.
542
+ * Note: In case, \brief cuptiPCSamplingGetData() API is not called periodically, then sampling data buffer
543
+ * passed during configuration should be large enough to hold all PCs data.
544
+ * \brief cuptiPCSamplingGetData() API never does device synchronization.
545
+ * It is possible that when the API is called there is some unconsumed data from the HW buffer. In this case
546
+ * CUPTI provides only the data available with it at that moment.
547
+ *
548
+ * \param pParams A pointer to \ref CUpti_PCSamplingGetDataParams
549
+ *
550
+ * \retval CUPTI_SUCCESS
551
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called without
552
+ * enabling PC sampling.
553
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
554
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
555
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY indicates that the HW buffer is full
556
+ * does not support the API
557
+ */
558
+ CUptiResult CUPTIAPI cuptiPCSamplingGetData(CUpti_PCSamplingGetDataParams *pParams);
559
+
560
+ /**
561
+ * \brief Params for cuptiPCSamplingEnable
562
+ */
563
+ typedef struct
564
+ {
565
+ /**
566
+ * [w] Size of the data structure i.e. CUpti_PCSamplingEnableParamsSize
567
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
568
+ * available in the structure. Used to preserve backward compatibility.
569
+ */
570
+ size_t size;
571
+ /**
572
+ * [w] Assign to NULL
573
+ */
574
+ void* pPriv;
575
+ /**
576
+ * [w] CUcontext
577
+ */
578
+ CUcontext ctx;
579
+ } CUpti_PCSamplingEnableParams;
580
+ #define CUpti_PCSamplingEnableParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingEnableParams, ctx)
581
+
582
+ /**
583
+ * \brief Enable PC sampling.
584
+ *
585
+ * \param pParams A pointer to \ref CUpti_PCSamplingEnableParams
586
+ *
587
+ * \retval CUPTI_SUCCESS
588
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
589
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
590
+ * does not support the API
591
+ */
592
+ CUptiResult CUPTIAPI cuptiPCSamplingEnable(CUpti_PCSamplingEnableParams *pParams);
593
+
594
+ /**
595
+ * \brief Params for cuptiPCSamplingDisable
596
+ */
597
+ typedef struct
598
+ {
599
+ /**
600
+ * [w] Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
601
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
602
+ * available in the structure. Used to preserve backward compatibility.
603
+ */
604
+ size_t size;
605
+ /**
606
+ * [w] Assign to NULL
607
+ */
608
+ void* pPriv;
609
+ /**
610
+ * [w] CUcontext
611
+ */
612
+ CUcontext ctx;
613
+ } CUpti_PCSamplingDisableParams;
614
+ #define CUpti_PCSamplingDisableParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingDisableParams, ctx)
615
+
616
+ /**
617
+ * \brief Disable PC sampling.
618
+ *
619
+ * For application which doesn't destroy the CUDA context explicitly,
620
+ * this API does the PC Sampling tear-down, joins threads and copies PC records in the buffer provided
621
+ * during the PC sampling configuration. PC records which can't be accommodated in the buffer are discarded.
622
+ *
623
+ * \param pParams A pointer to \ref CUpti_PCSamplingDisableParams
624
+ *
625
+ * \retval CUPTI_SUCCESS
626
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
627
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
628
+ * does not support the API
629
+ */
630
+ CUptiResult CUPTIAPI cuptiPCSamplingDisable(CUpti_PCSamplingDisableParams *pParams);
631
+
632
+ /**
633
+ * \brief Params for cuptiPCSamplingStart
634
+ */
635
+ typedef struct
636
+ {
637
+ /**
638
+ * [w] Size of the data structure i.e. CUpti_PCSamplingStartParamsSize
639
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
640
+ * available in the structure. Used to preserve backward compatibility.
641
+ */
642
+ size_t size;
643
+ /**
644
+ * [w] Assign to NULL
645
+ */
646
+ void* pPriv;
647
+ /**
648
+ * [w] CUcontext
649
+ */
650
+ CUcontext ctx;
651
+ } CUpti_PCSamplingStartParams;
652
+ #define CUpti_PCSamplingStartParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingStartParams, ctx)
653
+
654
+ /**
655
+ * \brief Start PC sampling.
656
+ *
657
+ * User can collect PC Sampling data for user-defined range specified by Start/Stop APIs.
658
+ * This API can be used to mark starting of range. Set configuration option
659
+ * \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL to use this API.
660
+ *
661
+ * \param pParams A pointer to \ref CUpti_PCSamplingStartParams
662
+ *
663
+ * \retval CUPTI_SUCCESS
664
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called with
665
+ * incorrect PC Sampling configuration.
666
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
667
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
668
+ * does not support the API
669
+ */
670
+ CUptiResult CUPTIAPI cuptiPCSamplingStart(CUpti_PCSamplingStartParams *pParams);
671
+
672
+ /**
673
+ * \brief Params for cuptiPCSamplingStop
674
+ */
675
+ typedef struct
676
+ {
677
+ /**
678
+ * [w] Size of the data structure i.e. CUpti_PCSamplingStopParamsSize
679
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
680
+ * available in the structure. Used to preserve backward compatibility.
681
+ */
682
+ size_t size;
683
+ /**
684
+ * [w] Assign to NULL
685
+ */
686
+ void* pPriv;
687
+ /**
688
+ * [w] CUcontext
689
+ */
690
+ CUcontext ctx;
691
+ } CUpti_PCSamplingStopParams;
692
+ #define CUpti_PCSamplingStopParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingStopParams, ctx)
693
+
694
+ /**
695
+ * \brief Stop PC sampling.
696
+ *
697
+ * User can collect PC Sampling data for user-defined range specified by Start/Stop APIs.
698
+ * This API can be used to mark end of range. Set configuration option
699
+ * \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL to use this API.
700
+ *
701
+ * \param pParams A pointer to \ref CUpti_PCSamplingStopParams
702
+ *
703
+ * \retval CUPTI_SUCCESS
704
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called with
705
+ * incorrect PC Sampling configuration.
706
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
707
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
708
+ * does not support the API
709
+ */
710
+ CUptiResult CUPTIAPI cuptiPCSamplingStop(CUpti_PCSamplingStopParams *pParams);
711
+
712
+ /**
713
+ * \brief Params for cuptiPCSamplingGetNumStallReasons
714
+ */
715
+ typedef struct
716
+ {
717
+ /**
718
+ * [w] Size of the data structure i.e. CUpti_PCSamplingGetNumStallReasonsParamsSize
719
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
720
+ * available in the structure. Used to preserve backward compatibility.
721
+ */
722
+ size_t size;
723
+ /**
724
+ * [w] Assign to NULL
725
+ */
726
+ void* pPriv;
727
+ /**
728
+ * [w] CUcontext
729
+ */
730
+ CUcontext ctx;
731
+ /**
732
+ * [r] Number of stall reasons
733
+ */
734
+ size_t *numStallReasons;
735
+ } CUpti_PCSamplingGetNumStallReasonsParams;
736
+ #define CUpti_PCSamplingGetNumStallReasonsParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingGetNumStallReasonsParams, numStallReasons)
737
+
738
+ /**
739
+ * \brief Get PC sampling stall reason count.
740
+ *
741
+ * \param pParams A pointer to \ref CUpti_PCSamplingGetNumStallReasonsParams
742
+ *
743
+ * \retval CUPTI_SUCCESS
744
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
745
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
746
+ * does not support the API
747
+ */
748
+ CUptiResult CUPTIAPI cuptiPCSamplingGetNumStallReasons(CUpti_PCSamplingGetNumStallReasonsParams *pParams);
749
+
750
+ /**
751
+ * \brief Params for cuptiPCSamplingGetStallReasons
752
+ */
753
+ typedef struct
754
+ {
755
+ /**
756
+ * [w] Size of the data structure i.e. CUpti_PCSamplingGetStallReasonsParamsSize
757
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
758
+ * available in the structure. Used to preserve backward compatibility.
759
+ */
760
+ size_t size;
761
+ /**
762
+ * [w] Assign to NULL
763
+ */
764
+ void* pPriv;
765
+ /**
766
+ * [w] CUcontext
767
+ */
768
+ CUcontext ctx;
769
+ /**
770
+ * [w] Number of stall reasons
771
+ */
772
+ size_t numStallReasons;
773
+ /**
774
+ * [r] Stall reason index
775
+ */
776
+ uint32_t *stallReasonIndex;
777
+ /**
778
+ * [r] Stall reasons name
779
+ */
780
+ char **stallReasons;
781
+ } CUpti_PCSamplingGetStallReasonsParams;
782
+ #define CUpti_PCSamplingGetStallReasonsParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingGetStallReasonsParams, stallReasons)
783
+
784
+ /**
785
+ * \brief Get PC sampling stall reasons.
786
+ *
787
+ * \param pParams A pointer to \ref CUpti_PCSamplingGetStallReasonsParams
788
+ *
789
+ * \retval CUPTI_SUCCESS
790
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
791
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
792
+ * does not support the API
793
+ */
794
+ CUptiResult CUPTIAPI cuptiPCSamplingGetStallReasons(CUpti_PCSamplingGetStallReasonsParams *pParams);
795
+
796
+
797
+ /**
798
+ * \brief Params for cuptiGetSassToSourceCorrelation
799
+ */
800
+ typedef struct CUpti_GetSassToSourceCorrelationParams {
801
+ /**
802
+ * [w] Size of the data structure i.e. CUpti_GetSassToSourceCorrelationParamsSize
803
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
804
+ * available in the structure. Used to preserve backward compatibility.
805
+ */
806
+ size_t size;
807
+ /**
808
+ * [w] Pointer to cubin binary where function belongs.
809
+ */
810
+ const void* cubin;
811
+ /**
812
+ * [w] Function name to which PC belongs.
813
+ */
814
+ const char *functionName;
815
+ /**
816
+ * [w] Size of cubin binary.
817
+ */
818
+ size_t cubinSize;
819
+ /**
820
+ * [r] Line number in the source code.
821
+ */
822
+ uint32_t lineNumber;
823
+ /**
824
+ * [w] PC offset
825
+ */
826
+ uint64_t pcOffset;
827
+ /**
828
+ * [r] Path for the source file.
829
+ */
830
+ char *fileName;
831
+ /**
832
+ * [r] Path for the directory of source file.
833
+ */
834
+ char *dirName;
835
+ } CUpti_GetSassToSourceCorrelationParams;
836
+
837
+ #define CUpti_GetSassToSourceCorrelationParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_GetSassToSourceCorrelationParams, dirName)
838
+
839
+ /**
840
+ * \brief SASS to Source correlation.
841
+ *
842
+ * \param pParams A pointer to \ref CUpti_GetSassToSourceCorrelationParams
843
+ *
844
+ * It is expected from user to free allocated memory for fileName and dirName after use.
845
+ *
846
+ * \retval CUPTI_SUCCESS
847
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if either of the parameters cubin or functionName
848
+ * is NULL or cubinSize is zero or size field is not set correctly.
849
+ * \retval CUPTI_ERROR_INVALID_MODULE provided cubin is invalid.
850
+ * \retval CUPTI_ERROR_UNKNOWN an internal error occurred.
851
+ * This error code is also used for cases when the function is not present in the module.
852
+ * A better error code will be returned in the future release.
853
+ */
854
+ CUptiResult CUPTIAPI cuptiGetSassToSourceCorrelation(CUpti_GetSassToSourceCorrelationParams *pParams);
855
+
856
+ /**
857
+ * \brief Params for cuptiGetCubinCrc
858
+ */
859
+ typedef struct {
860
+ /**
861
+ * [w] Size of configuration structure.
862
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
863
+ * available in the structure. Used to preserve backward compatibility.
864
+ */
865
+ size_t size;
866
+ /**
867
+ * [w] Size of cubin binary.
868
+ */
869
+ size_t cubinSize;
870
+ /**
871
+ * [w] Pointer to cubin binary
872
+ */
873
+ const void* cubin;
874
+ /**
875
+ * [r] Computed CRC will be stored in it.
876
+ */
877
+ uint64_t cubinCrc;
878
+ } CUpti_GetCubinCrcParams;
879
+ #define CUpti_GetCubinCrcParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_GetCubinCrcParams, cubinCrc)
880
+
881
+ /**
882
+ * \brief Get the CRC of cubin.
883
+ *
884
+ * This function returns the CRC of provided cubin binary.
885
+ *
886
+ * \param pParams A pointer to \ref CUpti_GetCubinCrcParams
887
+ *
888
+ * \retval CUPTI_SUCCESS
889
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if parameter cubin is NULL or
890
+ * provided cubinSize is zero or size field is not set.
891
+ */
892
+ CUptiResult CUPTIAPI cuptiGetCubinCrc(CUpti_GetCubinCrcParams *pParams);
893
+
894
+ /**
895
+ * \brief Function type for callback used by CUPTI to request crc of
896
+ * loaded module.
897
+ *
898
+ * This callback function ask for crc of provided module in function.
899
+ * The provided crc will be stored in PC sampling records i.e. in the field 'cubinCrc' of the PC sampling
900
+ * struct CUpti_PCSamplingPCData. The CRC is uses during the offline source correlation to uniquely identify the module.
901
+ *
902
+ * \param cubin The pointer to cubin binary
903
+ * \param cubinSize The size of cubin binary.
904
+ * \param cubinCrc Returns the computed crc of cubin.
905
+ */
906
+ typedef void (CUPTIAPI *CUpti_ComputeCrcCallbackFunc)(
907
+ const void* cubin,
908
+ size_t cubinSize,
909
+ uint64_t *cubinCrc);
910
+
911
+ /**
912
+ * \brief Register callback function with CUPTI to use
913
+ * your own algorithm to compute cubin crc.
914
+ *
915
+ * This function registers a callback function and it gets called
916
+ * from CUPTI when a CUDA module is loaded.
917
+ *
918
+ * \param funcComputeCubinCrc callback is invoked when a CUDA module
919
+ * is loaded.
920
+ *
921
+ * \retval CUPTI_SUCCESS
922
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p funcComputeCubinCrc is NULL.
923
+ */
924
+ CUptiResult CUPTIAPI cuptiRegisterComputeCrcCallback(CUpti_ComputeCrcCallbackFunc funcComputeCubinCrc);
925
+
926
+ /** @} */ /* END CUPTI_PCSAMPLING_API */
927
+
928
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
929
+ #pragma GCC visibility pop
930
+ #endif
931
+
932
+ #if defined(__cplusplus)
933
+ }
934
+ #endif
935
+
936
+ #endif /*_CUPTI_PCSAMPLING_H_*/
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_pcsampling_util.h ADDED
@@ -0,0 +1,402 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #if !defined(_CUPTI_PCSAMPLING_UTIL_H_)
2
+ #define _CUPTI_PCSAMPLING_UTIL_H_
3
+
4
+ #include <cupti_pcsampling.h>
5
+ #include <fstream>
6
+
7
+ #include <cupti_common.h>
8
+
9
+ #ifndef CUPTI_UTIL_STRUCT_SIZE
10
+ #define CUPTI_UTIL_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
11
+ #endif
12
+
13
+ #ifndef CHECK_PC_SAMPLING_STRUCT_FIELD_EXISTS
14
+ #define CHECK_PC_SAMPLING_STRUCT_FIELD_EXISTS(type, member, structSize) \
15
+ (offsetof(type, member) < structSize)
16
+ #endif
17
+
18
+ #if defined(__cplusplus)
19
+ extern "C" {
20
+ #endif
21
+
22
+ #if defined(__GNUC__)
23
+ #pragma GCC visibility push(default)
24
+ #endif
25
+
26
+ namespace CUPTI { namespace PcSamplingUtil {
27
+
28
+ /**
29
+ * \defgroup CUPTI_PCSAMPLING_UTILITY CUPTI PC Sampling Utility API
30
+ * Functions, types, and enums that implement the CUPTI PC Sampling Utility API.
31
+ * @{
32
+ */
33
+
34
+ /**
35
+ * \brief Header info will be stored in file.
36
+ */
37
+ typedef struct PACKED_ALIGNMENT {
38
+ /**
39
+ * Version of file format.
40
+ */
41
+ uint32_t version;
42
+ /**
43
+ * Total number of buffers present in the file.
44
+ */
45
+ uint32_t totalBuffers;
46
+ } Header;
47
+
48
+ /**
49
+ * \brief BufferInfo will be stored in the file for every buffer
50
+ * i.e for every call of UtilDumpPcSamplingBufferInFile() API.
51
+ */
52
+ typedef struct PACKED_ALIGNMENT {
53
+ /**
54
+ * Total number of PC records.
55
+ */
56
+ uint64_t recordCount;
57
+ /**
58
+ * Count of all stall reasons supported on the GPU
59
+ */
60
+ size_t numStallReasons;
61
+ /**
62
+ * Total number of stall reasons in single record.
63
+ */
64
+ uint64_t numSelectedStallReasons;
65
+ /**
66
+ * Buffer size in Bytes.
67
+ */
68
+ uint64_t bufferByteSize;
69
+ } BufferInfo;
70
+
71
+ /**
72
+ * \brief All available stall reasons name and respective indexes
73
+ * will be stored in it.
74
+ */
75
+ typedef struct PACKED_ALIGNMENT {
76
+ /**
77
+ * Number of all available stall reasons
78
+ */
79
+ size_t numStallReasons;
80
+ /**
81
+ * Stall reasons names of all available stall reasons
82
+ */
83
+ char **stallReasons;
84
+ /**
85
+ * Stall reason index of all available stall reasons
86
+ */
87
+ uint32_t *stallReasonIndex;
88
+ } PcSamplingStallReasons;
89
+
90
+ /**
91
+ * \brief CUPTI PC sampling buffer types.
92
+ *
93
+ */
94
+ typedef enum {
95
+ /**
96
+ * Invalid buffer type.
97
+ */
98
+ PC_SAMPLING_BUFFER_INVALID = 0,
99
+ /**
100
+ * Refers to CUpti_PCSamplingData buffer.
101
+ */
102
+ PC_SAMPLING_BUFFER_PC_TO_COUNTER_DATA = 1
103
+ } PcSamplingBufferType;
104
+
105
+ /**
106
+ * \brief CUPTI PC sampling utility API result codes.
107
+ *
108
+ * Error and result codes returned by CUPTI PC sampling utility API.
109
+ */
110
+ typedef enum {
111
+ /**
112
+ * No error
113
+ */
114
+ CUPTI_UTIL_SUCCESS = 0,
115
+ /**
116
+ * One or more of the parameters are invalid.
117
+ */
118
+ CUPTI_UTIL_ERROR_INVALID_PARAMETER = 1,
119
+ /**
120
+ * Unable to create a new file
121
+ */
122
+ CUPTI_UTIL_ERROR_UNABLE_TO_CREATE_FILE = 2,
123
+ /**
124
+ * Unable to open a file
125
+ */
126
+ CUPTI_UTIL_ERROR_UNABLE_TO_OPEN_FILE = 3,
127
+ /**
128
+ * Read or write operation failed
129
+ */
130
+ CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED = 4,
131
+ /**
132
+ * Provided file handle is corrupted.
133
+ */
134
+ CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED = 5,
135
+ /**
136
+ * seek operation failed.
137
+ */
138
+ CUPTI_UTIL_ERROR_SEEK_OPERATION_FAILED = 6,
139
+ /**
140
+ * Unable to allocate enough memory to perform the requested
141
+ * operation.
142
+ */
143
+ CUPTI_UTIL_ERROR_OUT_OF_MEMORY = 7,
144
+ /**
145
+ * An unknown internal error has occurred.
146
+ */
147
+ CUPTI_UTIL_ERROR_UNKNOWN = 999,
148
+ CUPTI_UTIL_ERROR_FORCE_INT = 0x7fffffff
149
+ } CUptiUtilResult;
150
+
151
+ /**
152
+ * \brief Params for \ref CuptiUtilPutPcSampData
153
+ */
154
+ typedef struct {
155
+ /**
156
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
157
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
158
+ * available in the structure. Used to preserve backward compatibility.
159
+ */
160
+ size_t size;
161
+ /**
162
+ * Type of buffer to store in file
163
+ */
164
+ PcSamplingBufferType bufferType;
165
+ /**
166
+ * PC sampling buffer.
167
+ */
168
+ void *pSamplingData;
169
+ /**
170
+ * Number of configured attributes
171
+ */
172
+ size_t numAttributes;
173
+ /**
174
+ * Refer \ref CUpti_PCSamplingConfigurationInfo
175
+ * It is expected to provide configuration details of at least
176
+ * CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_STALL_REASON attribute.
177
+ */
178
+ CUpti_PCSamplingConfigurationInfo *pPCSamplingConfigurationInfo;
179
+ /**
180
+ * Refer \ref PcSamplingStallReasons.
181
+ */
182
+ PcSamplingStallReasons *pPcSamplingStallReasons;
183
+ /**
184
+ * File name to store buffer into it.
185
+ */
186
+ const char* fileName;
187
+ } CUptiUtil_PutPcSampDataParams;
188
+ #define CUptiUtil_PutPcSampDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_PutPcSampDataParams, fileName)
189
+
190
+ /**
191
+ * \brief Dump PC sampling data into the file.
192
+ *
193
+ * This API can be called multiple times.
194
+ * It will append buffer in the file.
195
+ * For every buffer it will store BufferInfo
196
+ * so that before retrieving data it will help to allocate buffer
197
+ * to store retrieved data.
198
+ * This API creates file if file does not present.
199
+ * If stallReasonIndex or stallReasons pointer of \ref CUptiUtil_PutPcSampDataParams is NULL
200
+ * then stall reasons data will not be stored in file.
201
+ * It is expected to store all available stall reason data at least once to refer it during
202
+ * offline correlation.
203
+ *
204
+ * \retval CUPTI_UTIL_SUCCESS
205
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if buffer type is invalid
206
+ * or if either of pSamplingData, pParams pointer is NULL or stall reason configuration details not provided
207
+ * or filename is empty.
208
+ * \retval CUPTI_UTIL_ERROR_UNABLE_TO_CREATE_FILE
209
+ * \retval CUPTI_UTIL_ERROR_UNABLE_TO_OPEN_FILE
210
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED
211
+ */
212
+ CUptiUtilResult CUPTIUTILAPI CuptiUtilPutPcSampData(CUptiUtil_PutPcSampDataParams *pParams);
213
+
214
+ /**
215
+ * \brief Params for \ref CuptiUtilGetHeaderData
216
+ */
217
+ typedef struct {
218
+ /**
219
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
220
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
221
+ * available in the structure. Used to preserve backward compatibility.
222
+ */
223
+ size_t size;
224
+ /**
225
+ * File handle.
226
+ */
227
+ std::ifstream *fileHandler;
228
+ /**
229
+ * Header Info.
230
+ */
231
+ Header headerInfo;
232
+
233
+ } CUptiUtil_GetHeaderDataParams;
234
+ #define CUptiUtil_GetHeaderDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_GetHeaderDataParams, headerInfo)
235
+
236
+ /**
237
+ * \brief Get header data of file.
238
+ *
239
+ * This API must be called once initially while retrieving data from file.
240
+ * \ref Header structure, it gives info about total number
241
+ * of buffers present in the file.
242
+ *
243
+ * \retval CUPTI_UTIL_SUCCESS
244
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if either of pParam or fileHandle is NULL or param struct size is incorrect.
245
+ * \retval CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED file handle is not in good state to read data from file
246
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED failed to read data from file.
247
+ */
248
+ CUptiUtilResult CUPTIUTILAPI CuptiUtilGetHeaderData(CUptiUtil_GetHeaderDataParams *pParams);
249
+
250
+ /**
251
+ * \brief Params for \ref CuptiUtilGetBufferInfo
252
+ */
253
+ typedef struct {
254
+ /**
255
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
256
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
257
+ * available in the structure. Used to preserve backward compatibility.
258
+ */
259
+ size_t size;
260
+ /**
261
+ * File handle.
262
+ */
263
+ std::ifstream *fileHandler;
264
+ /**
265
+ * Buffer Info.
266
+ */
267
+ BufferInfo bufferInfoData;
268
+ } CUptiUtil_GetBufferInfoParams;
269
+ #define CUptiUtil_GetBufferInfoParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_GetBufferInfoParams, bufferInfoData)
270
+
271
+ /**
272
+ * \brief Get buffer info data of file.
273
+ *
274
+ * This API must be called every time before calling CuptiUtilGetPcSampData API.
275
+ * \ref BufferInfo structure, it gives info about recordCount and stallReasonCount
276
+ * of every record in the buffer. This will help to allocate exact buffer to retrieve data into it.
277
+ *
278
+ * \retval CUPTI_UTIL_SUCCESS
279
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if either of pParam or fileHandle is NULL or param struct size is incorrect.
280
+ * \retval CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED file handle is not in good state to read data from file.
281
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED failed to read data from file.
282
+ */
283
+ CUptiUtilResult CUPTIUTILAPI CuptiUtilGetBufferInfo(CUptiUtil_GetBufferInfoParams *pParams);
284
+
285
+ /**
286
+ * \brief Params for \ref CuptiUtilGetPcSampData
287
+ */
288
+ typedef struct {
289
+ /**
290
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
291
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
292
+ * available in the structure. Used to preserve backward compatibility.
293
+ */
294
+ size_t size;
295
+ /**
296
+ * File handle.
297
+ */
298
+ std::ifstream *fileHandler;
299
+ /**
300
+ * Type of buffer to store in file
301
+ */
302
+ PcSamplingBufferType bufferType;
303
+ /**
304
+ * Pointer to collected buffer info using \ref CuptiUtilGetBufferInfo
305
+ */
306
+ BufferInfo *pBufferInfoData;
307
+ /**
308
+ * Pointer to allocated memory to store retrieved data from file.
309
+ */
310
+ void *pSamplingData;
311
+ /**
312
+ * Number of configuration attributes
313
+ */
314
+ size_t numAttributes;
315
+ /**
316
+ * Refer \ref CUpti_PCSamplingConfigurationInfo
317
+ */
318
+ CUpti_PCSamplingConfigurationInfo *pPCSamplingConfigurationInfo;
319
+ /**
320
+ * Refer \ref PcSamplingStallReasons.
321
+ * For stallReasons field of \ref PcSamplingStallReasons it is expected to
322
+ * allocate memory for each string element of array.
323
+ */
324
+ PcSamplingStallReasons *pPcSamplingStallReasons;
325
+ } CUptiUtil_GetPcSampDataParams;
326
+ #define CUptiUtil_GetPcSampDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_GetPcSampDataParams, pPcSamplingStallReasons)
327
+
328
+ /**
329
+ * \brief Retrieve PC sampling data from file into allocated buffer.
330
+ *
331
+ * This API must be called after CuptiUtilGetBufferInfo API.
332
+ * It will retrieve data from file into allocated buffer.
333
+ *
334
+ * \retval CUPTI_UTIL_SUCCESS
335
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if buffer type is invalid
336
+ * or if either of pSampData, pParams is NULL. If pPcSamplingStallReasons is not NULL then
337
+ * error out if either of stallReasonIndex, stallReasons or stallReasons array element pointer is NULL.
338
+ * or filename is empty.
339
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED
340
+ * \retval CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED file handle is not in good state to read data from file.
341
+ */
342
+ CUptiUtilResult CUPTIUTILAPI CuptiUtilGetPcSampData(CUptiUtil_GetPcSampDataParams *pParams);
343
+
344
+ /**
345
+ * \brief Params for \ref CuptiUtilMergePcSampData
346
+ */
347
+ typedef struct
348
+ {
349
+ /**
350
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
351
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
352
+ * available in the structure. Used to preserve backward compatibility.
353
+ */
354
+ size_t size;
355
+ /**
356
+ * Number of buffers to merge.
357
+ */
358
+ size_t numberOfBuffers;
359
+ /**
360
+ * Pointer to array of buffers to merge
361
+ */
362
+ CUpti_PCSamplingData *PcSampDataBuffer;
363
+ /**
364
+ * Pointer to array of merged buffers as per the range id.
365
+ */
366
+ CUpti_PCSamplingData **MergedPcSampDataBuffers;
367
+ /**
368
+ * Number of merged buffers.
369
+ */
370
+ size_t *numMergedBuffer;
371
+ } CUptiUtil_MergePcSampDataParams;
372
+ #define CUptiUtil_MergePcSampDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_MergePcSampDataParams, numMergedBuffer)
373
+
374
+ /**
375
+ * \brief Merge PC sampling data range id wise.
376
+ *
377
+ * This API merge PC sampling data range id wise.
378
+ * It allocates memory for merged data and fill data in it
379
+ * and provide buffer pointer in MergedPcSampDataBuffers field.
380
+ * It is expected from user to free merge data buffers after use.
381
+ *
382
+ * \retval CUPTI_UTIL_SUCCESS
383
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if param struct size is invalid
384
+ * or count of buffers to merge is invalid i.e less than 1
385
+ * or either of PcSampDataBuffer, MergedPcSampDataBuffers, numMergedBuffer is NULL
386
+ * \retval CUPTI_UTIL_ERROR_OUT_OF_MEMORY Unable to allocate memory for merged buffer.
387
+ */
388
+ CUptiUtilResult CUPTIUTILAPI CuptiUtilMergePcSampData(CUptiUtil_MergePcSampDataParams *pParams);
389
+
390
+ /** @} */ /* END CUPTI_PCSAMPLING_UTILITY */
391
+
392
+ } }
393
+
394
+ #if defined(__GNUC__)
395
+ #pragma GCC visibility pop
396
+ #endif
397
+
398
+ #if defined(__cplusplus)
399
+ }
400
+ #endif
401
+
402
+ #endif
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_pmsampling.h ADDED
@@ -0,0 +1,490 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2024 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(_CUPTI_PMSAMPLING_H_)
51
+ #define _CUPTI_PMSAMPLING_H_
52
+
53
+ #include <cuda.h>
54
+ #include <cupti_result.h>
55
+ #include <stddef.h>
56
+ #include <stdint.h>
57
+
58
+ #ifdef __cplusplus
59
+ extern "C" {
60
+ #endif
61
+
62
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
63
+ #pragma GCC visibility push(default)
64
+ #endif
65
+
66
+ #ifndef CUPTI_PROFILER_STRUCT_SIZE
67
+ #define CUPTI_PROFILER_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
68
+ #endif
69
+
70
+ /* CUPTI PM sampling APIs */
71
+ /**
72
+ * \defgroup CUPTI_PM_SAMPLING_API CUPTI PM Sampling API
73
+ * Functions to enable, disable, start, stop, and decode PM sampling.
74
+ * @{
75
+ */
76
+ typedef struct CUpti_PmSampling_Object CUpti_PmSampling_Object;
77
+
78
+ typedef enum CUpti_PmSampling_TriggerMode
79
+ {
80
+ /// The trigger is based off of the SYSCLK frequency, note SYS frequency by default is variable.
81
+ /// the sample interval (set in the struct CUpti_PmSampling_SetConfig_Params) is in terms of clocks.
82
+ CUPTI_PM_SAMPLING_TRIGGER_MODE_GPU_SYSCLK_INTERVAL = 0,
83
+ /// The trigger is based off of a fixed frequency source.
84
+ /// The sample interval (set in the struct CUpti_PmSampling_SetConfig_Params) is in terms of nanoseconds.
85
+ /// Note: This trigger mode is not supported on Turing GPU architecture and GA100 GPU.
86
+ /// It is supported on Ampere GA10x and later GPU architectures.
87
+ CUPTI_PM_SAMPLING_TRIGGER_MODE_GPU_TIME_INTERVAL = 1,
88
+ CUPTI_PM_SAMPLING_TRIGGER_MODE_COUNT
89
+ } CUpti_PmSampling_TriggerMode;
90
+
91
+ typedef enum CUpti_PmSampling_DecodeStopReason
92
+ {
93
+ CUPTI_PM_SAMPLING_DECODE_STOP_REASON_OTHER = 0,
94
+ /// Counter data image is full.
95
+ CUPTI_PM_SAMPLING_DECODE_STOP_REASON_COUNTER_DATA_FULL,
96
+ /// All the records in the hardware buffer is decoded.
97
+ CUPTI_PM_SAMPLING_DECODE_STOP_REASON_END_OF_RECORDS,
98
+ CUPTI_PM_SAMPLING_DECODE_STOP_REASON_COUNT
99
+ } CUpti_PmSampling_DecodeStopReason;
100
+
101
+ typedef enum CUpti_PmSampling_HardwareBuffer_AppendMode
102
+ {
103
+ /// Keep the oldest records in the hardware buffer.
104
+ /// CUPTI will report error for overflow in case hardware buffer is getting filled up.
105
+ CUPTI_PM_SAMPLING_HARDWARE_BUFFER_APPEND_MODE_KEEP_OLDEST = 0,
106
+ /// Keep the latest records in the hardware buffer.
107
+ /// Note: This mode is not supported on Turing GPU architecture.
108
+ /// It is supported on Ampere and later GPU architectures.
109
+ CUPTI_PM_SAMPLING_HARDWARE_BUFFER_APPEND_MODE_KEEP_LATEST = 1
110
+ } CUpti_PmSampling_HardwareBuffer_AppendMode;
111
+
112
+ /**
113
+ * \brief Params for cuptiPmSamplingSetConfig
114
+ */
115
+ typedef struct CUpti_PmSampling_SetConfig_Params
116
+ {
117
+ /// [in] Size of the data structure.
118
+ size_t structSize;
119
+ /// [in] Set to NULL.
120
+ void* pPriv;
121
+ /// [in] PM sampling object.
122
+ CUpti_PmSampling_Object* pPmSamplingObject;
123
+ /// [in] Size of the config image.
124
+ size_t configSize;
125
+ /// [in] Config image.
126
+ const uint8_t* pConfig;
127
+ /// [in] The hardware buffer size in which raw PM sampling data
128
+ /// will be stored. These samples will be decoded to counter data
129
+ /// image with \ref cuptiPmSamplingDecodeData call.
130
+ size_t hardwareBufferSize;
131
+ /// [in] For the trigger mode `CUPTI_PM_SAMPLING_TRIGGER_MODE_GPU_SYSCLK_INTERVAL`, sampling interval
132
+ /// is the number of sys clock cycles. For the trigger mode `CUPTI_PM_SAMPLING_TRIGGER_MODE_GPU_TIME_INTERVAL`,
133
+ /// sampling interval is in nanoseconds.
134
+ uint64_t samplingInterval;
135
+ /// [in] Trigger mode.
136
+ /// Note: CUPTI_PM_SAMPLING_TRIGGER_MODE_GPU_TIME_INTERVAL is not supported in Turing and GA100.
137
+ /// Supported from GA10x onwards.
138
+ CUpti_PmSampling_TriggerMode triggerMode;
139
+ /// [in] Append mode for the records in hardware buffer.
140
+ /// For KEEP_OLDEST mode, all the records will be kept in the buffer and in case hardware buffer is getting filled up.
141
+ /// overflow will be set to 1 in \ref CUpti_PmSampling_DecodeData_Params. For KEEP_LATEST mode, the new records will
142
+ /// overwrite the oldest records in the buffer in case of filled buffer.
143
+ CUpti_PmSampling_HardwareBuffer_AppendMode hwBufferAppendMode;
144
+ } CUpti_PmSampling_SetConfig_Params;
145
+
146
+ #define CUpti_PmSampling_SetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_SetConfig_Params, hwBufferAppendMode)
147
+
148
+ /**
149
+ * \brief Set the configuration for PM sampling like sampling interval, maximum number of samples
150
+ * filled in HW buffer, trigger mode and the config image which has scheduling info for metric collection.
151
+ *
152
+ * \param pParams A pointer to \ref CUpti_PmSampling_SetConfig_Params
153
+ *
154
+ * \retval CUPTI_SUCCESS
155
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
156
+ * \retval CUPTI_ERROR_NOT_SUPPORTED for config image which require multiple passes for data collection
157
+ */
158
+ CUptiResult CUPTIAPI cuptiPmSamplingSetConfig(CUpti_PmSampling_SetConfig_Params* pParams);
159
+
160
+ /**
161
+ * \brief Params for cuptiPmSamplingEnable
162
+ */
163
+ typedef struct CUpti_PmSampling_Enable_Params
164
+ {
165
+ /// [in] Size of the data structure.
166
+ size_t structSize;
167
+ /// [in] Set to NULL.
168
+ void* pPriv;
169
+ /// [in] Device index.
170
+ size_t deviceIndex;
171
+ /// [out] PM sampling object.
172
+ CUpti_PmSampling_Object* pPmSamplingObject;
173
+ } CUpti_PmSampling_Enable_Params;
174
+
175
+ #define CUpti_PmSampling_Enable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_Enable_Params, pPmSamplingObject)
176
+
177
+ /**
178
+ * \brief Create a PM sampling object and enable PM sampling on the CUDA device.
179
+ *
180
+ * \param pParams A pointer to \ref CUpti_PmSampling_Enable_Params
181
+ *
182
+ * \retval CUPTI_SUCCESS
183
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
184
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY if memory allocation fails while creating the PM sampling object
185
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling is already enabled on the device
186
+ * \retval CUPTI_ERROR_INSUFFICIENT_PRIVILEGES if the user does not have sufficient privileges to perform the operation
187
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
188
+ */
189
+ CUptiResult CUPTIAPI cuptiPmSamplingEnable(CUpti_PmSampling_Enable_Params* pParams);
190
+
191
+ /**
192
+ * \brief Params for cuptiPmSamplingDisable
193
+ */
194
+ typedef struct CUpti_PmSampling_Disable_Params
195
+ {
196
+ /// [in] Size of the data structure.
197
+ size_t structSize;
198
+ /// [in] Set to NULL.
199
+ void* pPriv;
200
+ /// [in] PM sampling object.
201
+ CUpti_PmSampling_Object* pPmSamplingObject;
202
+ } CUpti_PmSampling_Disable_Params;
203
+
204
+ #define CUpti_PmSampling_Disable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_Disable_Params, pPmSamplingObject)
205
+
206
+ /**
207
+ * \brief Disable PM sampling on the CUDA device and destroy the PM sampling object.
208
+ *
209
+ * \param pParams A pointer to \ref CUpti_PmSampling_Disable_Params
210
+ *
211
+ * \retval CUPTI_SUCCESS
212
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
213
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
214
+ */
215
+ CUptiResult CUPTIAPI cuptiPmSamplingDisable(CUpti_PmSampling_Disable_Params* pParams);
216
+
217
+ /**
218
+ * \brief Params for cuptiPmSamplingStart
219
+ */
220
+ typedef struct CUpti_PmSampling_Start_Params
221
+ {
222
+ /// [in] Size of the data structure.
223
+ size_t structSize;
224
+ /// [in] Set to NULL.
225
+ void* pPriv;
226
+ /// [in] PM sampling object.
227
+ CUpti_PmSampling_Object* pPmSamplingObject;
228
+ } CUpti_PmSampling_Start_Params;
229
+
230
+ #define CUpti_PmSampling_Start_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_Start_Params, pPmSamplingObject)
231
+
232
+ /**
233
+ * \brief Start the PM sampling. The GPU will start collecting the metrics data
234
+ * periodically based on trigger type and sampling interval passed in CUpti_PmSampling_SetConfig_Params.
235
+ * The collected data will be stored in the hardware buffer.
236
+ *
237
+ * \param pParams A pointer to \ref CUpti_PmSampling_Start_Params
238
+ *
239
+ * \retval CUPTI_SUCCESS
240
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
241
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling Start is called without enabling PM sampling,
242
+ * and PM sampling is already started
243
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
244
+ */
245
+ CUptiResult CUPTIAPI cuptiPmSamplingStart(CUpti_PmSampling_Start_Params* pParams);
246
+
247
+ /**
248
+ * \brief Params for cuptiPmSamplingStop
249
+ */
250
+ typedef struct CUpti_PmSampling_Stop_Params
251
+ {
252
+ /// [in] Size of the data structure.
253
+ size_t structSize;
254
+ /// [in] Set to NULL.
255
+ void* pPriv;
256
+ /// [in] PM sampling object.
257
+ CUpti_PmSampling_Object* pPmSamplingObject;
258
+ } CUpti_PmSampling_Stop_Params;
259
+
260
+ #define CUpti_PmSampling_Stop_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_Stop_Params, pPmSamplingObject)
261
+
262
+ /**
263
+ * \brief Stop the PM sampling. The GPU will stop collecting the metrics data.
264
+ *
265
+ * \param pParams A pointer to \ref CUpti_PmSampling_Stop_Params
266
+ *
267
+ * \retval CUPTI_SUCCESS
268
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
269
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling Stop is called without enabling PM sampling,
270
+ * and PM sampling is already stopped
271
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
272
+ */
273
+ CUptiResult CUPTIAPI cuptiPmSamplingStop(CUpti_PmSampling_Stop_Params* pParams);
274
+
275
+ /**
276
+ * \brief Params for cuptiPmSamplingDecodeData
277
+ */
278
+ typedef struct CUpti_PmSampling_DecodeData_Params
279
+ {
280
+ /// [in] Size of the data structure.
281
+ size_t structSize;
282
+ /// [in] Set to NULL.
283
+ void* pPriv;
284
+ /// [in] PM sampling object.
285
+ CUpti_PmSampling_Object* pPmSamplingObject;
286
+ /// [in] Counter data image.
287
+ uint8_t* pCounterDataImage;
288
+ /// [in] Size of the counter data image.
289
+ size_t counterDataImageSize;
290
+ /// [out] decode stop reason
291
+ CUpti_PmSampling_DecodeStopReason decodeStopReason;
292
+ /// [out] overflow status for hardware buffer.
293
+ /// To avoid overflow, either increase the maxSamples values in
294
+ /// \ref CUpti_PmSampling_SetConfig_Params or reduce the sampling interval.
295
+ uint8_t overflow;
296
+ } CUpti_PmSampling_DecodeData_Params;
297
+
298
+ #define CUpti_PmSampling_DecodeData_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_DecodeData_Params, overflow)
299
+
300
+ /**
301
+ * \brief Decode the metrics data stored in the hardware buffer to the counter data image.
302
+ *
303
+ *
304
+ * \param pParams A pointer to \ref CUpti_PmSampling_DecodeData_Params
305
+ *
306
+ * \retval CUPTI_SUCCESS
307
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
308
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling DecodeData is called without enabling PM sampling
309
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY if there is record overflow in the hardware buffer
310
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
311
+ */
312
+ CUptiResult CUPTIAPI cuptiPmSamplingDecodeData(CUpti_PmSampling_DecodeData_Params* pParams);
313
+
314
+ /**
315
+ * \brief Params for cuptiPmSamplingGetCounterData
316
+ */
317
+ typedef struct CUpti_PmSampling_GetCounterAvailability_Params
318
+ {
319
+ /// [in] Size of the data structure.
320
+ size_t structSize;
321
+ /// [in] Set to NULL.
322
+ void* pPriv;
323
+ /// [in] Device index.
324
+ size_t deviceIndex;
325
+ /// [inout] Size of the counter availability image. When pCounterAvailabilityImage is NULL,
326
+ /// this field is used to return the size of the counter availability image.
327
+ size_t counterAvailabilityImageSize;
328
+ /// [out] Counter availability image.
329
+ uint8_t* pCounterAvailabilityImage;
330
+ } CUpti_PmSampling_GetCounterAvailability_Params;
331
+ #define CUpti_PmSampling_GetCounterAvailability_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_GetCounterAvailability_Params, pCounterAvailabilityImage)
332
+
333
+ /**
334
+ * \brief Query counter availibility information in a buffer which can be used to filter unavailable raw metrics on host.
335
+ * Note: This API may fail, if any profiling or sampling session is active on the specified device.
336
+ *
337
+ * \param pParams A pointer to \ref CUpti_PmSampling_GetCounterAvailability_Params
338
+ *
339
+ * \retval CUPTI_SUCCESS
340
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
341
+ * \retval CUPTI_ERROR_INSUFFICIENT_PRIVILEGES if the user does not have sufficient privileges to perform the operation
342
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
343
+ */
344
+ CUptiResult CUPTIAPI cuptiPmSamplingGetCounterAvailability(CUpti_PmSampling_GetCounterAvailability_Params* pParams);
345
+
346
+ /**
347
+ * \brief Params for cuptiPmSamplingGetCounterDataSize
348
+ */
349
+ typedef struct CUpti_PmSampling_GetCounterDataSize_Params
350
+ {
351
+ /// [in] Size of the data structure.
352
+ size_t structSize;
353
+ /// [in] Set to NULL.
354
+ void* pPriv;
355
+ /// [in] PM sampling object.
356
+ CUpti_PmSampling_Object* pPmSamplingObject;
357
+ /// [in] Names of the metrics to be collected.
358
+ const char** pMetricNames;
359
+ /// [in] Number of metrics to be collected.
360
+ size_t numMetrics;
361
+ /// [in] Maximum number of samples to be stored in the counter data image.
362
+ uint32_t maxSamples;
363
+ /// [out] Size of the counter data image.
364
+ size_t counterDataSize;
365
+ } CUpti_PmSampling_GetCounterDataSize_Params;
366
+ #define CUpti_PmSampling_GetCounterDataSize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_GetCounterDataSize_Params, counterDataSize)
367
+
368
+ /**
369
+ * \brief Query the size of the counter data image which will be used to store the metrics data.
370
+ * User need to allocate the memory for the counter data image based on the size returned by this API.
371
+ *
372
+ * \param pParams A pointer to \ref CUpti_PmSampling_GetCounterDataSize_Params
373
+ *
374
+ * \retval CUPTI_SUCCESS
375
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
376
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling GetCounterDataSize is called without enabling PM sampling
377
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
378
+ */
379
+ CUptiResult CUPTIAPI cuptiPmSamplingGetCounterDataSize(CUpti_PmSampling_GetCounterDataSize_Params* pParams);
380
+
381
+ /**
382
+ * \brief Params for cuptiPmSamplingCounterDataImageInitialize
383
+ */
384
+ typedef struct CUpti_PmSampling_CounterDataImage_Initialize_Params
385
+ {
386
+ /// [in] Size of the data structure.
387
+ size_t structSize;
388
+ /// [in] Set to NULL.
389
+ void* pPriv;
390
+ /// [in] PM sampling object.
391
+ CUpti_PmSampling_Object* pPmSamplingObject;
392
+ /// [in] Size of the counter data image.
393
+ size_t counterDataSize;
394
+ /// [in] Counter data image.
395
+ uint8_t* pCounterData;
396
+ } CUpti_PmSampling_CounterDataImage_Initialize_Params;
397
+ #define CUpti_PmSampling_CounterDataImage_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_CounterDataImage_Initialize_Params, pCounterData)
398
+
399
+ /**
400
+ * \brief Initialize the counter data to CUPTI record format for storing the metric data.
401
+ *
402
+ * \param pParams A pointer to \ref CUpti_PmSampling_CounterDataImage_Initialize_Params
403
+ *
404
+ * \retval CUPTI_SUCCESS
405
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
406
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling CounterDataInitialize is called without enabling PM sampling
407
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
408
+ */
409
+ CUptiResult CUPTIAPI cuptiPmSamplingCounterDataImageInitialize(CUpti_PmSampling_CounterDataImage_Initialize_Params* pParams);
410
+
411
+ /**
412
+ * \brief Params for cuptiPmSamplingGetCounterDataInfo
413
+ */
414
+ typedef struct CUpti_PmSampling_GetCounterDataInfo_Params
415
+ {
416
+ /// [in] Size of the data structure.
417
+ size_t structSize;
418
+ /// [in] Set to NULL.
419
+ void* pPriv;
420
+ /// [in] Counter data image.
421
+ const uint8_t* pCounterDataImage;
422
+ /// [in] Size of the counter data image.
423
+ size_t counterDataImageSize;
424
+ /// [out] Number of samples in the counter data image.
425
+ size_t numTotalSamples;
426
+ /// [out] Number of populated samples.
427
+ size_t numPopulatedSamples;
428
+ /// [out] Number of samples that have been completed.
429
+ size_t numCompletedSamples;
430
+ } CUpti_PmSampling_GetCounterDataInfo_Params;
431
+ #define CUpti_PmSampling_GetCounterDataInfo_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_GetCounterDataInfo_Params, numCompletedSamples)
432
+
433
+ /**
434
+ * \brief Get the counter data info like number of samples, number of populated
435
+ * samples and number of completed samples in a counter data image.
436
+ *
437
+ * \param pParams A pointer to \ref CUpti_PmSampling_GetCounterDataInfo_Params
438
+ *
439
+ * \retval CUPTI_SUCCESS
440
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
441
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
442
+ */
443
+ CUptiResult CUPTIAPI cuptiPmSamplingGetCounterDataInfo(CUpti_PmSampling_GetCounterDataInfo_Params* pParams);
444
+
445
+ /**
446
+ * \brief Params for cuptiPmSamplingCounterDataGetSampleInfo
447
+ */
448
+ typedef struct CUpti_PmSampling_CounterData_GetSampleInfo_Params
449
+ {
450
+ /// [in] Size of the data structure.
451
+ size_t structSize;
452
+ /// [in] Set to NULL.
453
+ void* pPriv;
454
+ /// [in] PM sampling object.
455
+ CUpti_PmSampling_Object* pPmSamplingObject;
456
+ /// [in] Counter data image.
457
+ const uint8_t* pCounterDataImage;
458
+ /// [in] Size of the counter data image.
459
+ size_t counterDataImageSize;
460
+ /// [in] Index of the sample.
461
+ size_t sampleIndex;
462
+ /// [out] Start time of the sample.
463
+ uint64_t startTimestamp;
464
+ /// [out] End time of the sample.
465
+ uint64_t endTimestamp;
466
+ } CUpti_PmSampling_CounterData_GetSampleInfo_Params;
467
+ #define CUpti_PmSampling_CounterData_GetSampleInfo_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_CounterData_GetSampleInfo_Params, endTimestamp)
468
+
469
+ /**
470
+ * \brief Get the sample info (start and end time stamp) for the given sample index.
471
+ * Each sample is distinguished by the start and end time stamp.
472
+ *
473
+ * \param pParams A pointer to \ref CUpti_PmSampling_CounterData_GetSampleInfo_Params
474
+ *
475
+ * \retval CUPTI_SUCCESS
476
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
477
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
478
+ */
479
+ CUptiResult CUPTIAPI cuptiPmSamplingCounterDataGetSampleInfo(CUpti_PmSampling_CounterData_GetSampleInfo_Params* pParams);
480
+
481
+ /** @} */ /* END CUPTI_PMSAMPLING_API */
482
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
483
+ #pragma GCC visibility pop
484
+ #endif
485
+
486
+ #ifdef __cplusplus
487
+ } /* extern "C" */
488
+ #endif
489
+
490
+ #endif // _CUPTI_PMSAMPLING_H_
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_profiler_host.h ADDED
@@ -0,0 +1,541 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2024 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(_CUPTI_PROFILER_HOST_H_)
51
+ #define _CUPTI_PROFILER_HOST_H_
52
+
53
+ /*
54
+ CUPTI profiler host API's
55
+ This file contains the CUPTI profiling host API's.
56
+ */
57
+ #include <cupti_result.h>
58
+ #include <stdint.h>
59
+ #include <stddef.h>
60
+ #include <string>
61
+
62
+ #ifdef __cplusplus
63
+ extern "C" {
64
+ #endif
65
+
66
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
67
+ #pragma GCC visibility push(default)
68
+ #endif
69
+
70
+ /**
71
+ * \defgroup CUPTI_PROFILER_HOST_API CUPTI Profiler Host API
72
+ * Functions, types, and enums that implement the CUPTI Profiler Host API.
73
+ * @{
74
+ */
75
+ #ifndef CUPTI_PROFILER_STRUCT_SIZE
76
+ #define CUPTI_PROFILER_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
77
+ #endif
78
+
79
+ typedef enum CUpti_MetricType
80
+ {
81
+ CUPTI_METRIC_TYPE_COUNTER = 0,
82
+ CUPTI_METRIC_TYPE_RATIO,
83
+ CUPTI_METRIC_TYPE_THROUGHPUT,
84
+ CUPTI_METRIC_TYPE__COUNT
85
+ } CUpti_MetricType;
86
+
87
+ typedef enum CUpti_ProfilerType
88
+ {
89
+ CUPTI_PROFILER_TYPE_RANGE_PROFILER,
90
+ CUPTI_PROFILER_TYPE_PM_SAMPLING,
91
+ CUPTI_PROFILER_TYPE_PROFILER_INVALID
92
+ } CUpti_ProfilerType;
93
+
94
+ typedef struct CUpti_Profiler_Host_Object CUpti_Profiler_Host_Object;
95
+
96
+ /**
97
+ * \brief Params for cuptiProfilerHostInitialize
98
+ */
99
+ typedef struct CUpti_Profiler_Host_Initialize_Params
100
+ {
101
+ /// [in] Size of the data structure.
102
+ /// CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
103
+ /// available in the structure. Used to preserve backward compatibility.
104
+ size_t structSize;
105
+ /// [in] Assign to NULL
106
+ void* pPriv;
107
+ /// [in] the profiler kind one from CUpti_ProfilerType
108
+ CUpti_ProfilerType profilerType;
109
+ /// [in] accepted for chips supported at the time-of-release.
110
+ const char* pChipName;
111
+ /// [in] buffer with counter availability image - required for future chip support
112
+ const uint8_t* pCounterAvailabilityImage;
113
+ /// [out] binary blob allocated by CUPTI and operations associated with this object.
114
+ CUpti_Profiler_Host_Object* pHostObject;
115
+ } CUpti_Profiler_Host_Initialize_Params;
116
+
117
+ #define CUpti_Profiler_Host_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_Initialize_Params, pHostObject)
118
+
119
+ /**
120
+ * \brief Create and initialize the profiler host object (CUpti_Profiler_Host_Object).
121
+ *
122
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_Initialize_Params
123
+ *
124
+ * \retval CUPTI_SUCCESS
125
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
126
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
127
+ */
128
+ CUptiResult CUPTIAPI cuptiProfilerHostInitialize(CUpti_Profiler_Host_Initialize_Params* pParams);
129
+
130
+ /**
131
+ * \brief Params for cuptiProfilerHostDeinitialize
132
+ */
133
+ typedef struct CUpti_Profiler_Host_Deinitialize_Params
134
+ {
135
+ /// [in] Size of the data structure.
136
+ /// CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
137
+ /// available in the structure. Used to preserve backward compatibility.
138
+ size_t structSize;
139
+ /// [in] Assign to NULL
140
+ void* pPriv;
141
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
142
+ struct CUpti_Profiler_Host_Object* pHostObject;
143
+ } CUpti_Profiler_Host_Deinitialize_Params;
144
+
145
+ #define CUpti_Profiler_Host_Deinitialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_Deinitialize_Params, pHostObject)
146
+
147
+ /**
148
+ * \brief Deinitialize and destroy the profiler host object (CUpti_Profiler_Host_Object).
149
+ *
150
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_Deinitialize_Params
151
+ *
152
+ * \retval CUPTI_SUCCESS
153
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
154
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
155
+ */
156
+ CUptiResult CUPTIAPI cuptiProfilerHostDeinitialize(CUpti_Profiler_Host_Deinitialize_Params* pParams);
157
+
158
+ /**
159
+ * \brief Params for cuptiProfilerHostGetSupportedChips
160
+ */
161
+ typedef struct CUpti_Profiler_Host_GetSupportedChips_Params
162
+ {
163
+ /// [in] Size of the data structure.
164
+ size_t structSize;
165
+ /// [in] Assign to NULL
166
+ void* pPriv;
167
+ /// [out] number of supported chips
168
+ size_t numChips;
169
+ /// [out] list of supported chips
170
+ const char* const* ppChipNames;
171
+ } CUpti_Profiler_Host_GetSupportedChips_Params;
172
+
173
+ #define CUpti_Profiler_Host_GetSupportedChips_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetSupportedChips_Params, ppChipNames)
174
+
175
+ /**
176
+ * \brief Get the list of supported chips.
177
+ *
178
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetSupportedChips_Params
179
+ *
180
+ * \retval CUPTI_SUCCESS
181
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
182
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
183
+ */
184
+ CUptiResult CUPTIAPI cuptiProfilerHostGetSupportedChips(CUpti_Profiler_Host_GetSupportedChips_Params* pParams);
185
+
186
+ /**
187
+ * \brief Params for cuptiProfilerHostGetSupportedMetrics
188
+ */
189
+ typedef struct CUpti_Profiler_Host_GetBaseMetrics_Params
190
+ {
191
+ /// [in] Size of the data structure.
192
+ size_t structSize;
193
+ /// [in] Assign to NULL
194
+ void* pPriv;
195
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
196
+ struct CUpti_Profiler_Host_Object* pHostObject;
197
+ /// [in] metric type (counter, ratio, throughput)
198
+ CUpti_MetricType metricType;
199
+ /// [out] list of base metrics supported of queried metric type for the chip
200
+ const char** ppMetricNames;
201
+ /// [out] number of metrics
202
+ size_t numMetrics;
203
+ } CUpti_Profiler_Host_GetBaseMetrics_Params;
204
+
205
+ #define CUpti_Profiler_Host_GetBaseMetrics_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetBaseMetrics_Params, numMetrics)
206
+
207
+ /**
208
+ * \brief Get the list of supported base metrics for the chip.
209
+ *
210
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetBaseMetrics_Params
211
+ *
212
+ * \retval CUPTI_SUCCESS
213
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
214
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
215
+ */
216
+ CUptiResult CUPTIAPI cuptiProfilerHostGetBaseMetrics(CUpti_Profiler_Host_GetBaseMetrics_Params* pParams);
217
+
218
+ /**
219
+ * \brief Params for cuptiProfilerHostGetSubMetrics
220
+ */
221
+ typedef struct CUpti_Profiler_Host_GetSubMetrics_Params
222
+ {
223
+ /// [in] Size of the data structure.
224
+ size_t structSize;
225
+ /// [in] Assign to NULL
226
+ void* pPriv;
227
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
228
+ CUpti_Profiler_Host_Object* pHostObject;
229
+ /// [in] the metric type for queried metric
230
+ CUpti_MetricType metricType;
231
+ /// [in] metric name for which sub-metric will be listed
232
+ const char* pMetricName;
233
+ /// [out] number of submetrics supported
234
+ size_t numOfSubmetrics;
235
+ /// [out] list of submetrics supported for the metric.
236
+ const char** ppSubMetrics;
237
+ } CUpti_Profiler_Host_GetSubMetrics_Params;
238
+
239
+ #define CUpti_Profiler_Host_GetSubMetrics_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetSubMetrics_Params, ppSubMetrics)
240
+
241
+ /**
242
+ * \brief Get the list of supported sub-metrics for the metric.
243
+ *
244
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetSubMetrics_Params
245
+ *
246
+ * \retval CUPTI_SUCCESS
247
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
248
+ * \retval CUPTI_ERROR_INVALID_METRIC_NAME if the metric name is not valid or not supported for the chip
249
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
250
+ */
251
+ CUptiResult CUPTIAPI cuptiProfilerHostGetSubMetrics(CUpti_Profiler_Host_GetSubMetrics_Params* pParams);
252
+
253
+ /**
254
+ * \brief Params for cuptiProfilerHostGetMetricProperties
255
+ */
256
+ typedef struct CUpti_Profiler_Host_GetMetricProperties_Params
257
+ {
258
+ /// [in] Size of the data structure.
259
+ size_t structSize;
260
+ /// [in] Assign to NULL
261
+ void* pPriv;
262
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
263
+ CUpti_Profiler_Host_Object* pHostObject;
264
+ /// [in] metric name for which its properties will be listed
265
+ const char* pMetricName;
266
+ /// [out] a short description about the metric
267
+ const char* pDescription;
268
+ /// [out] associated hw unit for the metric
269
+ const char* pHwUnit;
270
+ /// [out] the dimension of the metric values
271
+ const char* pDimUnit;
272
+ /// [out] the metric type (counter, ratio or throughput)
273
+ CUpti_MetricType metricType;
274
+ } CUpti_Profiler_Host_GetMetricProperties_Params;
275
+
276
+ #define CUpti_Profiler_Host_GetMetricProperties_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetMetricProperties_Params, metricType)
277
+
278
+ /**
279
+ * \brief Get the properties of the metric.
280
+ *
281
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetMetricProperties_Params
282
+ *
283
+ * \retval CUPTI_SUCCESS
284
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
285
+ * \retval CUPTI_ERROR_INVALID_METRIC_NAME if the metric name is not valid or not supported for the chip
286
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
287
+ */
288
+ CUptiResult CUPTIAPI cuptiProfilerHostGetMetricProperties(CUpti_Profiler_Host_GetMetricProperties_Params* pParams);
289
+
290
+ /**
291
+ * \brief Params for cuptiProfilerHostGetRangeName
292
+ */
293
+ typedef struct CUpti_Profiler_Host_GetRangeName_Params
294
+ {
295
+ /// [in] Size of the data structure.
296
+ size_t structSize;
297
+ /// [in] Assign to NULL
298
+ void* pPriv;
299
+ /// [in] the counter data image where profiling data has been decoded
300
+ const uint8_t* pCounterDataImage;
301
+ /// [in] size of counter data image
302
+ size_t counterDataImageSize;
303
+ /// [in] range index for which the range name will be queried
304
+ size_t rangeIndex;
305
+ /// [in] used in case of nested ranges, default="/". Range1<delimiter>Range2
306
+ const char* delimiter;
307
+ /// [out] the range name.
308
+ /// Note: that the CUPTI allocate the memory internal and
309
+ /// its user responsibility to free up the allocated memory
310
+ const char* pRangeName;
311
+ } CUpti_Profiler_Host_GetRangeName_Params;
312
+
313
+ #define CUpti_Profiler_Host_GetRangeName_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetRangeName_Params, pRangeName)
314
+
315
+ /**
316
+ * \brief Get the range name for the range index stored in the counter data.
317
+ * In Range profiler, for Auto range mode the range name will be numeric value
318
+ * assigned to the kernel based on execution order. For user range mode, the
319
+ * name of range will be based on the range name provided by the user using
320
+ * Push range API.
321
+ *
322
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetRangeName_Params
323
+ *
324
+ * \retval CUPTI_SUCCESS
325
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
326
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
327
+ */
328
+ CUptiResult CUPTIAPI cuptiProfilerHostGetRangeName(CUpti_Profiler_Host_GetRangeName_Params* pParams);
329
+
330
+ /**
331
+ * \brief Params for cuptiProfilerHostEvaluateToGpuValues
332
+ */
333
+ typedef struct CUpti_Profiler_Host_EvaluateToGpuValues_Params
334
+ {
335
+ /// [in] Size of the data structure.
336
+ size_t structSize;
337
+ /// [in] Assign to NULL
338
+ void* pPriv;
339
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
340
+ CUpti_Profiler_Host_Object* pHostObject;
341
+ /// [in] the counter data image where profiling data has been decoded
342
+ const uint8_t* pCounterDataImage;
343
+ /// [in] size of counter data image
344
+ size_t counterDataImageSize;
345
+ /// [in] range index for which the range name will be queried
346
+ size_t rangeIndex;
347
+ /// [in] the metrics for which GPU values will be evaluated for the range
348
+ const char** ppMetricNames;
349
+ /// [in] number of metrics
350
+ size_t numMetrics;
351
+ /// [out] output value for given metric and range index
352
+ double* pMetricValues;
353
+ } CUpti_Profiler_Host_EvaluateToGpuValues_Params;
354
+
355
+ #define CUpti_Profiler_Host_EvaluateToGpuValues_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_EvaluateToGpuValues_Params, pMetricValues)
356
+
357
+ /**
358
+ * \brief Evaluate the metric values for the range index stored in the counter data.
359
+ *
360
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_EvaluateToGpuValues_Params
361
+ *
362
+ * \retval CUPTI_SUCCESS
363
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
364
+ * \retval CUPTI_ERROR_INVALID_METRIC_NAME if the metric name is not valid or not supported for the chip
365
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
366
+ */
367
+ CUptiResult CUPTIAPI cuptiProfilerHostEvaluateToGpuValues(CUpti_Profiler_Host_EvaluateToGpuValues_Params* pParams);
368
+
369
+ /**
370
+ * \brief Params for cuptiProfilerHostConfigAddMetrics
371
+ */
372
+ typedef struct CUpti_Profiler_Host_ConfigAddMetrics_Params
373
+ {
374
+ /// [in] Size of the data structure.
375
+ size_t structSize;
376
+ /// [in] Assign to NULL
377
+ void* pPriv;
378
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
379
+ struct CUpti_Profiler_Host_Object* pHostObject;
380
+ /// [in] metric names for which config image will be generated
381
+ const char** ppMetricNames;
382
+ /// [in] number of metrics
383
+ size_t numMetrics;
384
+ } CUpti_Profiler_Host_ConfigAddMetrics_Params;
385
+
386
+ #define CUpti_Profiler_Host_ConfigAddMetrics_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_ConfigAddMetrics_Params, numMetrics)
387
+
388
+ /**
389
+ * \brief Add the metrics to the profiler host object for generating the config image.
390
+ * The config image will have the required information to schedule the metrics for
391
+ * collecting the profiling data.
392
+ * Note: PM sampling only supports single pass config image.
393
+ *
394
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_ConfigAddMetrics_Params
395
+ *
396
+ * \retval CUPTI_SUCCESS
397
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
398
+ * \retval CUPTI_ERROR_INVALID_METRIC_NAME if the metric name is not valid or not supported for the chip
399
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
400
+ */
401
+ CUptiResult CUPTIAPI cuptiProfilerHostConfigAddMetrics(CUpti_Profiler_Host_ConfigAddMetrics_Params* pParams);
402
+
403
+ /**
404
+ * \brief Params for cuptiProfilerHostGetConfigImageSize
405
+ */
406
+ typedef struct CUpti_Profiler_Host_GetConfigImageSize_Params
407
+ {
408
+ /// [in] Size of the data structure.
409
+ size_t structSize;
410
+ /// [in] Assign to NULL
411
+ void* pPriv;
412
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
413
+ CUpti_Profiler_Host_Object* pHostObject;
414
+ /// [out] the size of config image, users need to allocate the buffer for storing
415
+ size_t configImageSize;
416
+ } CUpti_Profiler_Host_GetConfigImageSize_Params;
417
+
418
+ #define CUpti_Profiler_Host_GetConfigImageSize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetConfigImageSize_Params, configImageSize)
419
+
420
+ /**
421
+ * \brief Get the size of the config image for the metrics added to the profiler host object.
422
+ * Users need to allocate the buffer for storing the config image.
423
+ *
424
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetConfigImageSize_Params
425
+ *
426
+ * \retval CUPTI_SUCCESS
427
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
428
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
429
+ */
430
+ CUptiResult CUPTIAPI cuptiProfilerHostGetConfigImageSize(CUpti_Profiler_Host_GetConfigImageSize_Params* pParams);
431
+
432
+ /**
433
+ * \brief Params for cuptiProfilerHostGetConfigImage
434
+ */
435
+ typedef struct CUpti_Profiler_Host_GetConfigImage_Params
436
+ {
437
+ /// [in] Size of the data structure.
438
+ size_t structSize;
439
+ /// [in] Assign to NULL
440
+ void* pPriv;
441
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
442
+ CUpti_Profiler_Host_Object* pHostObject;
443
+ /// [in] Number of bytes allocated for pBuffer
444
+ size_t configImageSize;
445
+ /// [out] Buffer receiving the config image
446
+ uint8_t* pConfigImage;
447
+ } CUpti_Profiler_Host_GetConfigImage_Params;
448
+
449
+ #define CUpti_Profiler_Host_GetConfigImage_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetConfigImage_Params, pConfigImage)
450
+
451
+ /**
452
+ * \brief Get the config image for the metrics added to the profiler host object.
453
+ * User will pass the allocated buffer to store the config image.
454
+ *
455
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetConfigImage_Params
456
+ *
457
+ * \retval CUPTI_SUCCESS
458
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
459
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
460
+ */
461
+ CUptiResult CUPTIAPI cuptiProfilerHostGetConfigImage(CUpti_Profiler_Host_GetConfigImage_Params* pParams);
462
+
463
+ /**
464
+ * \brief Params for cuptiProfilerHostGetNumOfPasses
465
+ */
466
+ typedef struct CUpti_Profiler_Host_GetNumOfPasses_Params
467
+ {
468
+ /// [in] Size of the data structure.
469
+ size_t structSize;
470
+ /// [in] Assign to NULL
471
+ void* pPriv;
472
+ /// [in] Number of bytes allocated for pConfigImage
473
+ size_t configImageSize;
474
+ /// [in] the config image buffer
475
+ uint8_t* pConfigImage;
476
+ /// [out] number of passes required for profiling scheduled metrics in the config image
477
+ size_t numOfPasses;
478
+ } CUpti_Profiler_Host_GetNumOfPasses_Params;
479
+
480
+ #define CUpti_Profiler_Host_GetNumOfPasses_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetNumOfPasses_Params, numOfPasses)
481
+
482
+ /**
483
+ * \brief Get the number of passes required for profiling the scheduled metrics in the config image.
484
+ *
485
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetNumOfPasses_Params
486
+ *
487
+ * \retval CUPTI_SUCCESS
488
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
489
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
490
+ */
491
+ CUptiResult CUPTIAPI cuptiProfilerHostGetNumOfPasses(CUpti_Profiler_Host_GetNumOfPasses_Params* pParams);
492
+
493
+ /**
494
+ * \brief Params for cuptiProfilerHostGetMaxNumHardwareMetricsPerPass
495
+ */
496
+ typedef struct CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params
497
+ {
498
+ /// [in] Size of the data structure.
499
+ size_t structSize;
500
+ /// [in] Assign to NULL
501
+ void* pPriv;
502
+ /// [in] the profiler kind one from CUpti_ProfilerType
503
+ CUpti_ProfilerType profilerType;
504
+ /// [in] accepted for chips supported at the time-of-release.
505
+ const char* pChipName;
506
+ /// [in] buffer with counter availability image - required for future chip support
507
+ uint8_t* pCounterAvailabilityImage;
508
+ /// [out] maximum number of metrics that can be scheduled in a pass
509
+ size_t maxMetricsPerPass;
510
+ } CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params;
511
+
512
+ #define CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params, maxMetricsPerPass)
513
+
514
+ /**
515
+ * \brief Get the maximum number of hardware metrics (metric names which doesn't include _sass_ keyword)
516
+ * that can be scheduled in a single pass for a chip. While this represents a theoretical upper limit,
517
+ * practical constraints may prevent reaching this threshold for a specific set of metrics. Furthermore,
518
+ * the maximum achievable value is contingent upon the characteristics and architecture of the chip in question.
519
+ *
520
+ * Use cuptiProfilerHostGetNumOfPasses API for getting the actual number of passes required for the
521
+ * for collecting the profiling data for the scheduled metrics in a config image.
522
+ *
523
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params
524
+ *
525
+ * \retval CUPTI_SUCCESS
526
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
527
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
528
+ */
529
+ CUptiResult CUPTIAPI cuptiProfilerHostGetMaxNumHardwareMetricsPerPass(CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params* pParams);
530
+
531
+ /** @} */ /* END CUPTI_METRIC_API */
532
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
533
+ #pragma GCC visibility pop
534
+ #endif
535
+
536
+
537
+ #ifdef __cplusplus
538
+ } /* extern "C" */
539
+ #endif
540
+
541
+ #endif
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_profiler_target.h ADDED
@@ -0,0 +1,602 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2011-2023 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(_CUPTI_PROFILER_TARGET_H_)
51
+ #define _CUPTI_PROFILER_TARGET_H_
52
+
53
+ #include <cuda.h>
54
+ #include <cupti_result.h>
55
+ #include <stddef.h>
56
+ #include <stdint.h>
57
+
58
+ #ifdef __cplusplus
59
+ extern "C" {
60
+ #endif
61
+
62
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
63
+ #pragma GCC visibility push(default)
64
+ #endif
65
+
66
+ /**
67
+ * \defgroup CUPTI_PROFILER_API CUPTI Profiling API
68
+ * Functions, types, and enums that implement the CUPTI Profiling API.
69
+ * @{
70
+ */
71
+ #ifndef CUPTI_PROFILER_STRUCT_SIZE
72
+ #define CUPTI_PROFILER_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
73
+ #endif
74
+
75
+ /**
76
+ * \brief Profiler range attribute
77
+ *
78
+ * A metric enabled in the session's configuration is collected separately per unique range-stack in the pass.
79
+ * This is an attribute to collect metrics around each kernel in a profiling session or in an user defined range.
80
+ */
81
+ typedef enum
82
+ {
83
+ /**
84
+ * Invalid value
85
+ */
86
+ CUPTI_Range_INVALID,
87
+ /**
88
+ * Ranges are auto defined around each kernel in a profiling session
89
+ */
90
+ CUPTI_AutoRange,
91
+ /**
92
+ * A range in which metric data to be collected is defined by the user
93
+ */
94
+ CUPTI_UserRange,
95
+ /**
96
+ * Range count
97
+ */
98
+ CUPTI_Range_COUNT,
99
+ } CUpti_ProfilerRange;
100
+
101
+ /**
102
+ * \brief Profiler replay attribute
103
+ *
104
+ * For metrics which require multipass collection, a replay of the GPU kernel(s) is required.
105
+ * This is an attribute which specify how the replay of the kernel(s) to be measured is done.
106
+ */
107
+ typedef enum
108
+ {
109
+ /**
110
+ * Invalid Value
111
+ */
112
+ CUPTI_Replay_INVALID,
113
+ /**
114
+ * Replay is done by CUPTI user around the process
115
+ */
116
+ CUPTI_ApplicationReplay,
117
+ /**
118
+ * Replay is done around kernel implicitly by CUPTI
119
+ */
120
+ CUPTI_KernelReplay,
121
+ /**
122
+ * Replay is done by CUPTI user within a process
123
+ */
124
+ CUPTI_UserReplay,
125
+ /**
126
+ * Replay count
127
+ */
128
+ CUPTI_Replay_COUNT,
129
+ } CUpti_ProfilerReplayMode;
130
+
131
+ /**
132
+ * \brief Default parameter for cuptiProfilerInitialize
133
+ */
134
+ typedef struct CUpti_Profiler_Initialize_Params
135
+ {
136
+ size_t structSize; //!< [in] CUpti_Profiler_Initialize_Params_STRUCT_SIZE
137
+ void* pPriv; //!< [in] assign to NULL
138
+
139
+ } CUpti_Profiler_Initialize_Params;
140
+ #define CUpti_Profiler_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Initialize_Params, pPriv)
141
+
142
+ /**
143
+ * \brief Default parameter for cuptiProfilerDeInitialize
144
+ */
145
+ typedef struct CUpti_Profiler_DeInitialize_Params
146
+ {
147
+ size_t structSize; //!< [in] CUpti_Profiler_DeInitialize_Params_STRUCT_SIZE
148
+ void* pPriv; //!< [in] assign to NULL
149
+
150
+ } CUpti_Profiler_DeInitialize_Params;
151
+ #define CUpti_Profiler_DeInitialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_DeInitialize_Params, pPriv)
152
+
153
+ /**
154
+ * \brief Initializes the profiler interface
155
+ *
156
+ * Loads the required libraries in the process address space.
157
+ * Sets up the hooks with the CUDA driver.
158
+ */
159
+ CUptiResult CUPTIAPI cuptiProfilerInitialize(CUpti_Profiler_Initialize_Params *pParams);
160
+
161
+ /**
162
+ * \brief DeInitializes the profiler interface
163
+ */
164
+ CUptiResult CUPTIAPI cuptiProfilerDeInitialize(CUpti_Profiler_DeInitialize_Params *pParams);
165
+
166
+ /**
167
+ * \brief Input parameter to define the counterDataImage
168
+ */
169
+ typedef struct CUpti_Profiler_CounterDataImageOptions
170
+ {
171
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImageOptions_Params_STRUCT_SIZE
172
+ void* pPriv; //!< [in] assign to NULL
173
+
174
+ const uint8_t* pCounterDataPrefix; /**< [in] Address of CounterDataPrefix generated from NVPW_CounterDataBuilder_GetCounterDataPrefix().
175
+ Must be align(8).*/
176
+ size_t counterDataPrefixSize; //!< [in] Size of CounterDataPrefix generated from NVPW_CounterDataBuilder_GetCounterDataPrefix().
177
+ uint32_t maxNumRanges; //!< [in] Maximum number of ranges that can be profiled
178
+ uint32_t maxNumRangeTreeNodes; //!< [in] Maximum number of RangeTree nodes; must be >= maxNumRanges
179
+ uint32_t maxRangeNameLength; //!< [in] Maximum string length of each RangeName, including the trailing NULL character
180
+ } CUpti_Profiler_CounterDataImageOptions;
181
+ #define CUpti_Profiler_CounterDataImageOptions_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImageOptions, maxRangeNameLength)
182
+
183
+ /**
184
+ * \brief Params for cuptiProfilerCounterDataImageCalculateSize
185
+ */
186
+ typedef struct CUpti_Profiler_CounterDataImage_CalculateSize_Params
187
+ {
188
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImage_CalculateSize_Params_STRUCT_SIZE
189
+ void* pPriv; //!< [in] assign to NULL
190
+
191
+ size_t sizeofCounterDataImageOptions; //!< [in] CUpti_Profiler_CounterDataImageOptions_STRUCT_SIZE
192
+ const CUpti_Profiler_CounterDataImageOptions* pOptions; //!< [in] Pointer to Counter Data Image Options
193
+ size_t counterDataImageSize; //!< [out]
194
+ } CUpti_Profiler_CounterDataImage_CalculateSize_Params;
195
+ #define CUpti_Profiler_CounterDataImage_CalculateSize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImage_CalculateSize_Params, counterDataImageSize)
196
+
197
+ /**
198
+ * \brief Params for cuptiProfilerCounterDataImageInitialize
199
+ */
200
+ typedef struct CUpti_Profiler_CounterDataImage_Initialize_Params
201
+ {
202
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImage_Initialize_Params_STRUCT_SIZE
203
+ void* pPriv; //!< [in] assign to NULL
204
+
205
+ size_t sizeofCounterDataImageOptions; //!< [in] CUpti_Profiler_CounterDataImageOptions_STRUCT_SIZE
206
+ const CUpti_Profiler_CounterDataImageOptions* pOptions; //!< [in] Pointer to Counter Data Image Options
207
+ size_t counterDataImageSize; //!< [in] Size calculated from cuptiProfilerCounterDataImageCalculateSize
208
+ uint8_t* pCounterDataImage; //!< [in] The buffer to be initialized.
209
+ } CUpti_Profiler_CounterDataImage_Initialize_Params;
210
+ #define CUpti_Profiler_CounterDataImage_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImage_Initialize_Params, pCounterDataImage)
211
+
212
+ /**
213
+ * \brief A CounterData image allocates space for values for each counter for each range.
214
+ *
215
+ * User borne the resposibility of managing the counterDataImage allocations.
216
+ * CounterDataPrefix contains meta data about the metrics that will be stored in counterDataImage.
217
+ * Use these APIs to calculate the allocation size and initialize counterData image.
218
+ */
219
+ CUptiResult CUPTIAPI cuptiProfilerCounterDataImageCalculateSize(CUpti_Profiler_CounterDataImage_CalculateSize_Params* pParams);
220
+ CUptiResult CUPTIAPI cuptiProfilerCounterDataImageInitialize(CUpti_Profiler_CounterDataImage_Initialize_Params* pParams);
221
+
222
+ /**
223
+ * \brief Params for cuptiProfilerCounterDataImageCalculateScratchBufferSize
224
+ */
225
+ typedef struct CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params
226
+ {
227
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params_STRUCT_SIZE
228
+ void* pPriv; //!< [in] assign to NULL
229
+
230
+ size_t counterDataImageSize; //!< [in] size calculated from cuptiProfilerCounterDataImageCalculateSize
231
+ uint8_t* pCounterDataImage; //!< [in]
232
+ size_t counterDataScratchBufferSize; //!< [out]
233
+ } CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params;
234
+ #define CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params, counterDataScratchBufferSize)
235
+
236
+ /**
237
+ * \brief Params for cuptiProfilerCounterDataImageInitializeScratchBuffer
238
+ */
239
+ typedef struct CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params
240
+ {
241
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params_STRUCT_SIZE
242
+ void* pPriv; //!< [in] assign to NULL
243
+
244
+ size_t counterDataImageSize; //!< [in] size calculated from cuptiProfilerCounterDataImageCalculateSize
245
+ uint8_t* pCounterDataImage; //!< [in]
246
+ size_t counterDataScratchBufferSize; //!< [in] size calculated using cuptiProfilerCounterDataImageCalculateScratchBufferSize
247
+ uint8_t* pCounterDataScratchBuffer; //!< [in] the scratch buffer to be initialized.
248
+ } CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params;
249
+ #define CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params, pCounterDataScratchBuffer)
250
+
251
+ /**
252
+ * \brief A temporary storage for CounterData image needed for internal operations
253
+ *
254
+ * Use these APIs to calculate the allocation size and initialize counterData image scratch buffer.
255
+ */
256
+ CUptiResult CUPTIAPI cuptiProfilerCounterDataImageCalculateScratchBufferSize(CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params* pParams);
257
+ CUptiResult CUPTIAPI cuptiProfilerCounterDataImageInitializeScratchBuffer(CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params* pParams);
258
+
259
+ /**
260
+ * \brief Params for cuptiProfilerBeginSession
261
+ */
262
+ typedef struct CUpti_Profiler_BeginSession_Params
263
+ {
264
+ size_t structSize; //!< [in] CUpti_Profiler_BeginSession_Params_STRUCT_SIZE
265
+ void* pPriv; //!< [in] assign to NULL
266
+
267
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
268
+ size_t counterDataImageSize; //!< [in] size calculated from cuptiProfilerCounterDataImageCalculateSize
269
+ uint8_t* pCounterDataImage; //!< [in] address of CounterDataImage
270
+ size_t counterDataScratchBufferSize; //!< [in] size calculated from cuptiProfilerCounterDataImageInitializeScratchBuffer
271
+ uint8_t* pCounterDataScratchBuffer; //!< [in] address of CounterDataImage scratch buffer
272
+ uint8_t bDumpCounterDataInFile; //!< [in] [optional]
273
+ const char* pCounterDataFilePath; //!< [in] [optional]
274
+ CUpti_ProfilerRange range; //!< [in] CUpti_ProfilerRange
275
+ CUpti_ProfilerReplayMode replayMode; //!< [in] CUpti_ProfilerReplayMode
276
+ /* Replay options, required when replay is done by cupti user */
277
+ size_t maxRangesPerPass; //!< [in] Maximum number of ranges that can be recorded in a single pass.
278
+ size_t maxLaunchesPerPass; //!< [in] Maximum number of kernel launches that can be recorded in a single pass; must be >= maxRangesPerPass.
279
+
280
+ } CUpti_Profiler_BeginSession_Params;
281
+ #define CUpti_Profiler_BeginSession_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_BeginSession_Params, maxLaunchesPerPass)
282
+ /**
283
+ * \brief Params for cuptiProfilerEndSession
284
+ */
285
+ typedef struct CUpti_Profiler_EndSession_Params
286
+ {
287
+ size_t structSize; //!< [in] CUpti_Profiler_EndSession_Params_STRUCT_SIZE
288
+ void* pPriv; //!< [in] assign to NULL
289
+
290
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
291
+ } CUpti_Profiler_EndSession_Params;
292
+ #define CUpti_Profiler_EndSession_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_EndSession_Params, ctx)
293
+
294
+ /**
295
+ * \brief Begin profiling session sets up the profiling on the device
296
+ *
297
+ * Although, it doesn't start the profiling but GPU resources needed for profiling are allocated.
298
+ * Outside of a session, the GPU will return to its normal operating state.
299
+ */
300
+ CUptiResult CUPTIAPI cuptiProfilerBeginSession(CUpti_Profiler_BeginSession_Params* pParams);
301
+ /**
302
+ * \brief Ends profiling session
303
+ *
304
+ * Frees up the GPU resources acquired for profiling.
305
+ * Outside of a session, the GPU will return to it's normal operating state.
306
+ */
307
+ CUptiResult CUPTIAPI cuptiProfilerEndSession(CUpti_Profiler_EndSession_Params* pParams);
308
+
309
+ /**
310
+ * \brief Params for cuptiProfilerSetConfig
311
+ */
312
+ typedef struct CUpti_Profiler_SetConfig_Params
313
+ {
314
+ size_t structSize; //!< [in] CUpti_Profiler_SetConfig_Params_STRUCT_SIZE
315
+ void* pPriv; //!< [in] assign to NULL
316
+
317
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
318
+ const uint8_t* pConfig; //!< [in] Config created by NVPW_RawMetricsConfig_GetConfigImage(). Must be align(8).
319
+ size_t configSize; //!< [in] size of config
320
+ uint16_t minNestingLevel; //!< [in] the lowest nesting level to be profiled; must be >= 1
321
+ uint16_t numNestingLevels; //!< [in] the number of nesting levels to profile; must be >= 1
322
+ size_t passIndex; //!< [in] Set this to zero for in-app replay; set this to the output of EndPass() for application replay
323
+ uint16_t targetNestingLevel; //!< [in] Set this to minNestingLevel for in-app replay; set this to the output of EndPass() for application
324
+ } CUpti_Profiler_SetConfig_Params;
325
+
326
+ #define CUpti_Profiler_SetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_SetConfig_Params, targetNestingLevel)
327
+
328
+ /**
329
+ * \brief Params for cuptiProfilerUnsetConfig
330
+ */
331
+ typedef struct CUpti_Profiler_UnsetConfig_Params
332
+ {
333
+ size_t structSize; //!< [in] CUpti_Profiler_UnsetConfig_Params_STRUCT_SIZE
334
+ void* pPriv; //!< [in] assign to NULL
335
+
336
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
337
+ } CUpti_Profiler_UnsetConfig_Params;
338
+ #define CUpti_Profiler_UnsetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_UnsetConfig_Params, ctx)
339
+
340
+ /**
341
+ * \brief Set metrics configuration to be profiled
342
+ *
343
+ * Use these APIs to set the config to profile in a session. It can be used for advanced cases such as where multiple
344
+ * configurations are collected into a single CounterData Image on the need basis, without restarting the session.
345
+ */
346
+ CUptiResult CUPTIAPI cuptiProfilerSetConfig(CUpti_Profiler_SetConfig_Params* pParams);
347
+ /**
348
+ * \brief Unset metrics configuration profiled
349
+ *
350
+ */
351
+ CUptiResult CUPTIAPI cuptiProfilerUnsetConfig(CUpti_Profiler_UnsetConfig_Params* pParams);
352
+
353
+ /**
354
+ * \brief Params for cuptiProfilerBeginPass
355
+ */
356
+ typedef struct CUpti_Profiler_BeginPass_Params
357
+ {
358
+ size_t structSize; //!< [in] CUpti_Profiler_BeginPass_Params_STRUCT_SIZE
359
+ void* pPriv; //!< [in] assign to NULL
360
+
361
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
362
+ } CUpti_Profiler_BeginPass_Params;
363
+ #define CUpti_Profiler_BeginPass_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_BeginPass_Params, ctx)
364
+
365
+ /**
366
+ * \brief Params for cuptiProfilerEndPass
367
+ */
368
+ typedef struct CUpti_Profiler_EndPass_Params
369
+ {
370
+ size_t structSize; //!< [in] CUpti_Profiler_EndPass_Params_STRUCT_SIZE
371
+ void* pPriv; //!< [in] assign to NULL
372
+
373
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
374
+ uint16_t targetNestingLevel; //! [out] The targetNestingLevel that will be collected by the *next* BeginPass.
375
+ size_t passIndex; //!< [out] The passIndex that will be collected by the *next* BeginPass
376
+ uint8_t allPassesSubmitted; //!< [out] becomes true when the last pass has been queued to the GPU
377
+ } CUpti_Profiler_EndPass_Params;
378
+ #define CUpti_Profiler_EndPass_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_EndPass_Params, allPassesSubmitted)
379
+
380
+ /**
381
+ * \brief Replay API: used for multipass collection.
382
+
383
+ * These APIs are used if user chooses to replay by itself \ref CUPTI_UserReplay or \ref CUPTI_ApplicationReplay
384
+ * for multipass collection of the metrics configurations.
385
+ * It's a no-op in case of \ref CUPTI_KernelReplay.
386
+ */
387
+ CUptiResult CUPTIAPI cuptiProfilerBeginPass(CUpti_Profiler_BeginPass_Params* pParams);
388
+
389
+ /**
390
+ * \brief Replay API: used for multipass collection.
391
+
392
+ * These APIs are used if user chooses to replay by itself \ref CUPTI_UserReplay or \ref CUPTI_ApplicationReplay
393
+ * for multipass collection of the metrics configurations.
394
+ * Its a no-op in case of \ref CUPTI_KernelReplay.
395
+ * Returns information for next pass.
396
+ */
397
+ CUptiResult CUPTIAPI cuptiProfilerEndPass(CUpti_Profiler_EndPass_Params* pParams);
398
+
399
+ /**
400
+ * \brief Params for cuptiProfilerEnableProfiling
401
+ */
402
+ typedef struct CUpti_Profiler_EnableProfiling_Params
403
+ {
404
+ size_t structSize; //!< [in] CUpti_Profiler_EnableProfiling_Params_STRUCT_SIZE
405
+ void* pPriv; //!< [in] assign to NULL
406
+
407
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
408
+ } CUpti_Profiler_EnableProfiling_Params;
409
+ #define CUpti_Profiler_EnableProfiling_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_EnableProfiling_Params, ctx)
410
+
411
+ /**
412
+ * \brief Params for cuptiProfilerDisableProfiling
413
+ */
414
+ typedef struct CUpti_Profiler_DisableProfiling_Params
415
+ {
416
+ size_t structSize; //!< [in] CUpti_Profiler_DisableProfiling_Params_STRUCT_SIZE
417
+ void* pPriv; //!< [in] assign to NULL
418
+
419
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
420
+ } CUpti_Profiler_DisableProfiling_Params;
421
+ #define CUpti_Profiler_DisableProfiling_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_DisableProfiling_Params, ctx)
422
+
423
+ /**
424
+ * \brief Enables Profiling
425
+ *
426
+ * In \ref CUPTI_AutoRange, these APIs are used to enable/disable profiling for the kernels to be executed in
427
+ * a profiling session.
428
+ */
429
+ CUptiResult CUPTIAPI cuptiProfilerEnableProfiling(CUpti_Profiler_EnableProfiling_Params* pParams);
430
+
431
+ /**
432
+ * \brief Disable Profiling
433
+ *
434
+ * In \ref CUPTI_AutoRange, these APIs are used to enable/disable profiling for the kernels to be executed in
435
+ * a profiling session.
436
+ */
437
+ CUptiResult CUPTIAPI cuptiProfilerDisableProfiling(CUpti_Profiler_DisableProfiling_Params* pParams);
438
+
439
+ /**
440
+ * \brief Params for cuptiProfilerIsPassCollected
441
+ */
442
+ typedef struct CUpti_Profiler_IsPassCollected_Params
443
+ {
444
+ size_t structSize; //!< [in] CUpti_Profiler_IsPassCollected_Params_STRUCT_SIZE
445
+ void* pPriv; //!< [in] assign to NULL
446
+
447
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
448
+ size_t numRangesDropped; //!< [out] number of ranges whose data was dropped in the processed pass
449
+ size_t numTraceBytesDropped; //!< [out] number of bytes not written to TraceBuffer due to buffer full
450
+ uint8_t onePassCollected; //!< [out] true if a pass was successfully decoded
451
+ uint8_t allPassesCollected; //!< [out] becomes true when the last pass has been decoded
452
+ } CUpti_Profiler_IsPassCollected_Params;
453
+ #define CUpti_Profiler_IsPassCollected_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_IsPassCollected_Params, allPassesCollected)
454
+
455
+ /**
456
+ * \brief Asynchronous call to query if the submitted pass to GPU is collected
457
+ *
458
+ */
459
+ CUptiResult CUPTIAPI cuptiProfilerIsPassCollected(CUpti_Profiler_IsPassCollected_Params* pParams);
460
+
461
+ /**
462
+ * \brief Params for cuptiProfilerFlushCounterData
463
+ */
464
+ typedef struct CUpti_Profiler_FlushCounterData_Params
465
+ {
466
+ size_t structSize; //!< [in] CUpti_Profiler_FlushCounterData_Params_STRUCT_SIZE
467
+ void* pPriv; //!< [in] assign to NULL
468
+
469
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
470
+ size_t numRangesDropped; //!< [out] number of ranges whose data was dropped in the processed passes
471
+ size_t numTraceBytesDropped; //!< [out] number of bytes not written to TraceBuffer due to buffer full
472
+ } CUpti_Profiler_FlushCounterData_Params;
473
+ #define CUpti_Profiler_FlushCounterData_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_FlushCounterData_Params, numTraceBytesDropped)
474
+
475
+ /**
476
+ * \brief Decode all the submitted passes
477
+ *
478
+ * Flush Counter data API to ensure every pass is decoded into the counterDataImage passed at beginSession.
479
+ * This will cause the CPU/GPU sync to collect all the undecoded pass.
480
+ */
481
+ CUptiResult CUPTIAPI cuptiProfilerFlushCounterData(CUpti_Profiler_FlushCounterData_Params* pParams);
482
+
483
+ typedef struct CUpti_Profiler_PushRange_Params
484
+ {
485
+ size_t structSize; //!< [in] CUpti_Profiler_PushRange_Params_STRUCT_SIZE
486
+ void* pPriv; //!< [in] assign to NULL
487
+
488
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
489
+ const char* pRangeName; //!< [in] specifies the range for subsequent launches; must not be NULL
490
+ size_t rangeNameLength; //!< [in] assign to strlen(pRangeName) if known; if set to zero, the library will call strlen()
491
+ } CUpti_Profiler_PushRange_Params;
492
+ #define CUpti_Profiler_PushRange_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_PushRange_Params, rangeNameLength)
493
+
494
+ typedef struct CUpti_Profiler_PopRange_Params
495
+ {
496
+ size_t structSize; //!< [in] CUpti_Profiler_PopRange_Params_STRUCT_SIZE
497
+ void* pPriv; //!< [in] assign to NULL
498
+
499
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
500
+ } CUpti_Profiler_PopRange_Params;
501
+ #define CUpti_Profiler_PopRange_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_PopRange_Params, ctx)
502
+
503
+
504
+ /**
505
+ * \brief Range API's : Push user range
506
+ *
507
+ * Counter data is collected per unique range-stack. Identified by a string label passsed by the user.
508
+ * It's an invalid operation in case of \ref CUPTI_AutoRange.
509
+ */
510
+ CUptiResult CUPTIAPI cuptiProfilerPushRange(CUpti_Profiler_PushRange_Params *pParams);
511
+
512
+ /**
513
+ * \brief Range API's : Pop user range
514
+ *
515
+ * Counter data is collected per unique range-stack. Identified by a string label passsed by the user.
516
+ * It's an invalid operation in case of \ref CUPTI_AutoRange.
517
+ */
518
+ CUptiResult CUPTIAPI cuptiProfilerPopRange(CUpti_Profiler_PopRange_Params *pParams);
519
+
520
+ /**
521
+ * \brief Params for cuptiProfilerGetCounterAvailability
522
+ */
523
+ typedef struct CUpti_Profiler_GetCounterAvailability_Params
524
+ {
525
+ size_t structSize; //!< [in] CUpti_Profiler_GetCounterAvailability_Params_STRUCT_SIZE
526
+ void* pPriv; //!< [in] assign to NULL
527
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
528
+ size_t counterAvailabilityImageSize; //!< [in/out] If `pCounterAvailabilityImage` is NULL, then the required size is returned in
529
+ //!< `counterAvailabilityImageSize`, otherwise `counterAvailabilityImageSize` should be set to the size of
530
+ //!< `pCounterAvailabilityImage`, and on return it would be overwritten with number of actual bytes copied
531
+ uint8_t* pCounterAvailabilityImage; //!< [in] buffer receiving counter availability image, may be NULL
532
+ } CUpti_Profiler_GetCounterAvailability_Params;
533
+ #define CUpti_Profiler_GetCounterAvailability_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_GetCounterAvailability_Params, pCounterAvailabilityImage)
534
+
535
+ /**
536
+ * \brief Query counter availibility
537
+ *
538
+ * Use this API to query counter availability information in a buffer which can be used to filter unavailable raw metrics on host.
539
+ * Note: This API may fail, if any profiling or sampling session is active on the specified context or its device.
540
+ */
541
+ CUptiResult CUPTIAPI cuptiProfilerGetCounterAvailability(CUpti_Profiler_GetCounterAvailability_Params *pParams);
542
+
543
+ /// Generic support level enum for CUPTI
544
+ typedef enum
545
+ {
546
+ CUPTI_PROFILER_CONFIGURATION_UNKNOWN = 0, //!< Configuration support level unknown - either detection code errored out before setting this value, or unable to determine it
547
+ CUPTI_PROFILER_CONFIGURATION_UNSUPPORTED, //!< Profiling is unavailable. For specific feature fields, this means that the current configuration of this feature does not work with profiling. For instance, SLI-enabled devices do not support profiling, and this value would be returned for SLI on an SLI-enabled device.
548
+ CUPTI_PROFILER_CONFIGURATION_DISABLED, //!< Profiling would be available for this configuration, but was disabled by the system
549
+ CUPTI_PROFILER_CONFIGURATION_SUPPORTED //!< Profiling is supported. For specific feature fields, this means that the current configuration of this feature works with profiling. For instance, SLI-enabled devices do not support profiling, and this value would only be returned for devices which are not SLI-enabled.
550
+ } CUpti_Profiler_Support_Level;
551
+
552
+ /**
553
+ * \brief Profiler API types
554
+ */
555
+ typedef enum
556
+ {
557
+ CUPTI_PROFILER_RANGE_PROFILING = 0, //!< CUPTI APIs for range based profiling (cuptiProfiler*)
558
+ CUPTI_PROFILER_PC_SAMPLING, //!< CUPTI APIs collecting pc sampling data (cuptiPcSampling*)
559
+ CUPTI_PROFILER_SASS_METRICS, //!< CUPTI APIs collecting SASS metrics data (cuptiSassMetrics*)
560
+ CUPTI_PROFILER_PM_SAMPLING, //!< CUPTI APIs collecting PM Sampling data (cuptiPmSampling*)
561
+ CUPTI_PROFILER_UNKNOWN
562
+ } CUpti_Profiler_API;
563
+
564
+ /**
565
+ * \brief Params for cuptiProfilerDeviceSupported
566
+ */
567
+ typedef struct
568
+ {
569
+ size_t structSize; //!< [in] Must be CUpti_Profiler_DeviceSupported_Params_STRUCT_SIZE
570
+ void *pPriv; //!< [in] assign to NULL
571
+ CUdevice cuDevice; //!< [in] if NULL, the current CUcontext is used
572
+
573
+ CUpti_Profiler_Support_Level isSupported; //!< [out] overall SUPPORTED / UNSUPPORTED flag representing whether Profiling and PC Sampling APIs work on the given device and configuration. SUPPORTED if all following flags are SUPPORTED, UNSUPPORTED otherwise.
574
+
575
+ CUpti_Profiler_Support_Level architecture; //!< [out] SUPPORTED if the device architecture level supports the Profiling API (Compute Capability >= 7.0), UNSUPPORTED otherwise
576
+ CUpti_Profiler_Support_Level sli; //!< [out] SUPPORTED if SLI is not enabled, UNSUPPORTED otherwise
577
+ CUpti_Profiler_Support_Level vGpu; //!< [out] SUPPORTED if vGPU is supported and profiling is enabled, DISABLED if profiling is supported but not enabled, UNSUPPORTED otherwise
578
+ CUpti_Profiler_Support_Level confidentialCompute; //!< [out] SUPPORTED if confidential compute is not enabled, UNSUPPORTED otherwise
579
+ CUpti_Profiler_Support_Level cmp; //!< [out] SUPPORTED if not NVIDIA Crypto Mining Processors (CMP), UNSUPPORTED otherwise
580
+ CUpti_Profiler_Support_Level wsl; //!< [out] SUPPORTED if WSL supported, UNSUPPORTED otherwise
581
+ CUpti_Profiler_API api; //!< [in] the CUPTI API type for which device support will be checked
582
+ } CUpti_Profiler_DeviceSupported_Params;
583
+ #define CUpti_Profiler_DeviceSupported_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_DeviceSupported_Params, api)
584
+
585
+ /**
586
+ * \brief Query device compatibility with Profiling API
587
+ *
588
+ * Use this call to determine whether a compute device and configuration are compatible with the Profiling API.
589
+ * If the configuration does not support profiling, one of several flags will indicate why.
590
+ */
591
+ CUptiResult CUPTIAPI cuptiProfilerDeviceSupported(CUpti_Profiler_DeviceSupported_Params *pParams);
592
+
593
+ /** @} */ /* END CUPTI_METRIC_API */
594
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
595
+ #pragma GCC visibility pop
596
+ #endif
597
+
598
+ #ifdef __cplusplus
599
+ } /* extern "C" */
600
+ #endif
601
+
602
+ #endif /*_CUPTI_PROFILER_TARGET_H_*/
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_range_profiler.h ADDED
@@ -0,0 +1,465 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2024 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(_CUPTI_RANGE_PROFILER_H_)
51
+ #define _CUPTI_RANGE_PROFILER_H_
52
+
53
+ #include <cuda.h>
54
+ #include <cupti_result.h>
55
+ #include <cupti_profiler_target.h>
56
+ #include <stddef.h>
57
+ #include <stdint.h>
58
+
59
+ #ifdef __cplusplus
60
+ extern "C" {
61
+ #endif
62
+
63
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
64
+ #pragma GCC visibility push(default)
65
+ #endif
66
+
67
+ /**
68
+ * \defgroup CUPTI_RANGE_PROFILER_API CUPTI Range Profiling API
69
+ * Functions, types, and enums that implement the CUPTI Range Profiling API.
70
+ * @{
71
+ */
72
+ #ifndef CUPTI_PROFILER_STRUCT_SIZE
73
+ #define CUPTI_PROFILER_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
74
+ #endif
75
+
76
+
77
+ typedef struct CUpti_RangeProfiler_Object CUpti_RangeProfiler_Object;
78
+
79
+ /**
80
+ * \brief Params for cuptiRangeProfilerSetConfig
81
+ */
82
+ typedef struct CUpti_RangeProfiler_SetConfig_Params
83
+ {
84
+ /// [in] Size of the data structure.
85
+ size_t structSize;
86
+ /// [in] Set to NULL.
87
+ void* pPriv;
88
+ /// [in] Range Profiler Object.
89
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
90
+ /// [in] Size of the config image.
91
+ size_t configSize;
92
+ /// [in] Config image.
93
+ const uint8_t* pConfig;
94
+ /// [in] Size of the counter data image.
95
+ size_t counterDataImageSize;
96
+ /// [in] Counter data image.
97
+ uint8_t* pCounterDataImage;
98
+ /// [in] Profiling Range mode.
99
+ CUpti_ProfilerRange range;
100
+ /// [in] Replay mode.
101
+ CUpti_ProfilerReplayMode replayMode;
102
+ /// [in] Maximum number of ranges that can be profiled in a pass.
103
+ size_t maxRangesPerPass;
104
+ /// [in] number of nesting level to be profiled. For Auto range mode, this should be set to 1.
105
+ uint16_t numNestingLevels;
106
+ /// [in] minimum nesting level to be profiled.
107
+ uint16_t minNestingLevel;
108
+ /// [in] Pass index for the replay session.
109
+ size_t passIndex;
110
+ /// [in] Target nesting level for the replay session.
111
+ uint16_t targetNestingLevel;
112
+ } CUpti_RangeProfiler_SetConfig_Params;
113
+
114
+ #define CUpti_RangeProfiler_SetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_SetConfig_Params, targetNestingLevel)
115
+
116
+ /**
117
+ * \brief Set the configuration for range profiler like maximum number of ranges per pass, number of nesting levels,
118
+ * range and replay mode and the config image which has scheduling info for metric collection.
119
+ *
120
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_SetConfig_Params
121
+ *
122
+ * \retval CUPTI_SUCCESS
123
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
124
+ */
125
+ CUptiResult CUPTIAPI cuptiRangeProfilerSetConfig(CUpti_RangeProfiler_SetConfig_Params* pParams);
126
+
127
+ /**
128
+ * \brief Params for cuptiRangeProfilerEnable
129
+ */
130
+ typedef struct CUpti_RangeProfiler_Enable_Params
131
+ {
132
+ /// [in] Size of the data structure.
133
+ size_t structSize;
134
+ /// [in] Set to NULL.
135
+ void* pPriv;
136
+ /// [in] Context to be used for profiling.
137
+ CUcontext ctx;
138
+ /// [out] Range Profiler Object.
139
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
140
+ } CUpti_RangeProfiler_Enable_Params;
141
+ #define CUpti_RangeProfiler_Enable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_Enable_Params, pRangeProfilerObject)
142
+
143
+ /**
144
+ * \brief Create a range profiler object and enable range profiling on the CUDA context.
145
+ *
146
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_Enable_Params
147
+ *
148
+ * \retval CUPTI_SUCCESS
149
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
150
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY if memory allocation fails while creating the PM sampling object
151
+ * \retval CUPTI_ERROR_INSUFFICIENT_PRIVILEGES if the user does not have sufficient privileges to perform the operation
152
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
153
+ */
154
+ CUptiResult CUPTIAPI cuptiRangeProfilerEnable(CUpti_RangeProfiler_Enable_Params* pParams);
155
+
156
+ /**
157
+ * \brief Params for cuptiRangeProfilerDisable
158
+ */
159
+ typedef struct CUpti_RangeProfiler_Disable_Params
160
+ {
161
+ /// [in] Size of the data structure.
162
+ size_t structSize;
163
+ /// [in] Set to NULL.
164
+ void* pPriv;
165
+ /// [in] Range Profiler Object.
166
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
167
+ } CUpti_RangeProfiler_Disable_Params;
168
+ #define CUpti_RangeProfiler_Disable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_Disable_Params, pRangeProfilerObject)
169
+
170
+ /**
171
+ * \brief Disable the range profiler on the CUDA context and destroy the range profiler object.
172
+ *
173
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_Disable_Params
174
+ *
175
+ * \retval CUPTI_SUCCESS
176
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
177
+ */
178
+ CUptiResult CUPTIAPI cuptiRangeProfilerDisable(CUpti_RangeProfiler_Disable_Params* pParams);
179
+
180
+ /**
181
+ * \brief Params for cuptiRangeProfilerStart
182
+ */
183
+ typedef struct CUpti_RangeProfiler_Start_Params
184
+ {
185
+ /// [in] Size of the data structure.
186
+ size_t structSize;
187
+ /// [in] Set to NULL.
188
+ void* pPriv;
189
+ /// [in] Range Profiler Object.
190
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
191
+ } CUpti_RangeProfiler_Start_Params;
192
+ #define CUpti_RangeProfiler_Start_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_Start_Params, pRangeProfilerObject)
193
+
194
+ /**
195
+ * \brief Start the range profiler.
196
+ *
197
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_Start_Params
198
+ *
199
+ * \retval CUPTI_SUCCESS
200
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
201
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler Start is called without enabling range profiler
202
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
203
+ */
204
+ CUptiResult CUPTIAPI cuptiRangeProfilerStart(CUpti_RangeProfiler_Start_Params* pParams);
205
+
206
+ /**
207
+ * \brief Params for cuptiRangeProfilerStop
208
+ */
209
+ typedef struct CUpti_RangeProfiler_Stop_Params
210
+ {
211
+ /// [in] Size of the data structure.
212
+ size_t structSize;
213
+ /// [in] Set to NULL.
214
+ void* pPriv;
215
+ /// [in] Range Profiler Object.
216
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
217
+ /// [out] pass index for the replay session.
218
+ size_t passIndex;
219
+ /// [out] target nesting level for the replay session.
220
+ size_t targetNestingLevel;
221
+ /// [out] 1 if all passes are submitted to GPU for collection, 0 otherwise.
222
+ uint8_t isAllPassSubmitted;
223
+ } CUpti_RangeProfiler_Stop_Params;
224
+ #define CUpti_RangeProfiler_Stop_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_Stop_Params, isAllPassSubmitted)
225
+
226
+ /**
227
+ * \brief Stop the range profiler.
228
+ *
229
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_Stop_Params
230
+ *
231
+ * \retval CUPTI_SUCCESS
232
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
233
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler Stop is called without enabling range profiler
234
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
235
+ */
236
+ CUptiResult CUPTIAPI cuptiRangeProfilerStop(CUpti_RangeProfiler_Stop_Params* pParams);
237
+
238
+ /**
239
+ * \brief Params for cuptiRangeProfilerPushRange
240
+ */
241
+ typedef struct CUpti_RangeProfiler_PushRange_Params
242
+ {
243
+ /// [in] Size of the data structure.
244
+ size_t structSize;
245
+ /// [in] Set to NULL.
246
+ void* pPriv;
247
+ /// [in] Range Profiler Object.
248
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
249
+ /// [in] Name of the range to be profiled (only valid for User range mode).
250
+ const char* pRangeName;
251
+ } CUpti_RangeProfiler_PushRange_Params;
252
+ #define CUpti_RangeProfiler_PushRange_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_PushRange_Params, pRangeName)
253
+
254
+ /**
255
+ * \brief Add a new range to the Range Profiler with a given range name.
256
+ * For nested ranges, this API should be called again for the innermost range. For profiling the nested
257
+ * range, users need to set the values for minNestingLevel and numNestingLevels in the SetConfig API.
258
+ *
259
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_PushRange_Params
260
+ *
261
+ * \retval CUPTI_SUCCESS
262
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
263
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler PushRange is called without enabling range profiler
264
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
265
+ */
266
+ CUptiResult CUPTIAPI cuptiRangeProfilerPushRange(CUpti_RangeProfiler_PushRange_Params* pParams);
267
+
268
+ /**
269
+ * \brief Params for cuptiRangeProfilerPopRange
270
+ */
271
+ typedef struct CUpti_RangeProfiler_PopRange_Params
272
+ {
273
+ /// [in] Size of the data structure.
274
+ size_t structSize;
275
+ /// [in] Set to NULL.
276
+ void* pPriv;
277
+ /// [in] Range Profiler Object.
278
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
279
+ } CUpti_RangeProfiler_PopRange_Params;
280
+ #define CUpti_RangeProfiler_PopRange_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_PopRange_Params, pRangeProfilerObject)
281
+
282
+ /**
283
+ * \brief pop the current range to the Range Profiler.
284
+ * The number of pop range API call should be same as number of push ranges in the same order.
285
+ *
286
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_PopRange_Params
287
+ *
288
+ * \retval CUPTI_SUCCESS
289
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
290
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler PopRange is called without enabling range profiler
291
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
292
+ */
293
+ CUptiResult CUPTIAPI cuptiRangeProfilerPopRange(CUpti_RangeProfiler_PopRange_Params* pParams);
294
+
295
+ /**
296
+ * \brief Params for cuptiRangeProfilerDecodeData
297
+ */
298
+ typedef struct CUpti_RangeProfiler_DecodeData_Params
299
+ {
300
+ /// [in] Size of the data structure.
301
+ size_t structSize;
302
+ /// [in] Set to NULL.
303
+ void* pPriv;
304
+ /// [in] Range Profiler Object.
305
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
306
+ /// [out] Number of ranges dropped in the processed passes.
307
+ size_t numOfRangeDropped;
308
+ } CUpti_RangeProfiler_DecodeData_Params;
309
+ #define CUpti_RangeProfiler_DecodeData_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_DecodeData_Params, numOfRangeDropped)
310
+
311
+ /**
312
+ * \brief Decode the profiling data stored in the hardware to the counter data image passed in the
313
+ * SetConfig API. This API should be called after cuptiRangeProfilerStop. The counter data image
314
+ * will be updated with the profiling data for the ranges profiled.
315
+ *
316
+ * For the cases where the number of ranges counter data image can store is less than the number of ranges
317
+ * profiled (= maxRangesPerPass in SetConfig API), the counter data image will report dropped ranges.
318
+ *
319
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_DecodeData_Params
320
+ *
321
+ * \retval CUPTI_SUCCESS
322
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
323
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler DecodeData is called without enabling range profiler
324
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
325
+ */
326
+ CUptiResult CUPTIAPI cuptiRangeProfilerDecodeData(CUpti_RangeProfiler_DecodeData_Params* pParams);
327
+
328
+ /**
329
+ * \brief Params for cuptiRangeProfilerGetCounterDataSize
330
+ */
331
+ typedef struct CUpti_RangeProfiler_GetCounterDataSize_Params
332
+ {
333
+ /// [in] Size of the data structure.
334
+ size_t structSize;
335
+ /// [in] Set to NULL.
336
+ void* pPriv;
337
+ /// [in] Periodic sampler object.
338
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
339
+ /// [in] Names of the metrics to be collected.
340
+ const char** pMetricNames;
341
+ /// [in] Number of metrics to be collected.
342
+ size_t numMetrics;
343
+ /// [in] Maximum number of ranges to be stored in the counter data image.
344
+ size_t maxNumOfRanges;
345
+ /// [in] Maximum number of RangeTree nodes; must be >= maxNumOfRanges
346
+ uint32_t maxNumRangeTreeNodes;
347
+ /// [out] Size of the counter data image.
348
+ size_t counterDataSize;
349
+ } CUpti_RangeProfiler_GetCounterDataSize_Params;
350
+ #define CUpti_RangeProfiler_GetCounterDataSize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_GetCounterDataSize_Params, counterDataSize)
351
+
352
+ /**
353
+ * \brief Get the size of the counter data image required to store the profiling data for the ranges profiled.
354
+ *
355
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_GetCounterDataSize_Params
356
+ *
357
+ * \retval CUPTI_SUCCESS
358
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
359
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler GetCounterDataSize is called without enabling range profiler
360
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
361
+ */
362
+ CUptiResult CUPTIAPI cuptiRangeProfilerGetCounterDataSize(CUpti_RangeProfiler_GetCounterDataSize_Params* pParams);
363
+
364
+ /**
365
+ * \brief Params for cuptiRangeProfilerCounterDataImageInitialize
366
+ */
367
+ typedef struct CUpti_RangeProfiler_CounterDataImage_Initialize_Params
368
+ {
369
+ /// [in] Size of the data structure.
370
+ size_t structSize;
371
+ /// [in] Set to NULL.
372
+ void* pPriv;
373
+ /// [in] Periodic sampler object.
374
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
375
+ /// [in] Size of the counter data image.
376
+ size_t counterDataSize;
377
+ /// [in] Counter data image.
378
+ uint8_t* pCounterData;
379
+ } CUpti_RangeProfiler_CounterDataImage_Initialize_Params;
380
+ #define CUpti_RangeProfiler_CounterDataImage_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_CounterDataImage_Initialize_Params, pCounterData)
381
+
382
+ /**
383
+ * \brief Initialize the counter data image with the profiling data for the ranges profiled.
384
+ *
385
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_CounterDataImage_Initialize_Params
386
+ *
387
+ * \retval CUPTI_SUCCESS
388
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
389
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler CounterDataImageInitialize is called without enabling range profiler
390
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
391
+ */
392
+ CUptiResult CUPTIAPI cuptiRangeProfilerCounterDataImageInitialize(CUpti_RangeProfiler_CounterDataImage_Initialize_Params* pParams);
393
+
394
+ /**
395
+ * \brief Params for cuptiRangeProfilerGetCounterDataInfo
396
+ */
397
+ typedef struct CUpti_RangeProfiler_GetCounterDataInfo_Params
398
+ {
399
+ /// [in] Size of the data structure.
400
+ size_t structSize;
401
+ /// [in] Set to NULL.
402
+ void* pPriv;
403
+ /// [in] Counter data image.
404
+ const uint8_t* pCounterDataImage;
405
+ /// [in] Size of the counter data image.
406
+ size_t counterDataImageSize;
407
+ /// [out] Number of ranges in the counter data image.
408
+ size_t numTotalRanges;
409
+ } CUpti_RangeProfiler_GetCounterDataInfo_Params;
410
+ #define CUpti_RangeProfiler_GetCounterDataInfo_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_GetCounterDataInfo_Params, numTotalRanges)
411
+
412
+ /**
413
+ * \brief Get the number of ranges stored in the counter data image.
414
+ *
415
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_GetCounterDataInfo_Params
416
+ *
417
+ * \retval CUPTI_SUCCESS
418
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
419
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
420
+ */
421
+ CUptiResult CUPTIAPI cuptiRangeProfilerGetCounterDataInfo(CUpti_RangeProfiler_GetCounterDataInfo_Params* pParams);
422
+
423
+ /**
424
+ * \brief Params for cuptiRangeProfilerCounterDataGetRangeInfo
425
+ */
426
+ typedef struct CUpti_RangeProfiler_CounterData_GetRangeInfo_Params
427
+ {
428
+ /// [in] Size of the data structure.
429
+ size_t structSize;
430
+ /// [in] Set to NULL.
431
+ void* pPriv;
432
+ /// [in] Counter data image.
433
+ const uint8_t* pCounterDataImage;
434
+ /// [in] Size of the counter data image.
435
+ size_t counterDataImageSize;
436
+ /// [in] Index of the sample.
437
+ size_t rangeIndex;
438
+ /// [in] range delimiter.
439
+ const char* rangeDelimiter;
440
+ /// [out] RangeName;
441
+ const char* rangeName;
442
+ } CUpti_RangeProfiler_CounterData_GetRangeInfo_Params;
443
+ #define CUpti_RangeProfiler_CounterData_GetRangeInfo_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_CounterData_GetRangeInfo_Params, rangeName)
444
+
445
+ /**
446
+ * \brief Get the range name for the given range index.
447
+ *
448
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_CounterData_GetRangeInfo_Params
449
+ *
450
+ * \retval CUPTI_SUCCESS
451
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
452
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
453
+ */
454
+ CUptiResult CUPTIAPI cuptiRangeProfilerCounterDataGetRangeInfo(CUpti_RangeProfiler_CounterData_GetRangeInfo_Params* pParams);
455
+
456
+
457
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
458
+ #pragma GCC visibility pop
459
+ #endif
460
+
461
+ #ifdef __cplusplus
462
+ } /* extern "C" */
463
+ #endif
464
+
465
+ #endif /*_CUPTI_RANGE_PROFILER_H_*/
data/miniconda3/pkgs/cuda-cupti-dev-12.8.90-0/targets/x86_64-linux/include/cupti_result.h ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2010-2024 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(_CUPTI_RESULT_H_)
51
+ #define _CUPTI_RESULT_H_
52
+
53
+ #ifndef CUPTIAPI
54
+ #ifdef _WIN32
55
+ #define CUPTIAPI __stdcall
56
+ #else
57
+ #define CUPTIAPI
58
+ #endif
59
+ #endif
60
+
61
+ #if defined(__cplusplus)
62
+ extern "C" {
63
+ #endif
64
+
65
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
66
+ #pragma GCC visibility push(default)
67
+ #endif
68
+
69
+ /**
70
+ * \defgroup CUPTI_RESULT_API CUPTI Result Codes
71
+ * Error and result codes returned by CUPTI functions.
72
+ * @{
73
+ */
74
+
75
+ /**
76
+ * \brief CUPTI result codes.
77
+ *
78
+ * Error and result codes returned by CUPTI functions.
79
+ */
80
+ typedef enum {
81
+ /**
82
+ * No error.
83
+ */
84
+ CUPTI_SUCCESS = 0,
85
+ /**
86
+ * One or more of the parameters is invalid.
87
+ */
88
+ CUPTI_ERROR_INVALID_PARAMETER = 1,
89
+ /**
90
+ * The device does not correspond to a valid CUDA device.
91
+ */
92
+ CUPTI_ERROR_INVALID_DEVICE = 2,
93
+ /**
94
+ * The context is NULL or not valid.
95
+ */
96
+ CUPTI_ERROR_INVALID_CONTEXT = 3,
97
+ /**
98
+ * The event domain id is invalid.
99
+ */
100
+ CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID = 4,
101
+ /**
102
+ * The event id is invalid.
103
+ */
104
+ CUPTI_ERROR_INVALID_EVENT_ID = 5,
105
+ /**
106
+ * The event name is invalid.
107
+ */
108
+ CUPTI_ERROR_INVALID_EVENT_NAME = 6,
109
+ /**
110
+ * The current operation cannot be performed due to dependency on
111
+ * other factors.
112
+ */
113
+ CUPTI_ERROR_INVALID_OPERATION = 7,
114
+ /**
115
+ * Unable to allocate enough memory to perform the requested
116
+ * operation.
117
+ */
118
+ CUPTI_ERROR_OUT_OF_MEMORY = 8,
119
+ /**
120
+ * An error occurred on the performance monitoring hardware.
121
+ */
122
+ CUPTI_ERROR_HARDWARE = 9,
123
+ /**
124
+ * The output buffer size is not sufficient to return all
125
+ * requested data.
126
+ */
127
+ CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT = 10,
128
+ /**
129
+ * API is not implemented.
130
+ */
131
+ CUPTI_ERROR_API_NOT_IMPLEMENTED = 11,
132
+ /**
133
+ * The maximum limit is reached.
134
+ */
135
+ CUPTI_ERROR_MAX_LIMIT_REACHED = 12,
136
+ /**
137
+ * The object is not yet ready to perform the requested operation.
138
+ */
139
+ CUPTI_ERROR_NOT_READY = 13,
140
+ /**
141
+ * The current operation is not compatible with the current state
142
+ * of the object
143
+ */
144
+ CUPTI_ERROR_NOT_COMPATIBLE = 14,
145
+ /**
146
+ * CUPTI is unable to initialize its connection to the CUDA
147
+ * driver.
148
+ */
149
+ CUPTI_ERROR_NOT_INITIALIZED = 15,
150
+ /**
151
+ * The metric id is invalid.
152
+ */
153
+ CUPTI_ERROR_INVALID_METRIC_ID = 16,
154
+ /**
155
+ * The metric name is invalid.
156
+ */
157
+ CUPTI_ERROR_INVALID_METRIC_NAME = 17,
158
+ /**
159
+ * The queue is empty.
160
+ */
161
+ CUPTI_ERROR_QUEUE_EMPTY = 18,
162
+ /**
163
+ * Invalid handle (internal?).
164
+ */
165
+ CUPTI_ERROR_INVALID_HANDLE = 19,
166
+ /**
167
+ * Invalid stream.
168
+ */
169
+ CUPTI_ERROR_INVALID_STREAM = 20,
170
+ /**
171
+ * Invalid kind.
172
+ */
173
+ CUPTI_ERROR_INVALID_KIND = 21,
174
+ /**
175
+ * Invalid event value.
176
+ */
177
+ CUPTI_ERROR_INVALID_EVENT_VALUE = 22,
178
+ /**
179
+ * CUPTI is disabled due to conflicts with other enabled profilers
180
+ */
181
+ CUPTI_ERROR_DISABLED = 23,
182
+ /**
183
+ * Invalid module.
184
+ */
185
+ CUPTI_ERROR_INVALID_MODULE = 24,
186
+ /**
187
+ * Invalid metric value.
188
+ */
189
+ CUPTI_ERROR_INVALID_METRIC_VALUE = 25,
190
+ /**
191
+ * The performance monitoring hardware is in use by other client.
192
+ */
193
+ CUPTI_ERROR_HARDWARE_BUSY = 26,
194
+ /**
195
+ * The attempted operation is not supported on the current
196
+ * system or device.
197
+ */
198
+ CUPTI_ERROR_NOT_SUPPORTED = 27,
199
+ /**
200
+ * Unified memory profiling is not supported on the system.
201
+ * Potential reason could be unsupported OS or architecture.
202
+ */
203
+ CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED = 28,
204
+ /**
205
+ * Unified memory profiling is not supported on the device
206
+ */
207
+ CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED_ON_DEVICE = 29,
208
+ /**
209
+ * Unified memory profiling is not supported on a multi-GPU
210
+ * configuration without P2P support between any pair of devices
211
+ */
212
+ CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED_ON_NON_P2P_DEVICES = 30,
213
+ /**
214
+ * Unified memory profiling is not supported under the
215
+ * Multi-Process Service (MPS) environment. CUDA 7.5 removes this
216
+ * restriction.
217
+ */
218
+ CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED_WITH_MPS = 31,
219
+ /**
220
+ * In CUDA 9.0, devices with compute capability 7.0 don't
221
+ * support CDP tracing
222
+ */
223
+ CUPTI_ERROR_CDP_TRACING_NOT_SUPPORTED = 32,
224
+ /**
225
+ * Profiling on virtualized GPU is not supported.
226
+ */
227
+ CUPTI_ERROR_VIRTUALIZED_DEVICE_NOT_SUPPORTED = 33,
228
+ /**
229
+ * Profiling results might be incorrect for CUDA applications
230
+ * compiled with nvcc version older than 9.0 for devices with
231
+ * compute capability 6.0 and 6.1.
232
+ * Profiling session will continue and CUPTI will notify it using this error code.
233
+ * User is advised to recompile the application code with nvcc version 9.0 or later.
234
+ * Ignore this warning if code is already compiled with the recommended nvcc version.
235
+ */
236
+ CUPTI_ERROR_CUDA_COMPILER_NOT_COMPATIBLE = 34,
237
+ /**
238
+ * User doesn't have sufficient privileges which are required to
239
+ * start the profiling session.
240
+ * One possible reason for this may be that the NVIDIA driver or your system
241
+ * administrator may have restricted access to the NVIDIA GPU performance counters.
242
+ * To learn how to resolve this issue and find more information, please visit
243
+ * https://developer.nvidia.com/CUPTI_ERROR_INSUFFICIENT_PRIVILEGES
244
+ */
245
+ CUPTI_ERROR_INSUFFICIENT_PRIVILEGES = 35,
246
+ /**
247
+ * Legacy CUPTI Profiling API i.e. event API from the header cupti_events.h and
248
+ * metric API from the header cupti_metrics.h are not compatible with the
249
+ * Profiling API in the header cupti_profiler_target.h and Perfworks metrics API
250
+ * in the headers nvperf_host.h and nvperf_target.h.
251
+ */
252
+ CUPTI_ERROR_OLD_PROFILER_API_INITIALIZED = 36,
253
+ /**
254
+ * Missing definition of the OpenACC API routine in the linked OpenACC library.
255
+ *
256
+ * One possible reason is that OpenACC library is linked statically in the
257
+ * user application, which might not have the definition of all the OpenACC
258
+ * API routines needed for the OpenACC profiling, as compiler might ignore
259
+ * definitions for the functions not used in the application. This issue
260
+ * can be mitigated by linking the OpenACC library dynamically.
261
+ */
262
+ CUPTI_ERROR_OPENACC_UNDEFINED_ROUTINE = 37,
263
+ /**
264
+ * Legacy CUPTI Profiling API i.e. event API from the header cupti_events.h and
265
+ * metric API from the header cupti_metrics.h are not supported on devices with
266
+ * compute capability 7.5 and higher (i.e. Turing and later GPU architectures).
267
+ * These APIs are deprecated in the CUDA 12.8 release and will be removed in a future CUDA release.
268
+ * These are replaced by the host profiling API in the header cupti_profiler_host.h and
269
+ * target profiling API in the header cupti_range_profiler.h which are supported on
270
+ * devices with compute capability 7.0 and higher (i.e. Volta and later GPU
271
+ * architectures).
272
+ */
273
+ CUPTI_ERROR_LEGACY_PROFILER_NOT_SUPPORTED = 38,
274
+ /**
275
+ * CUPTI doesn't allow multiple callback subscribers. Only a single subscriber
276
+ * can be registered at a time.
277
+ * Same error code is used when application is launched using NVIDIA tools
278
+ * like nvprof, Visual Profiler, Nsight Systems, Nsight Compute, cuda-gdb and
279
+ * cuda-memcheck.
280
+ */
281
+ CUPTI_ERROR_MULTIPLE_SUBSCRIBERS_NOT_SUPPORTED = 39,
282
+ /**
283
+ * Profiling on virtualized GPU is not allowed by hypervisor.
284
+ */
285
+ CUPTI_ERROR_VIRTUALIZED_DEVICE_INSUFFICIENT_PRIVILEGES = 40,
286
+ /**
287
+ * Profiling and tracing are not allowed when confidential computing mode
288
+ * is enabled.
289
+ */
290
+ CUPTI_ERROR_CONFIDENTIAL_COMPUTING_NOT_SUPPORTED = 41,
291
+ /**
292
+ * CUPTI does not support NVIDIA Crypto Mining Processors (CMP).
293
+ * For more information, please visit https://developer.nvidia.com/ERR_NVCMPGPU
294
+ */
295
+ CUPTI_ERROR_CMP_DEVICE_NOT_SUPPORTED = 42,
296
+ /**
297
+ * Profiling on Multi-instance GPU (MIG) is not supported.
298
+ */
299
+ CUPTI_ERROR_MIG_DEVICE_NOT_SUPPORTED = 43,
300
+ /**
301
+ * Profiling on SLI device is not supported.
302
+ */
303
+ CUPTI_ERROR_SLI_DEVICE_NOT_SUPPORTED = 44,
304
+ /**
305
+ * Profiling on WSL device is not supported.
306
+ */
307
+ CUPTI_ERROR_WSL_DEVICE_NOT_SUPPORTED = 45,
308
+ /**
309
+ * An unknown internal error has occurred.
310
+ */
311
+ CUPTI_ERROR_UNKNOWN = 999,
312
+ CUPTI_ERROR_FORCE_INT = 0x7fffffff
313
+ } CUptiResult;
314
+
315
+ /**
316
+ * \brief Get the descriptive string for a CUptiResult.
317
+ *
318
+ * Return the descriptive string for a CUptiResult in \p *str.
319
+ * \note \b Thread-safety: this function is thread safe.
320
+ *
321
+ * \param result The result to get the string for
322
+ * \param str Returns the string
323
+ *
324
+ * \retval CUPTI_SUCCESS on success
325
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p str is NULL or \p
326
+ * result is not a valid CUptiResult
327
+ */
328
+ CUptiResult CUPTIAPI cuptiGetResultString(CUptiResult result, const char **str);
329
+
330
+ /**
331
+ * @brief Get the descriptive message corresponding to error codes returned
332
+ * by CUPTI.
333
+ *
334
+ * Return the descriptive error message for a CUptiResult in \p *str.
335
+ * \note \b Thread-safety: this function is thread safe.
336
+ *
337
+ * \param result The result to get the descriptive error message for
338
+ * \param str Returns the error message string
339
+ *
340
+ * \retval CUPTI_SUCCESS on success
341
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p str is NULL or \p
342
+ * result is not a valid CUptiResult
343
+ *
344
+ */
345
+
346
+ CUptiResult CUPTIAPI cuptiGetErrorMessage(CUptiResult result, const char **str);
347
+
348
+ /** @} */ /* END CUPTI_RESULT_API */
349
+
350
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
351
+ #pragma GCC visibility pop
352
+ #endif
353
+
354
+ #if defined(__cplusplus)
355
+ }
356
+ #endif
357
+
358
+ #endif /*_CUPTI_RESULT_H_*/
359
+
360
+