applied-ai-018 commited on
Commit
ae5c8c8
·
verified ·
1 Parent(s): 89f370a

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. llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/__init__.cpython-310.pyc +0 -0
  2. llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/__main__.cpython-310.pyc +0 -0
  3. llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/api.cpython-310.pyc +0 -0
  4. llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/cd.cpython-310.pyc +0 -0
  5. llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/constant.cpython-310.pyc +0 -0
  6. llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/legacy.cpython-310.pyc +0 -0
  7. llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/md.cpython-310.pyc +0 -0
  8. llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/models.cpython-310.pyc +0 -0
  9. llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/utils.cpython-310.pyc +0 -0
  10. llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/version.cpython-310.pyc +0 -0
  11. llmeval-env/lib/python3.10/site-packages/charset_normalizer/cli/__init__.py +6 -0
  12. llmeval-env/lib/python3.10/site-packages/charset_normalizer/cli/__main__.py +296 -0
  13. llmeval-env/lib/python3.10/site-packages/charset_normalizer/cli/__pycache__/__init__.cpython-310.pyc +0 -0
  14. llmeval-env/lib/python3.10/site-packages/charset_normalizer/cli/__pycache__/__main__.cpython-310.pyc +0 -0
  15. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py34_np19.gz +3 -0
  16. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py35_np19.gz +3 -0
  17. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl +3 -0
  18. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.bz2 +3 -0
  19. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_03.npy +3 -0
  20. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_04.npy +3 -0
  21. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_02.npy +3 -0
  22. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_04.npy +3 -0
  23. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py33_np18.pkl +3 -0
  24. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py33_np18.pkl_02.npy +3 -0
  25. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py34_np19.pkl_01.npy +3 -0
  26. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py34_np19.pkl_02.npy +3 -0
  27. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py34_np19.pkl_03.npy +3 -0
  28. llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py35_np19.pkl +3 -0
  29. llmeval-env/lib/python3.10/site-packages/nvidia/__init__.py +0 -0
  30. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/__init__.py +0 -0
  31. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/__pycache__/__init__.cpython-310.pyc +0 -0
  32. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/__init__.py +0 -0
  33. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cuda_stdint.h +112 -0
  34. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti.h +123 -0
  35. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_activity.h +0 -0
  36. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_callbacks.h +762 -0
  37. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_checkpoint.h +127 -0
  38. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_driver_cbid.h +725 -0
  39. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_events.h +1371 -0
  40. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_metrics.h +825 -0
  41. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_nvtx_cbid.h +111 -0
  42. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pcsampling.h +950 -0
  43. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pcsampling_util.h +419 -0
  44. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_profiler_target.h +589 -0
  45. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_result.h +328 -0
  46. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_runtime_cbid.h +458 -0
  47. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_target.h +43 -0
  48. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_version.h +131 -0
  49. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudaGL_meta.h +116 -0
  50. llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudaVDPAU_meta.h +46 -0
llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (1.59 kB). View file
 
llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/__main__.cpython-310.pyc ADDED
Binary file (273 Bytes). View file
 
llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/api.cpython-310.pyc ADDED
Binary file (11.4 kB). View file
 
llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/cd.cpython-310.pyc ADDED
Binary file (9.67 kB). View file
 
llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/constant.cpython-310.pyc ADDED
Binary file (30.5 kB). View file
 
llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/legacy.cpython-310.pyc ADDED
Binary file (1.86 kB). View file
 
llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/md.cpython-310.pyc ADDED
Binary file (15.8 kB). View file
 
llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/models.cpython-310.pyc ADDED
Binary file (11.6 kB). View file
 
llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/utils.cpython-310.pyc ADDED
Binary file (8.93 kB). View file
 
llmeval-env/lib/python3.10/site-packages/charset_normalizer/__pycache__/version.cpython-310.pyc ADDED
Binary file (275 Bytes). View file
 
llmeval-env/lib/python3.10/site-packages/charset_normalizer/cli/__init__.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from .__main__ import cli_detect, query_yes_no
2
+
3
+ __all__ = (
4
+ "cli_detect",
5
+ "query_yes_no",
6
+ )
llmeval-env/lib/python3.10/site-packages/charset_normalizer/cli/__main__.py ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import sys
3
+ from json import dumps
4
+ from os.path import abspath, basename, dirname, join, realpath
5
+ from platform import python_version
6
+ from typing import List, Optional
7
+ from unicodedata import unidata_version
8
+
9
+ import charset_normalizer.md as md_module
10
+ from charset_normalizer import from_fp
11
+ from charset_normalizer.models import CliDetectionResult
12
+ from charset_normalizer.version import __version__
13
+
14
+
15
+ def query_yes_no(question: str, default: str = "yes") -> bool:
16
+ """Ask a yes/no question via input() and return their answer.
17
+
18
+ "question" is a string that is presented to the user.
19
+ "default" is the presumed answer if the user just hits <Enter>.
20
+ It must be "yes" (the default), "no" or None (meaning
21
+ an answer is required of the user).
22
+
23
+ The "answer" return value is True for "yes" or False for "no".
24
+
25
+ Credit goes to (c) https://stackoverflow.com/questions/3041986/apt-command-line-interface-like-yes-no-input
26
+ """
27
+ valid = {"yes": True, "y": True, "ye": True, "no": False, "n": False}
28
+ if default is None:
29
+ prompt = " [y/n] "
30
+ elif default == "yes":
31
+ prompt = " [Y/n] "
32
+ elif default == "no":
33
+ prompt = " [y/N] "
34
+ else:
35
+ raise ValueError("invalid default answer: '%s'" % default)
36
+
37
+ while True:
38
+ sys.stdout.write(question + prompt)
39
+ choice = input().lower()
40
+ if default is not None and choice == "":
41
+ return valid[default]
42
+ elif choice in valid:
43
+ return valid[choice]
44
+ else:
45
+ sys.stdout.write("Please respond with 'yes' or 'no' " "(or 'y' or 'n').\n")
46
+
47
+
48
+ def cli_detect(argv: Optional[List[str]] = None) -> int:
49
+ """
50
+ CLI assistant using ARGV and ArgumentParser
51
+ :param argv:
52
+ :return: 0 if everything is fine, anything else equal trouble
53
+ """
54
+ parser = argparse.ArgumentParser(
55
+ description="The Real First Universal Charset Detector. "
56
+ "Discover originating encoding used on text file. "
57
+ "Normalize text to unicode."
58
+ )
59
+
60
+ parser.add_argument(
61
+ "files", type=argparse.FileType("rb"), nargs="+", help="File(s) to be analysed"
62
+ )
63
+ parser.add_argument(
64
+ "-v",
65
+ "--verbose",
66
+ action="store_true",
67
+ default=False,
68
+ dest="verbose",
69
+ help="Display complementary information about file if any. "
70
+ "Stdout will contain logs about the detection process.",
71
+ )
72
+ parser.add_argument(
73
+ "-a",
74
+ "--with-alternative",
75
+ action="store_true",
76
+ default=False,
77
+ dest="alternatives",
78
+ help="Output complementary possibilities if any. Top-level JSON WILL be a list.",
79
+ )
80
+ parser.add_argument(
81
+ "-n",
82
+ "--normalize",
83
+ action="store_true",
84
+ default=False,
85
+ dest="normalize",
86
+ help="Permit to normalize input file. If not set, program does not write anything.",
87
+ )
88
+ parser.add_argument(
89
+ "-m",
90
+ "--minimal",
91
+ action="store_true",
92
+ default=False,
93
+ dest="minimal",
94
+ help="Only output the charset detected to STDOUT. Disabling JSON output.",
95
+ )
96
+ parser.add_argument(
97
+ "-r",
98
+ "--replace",
99
+ action="store_true",
100
+ default=False,
101
+ dest="replace",
102
+ help="Replace file when trying to normalize it instead of creating a new one.",
103
+ )
104
+ parser.add_argument(
105
+ "-f",
106
+ "--force",
107
+ action="store_true",
108
+ default=False,
109
+ dest="force",
110
+ help="Replace file without asking if you are sure, use this flag with caution.",
111
+ )
112
+ parser.add_argument(
113
+ "-t",
114
+ "--threshold",
115
+ action="store",
116
+ default=0.2,
117
+ type=float,
118
+ dest="threshold",
119
+ help="Define a custom maximum amount of chaos allowed in decoded content. 0. <= chaos <= 1.",
120
+ )
121
+ parser.add_argument(
122
+ "--version",
123
+ action="version",
124
+ version="Charset-Normalizer {} - Python {} - Unicode {} - SpeedUp {}".format(
125
+ __version__,
126
+ python_version(),
127
+ unidata_version,
128
+ "OFF" if md_module.__file__.lower().endswith(".py") else "ON",
129
+ ),
130
+ help="Show version information and exit.",
131
+ )
132
+
133
+ args = parser.parse_args(argv)
134
+
135
+ if args.replace is True and args.normalize is False:
136
+ print("Use --replace in addition of --normalize only.", file=sys.stderr)
137
+ return 1
138
+
139
+ if args.force is True and args.replace is False:
140
+ print("Use --force in addition of --replace only.", file=sys.stderr)
141
+ return 1
142
+
143
+ if args.threshold < 0.0 or args.threshold > 1.0:
144
+ print("--threshold VALUE should be between 0. AND 1.", file=sys.stderr)
145
+ return 1
146
+
147
+ x_ = []
148
+
149
+ for my_file in args.files:
150
+ matches = from_fp(my_file, threshold=args.threshold, explain=args.verbose)
151
+
152
+ best_guess = matches.best()
153
+
154
+ if best_guess is None:
155
+ print(
156
+ 'Unable to identify originating encoding for "{}". {}'.format(
157
+ my_file.name,
158
+ "Maybe try increasing maximum amount of chaos."
159
+ if args.threshold < 1.0
160
+ else "",
161
+ ),
162
+ file=sys.stderr,
163
+ )
164
+ x_.append(
165
+ CliDetectionResult(
166
+ abspath(my_file.name),
167
+ None,
168
+ [],
169
+ [],
170
+ "Unknown",
171
+ [],
172
+ False,
173
+ 1.0,
174
+ 0.0,
175
+ None,
176
+ True,
177
+ )
178
+ )
179
+ else:
180
+ x_.append(
181
+ CliDetectionResult(
182
+ abspath(my_file.name),
183
+ best_guess.encoding,
184
+ best_guess.encoding_aliases,
185
+ [
186
+ cp
187
+ for cp in best_guess.could_be_from_charset
188
+ if cp != best_guess.encoding
189
+ ],
190
+ best_guess.language,
191
+ best_guess.alphabets,
192
+ best_guess.bom,
193
+ best_guess.percent_chaos,
194
+ best_guess.percent_coherence,
195
+ None,
196
+ True,
197
+ )
198
+ )
199
+
200
+ if len(matches) > 1 and args.alternatives:
201
+ for el in matches:
202
+ if el != best_guess:
203
+ x_.append(
204
+ CliDetectionResult(
205
+ abspath(my_file.name),
206
+ el.encoding,
207
+ el.encoding_aliases,
208
+ [
209
+ cp
210
+ for cp in el.could_be_from_charset
211
+ if cp != el.encoding
212
+ ],
213
+ el.language,
214
+ el.alphabets,
215
+ el.bom,
216
+ el.percent_chaos,
217
+ el.percent_coherence,
218
+ None,
219
+ False,
220
+ )
221
+ )
222
+
223
+ if args.normalize is True:
224
+ if best_guess.encoding.startswith("utf") is True:
225
+ print(
226
+ '"{}" file does not need to be normalized, as it already came from unicode.'.format(
227
+ my_file.name
228
+ ),
229
+ file=sys.stderr,
230
+ )
231
+ if my_file.closed is False:
232
+ my_file.close()
233
+ continue
234
+
235
+ dir_path = dirname(realpath(my_file.name))
236
+ file_name = basename(realpath(my_file.name))
237
+
238
+ o_: List[str] = file_name.split(".")
239
+
240
+ if args.replace is False:
241
+ o_.insert(-1, best_guess.encoding)
242
+ if my_file.closed is False:
243
+ my_file.close()
244
+ elif (
245
+ args.force is False
246
+ and query_yes_no(
247
+ 'Are you sure to normalize "{}" by replacing it ?'.format(
248
+ my_file.name
249
+ ),
250
+ "no",
251
+ )
252
+ is False
253
+ ):
254
+ if my_file.closed is False:
255
+ my_file.close()
256
+ continue
257
+
258
+ try:
259
+ x_[0].unicode_path = join(dir_path, ".".join(o_))
260
+
261
+ with open(x_[0].unicode_path, "w", encoding="utf-8") as fp:
262
+ fp.write(str(best_guess))
263
+ except IOError as e:
264
+ print(str(e), file=sys.stderr)
265
+ if my_file.closed is False:
266
+ my_file.close()
267
+ return 2
268
+
269
+ if my_file.closed is False:
270
+ my_file.close()
271
+
272
+ if args.minimal is False:
273
+ print(
274
+ dumps(
275
+ [el.__dict__ for el in x_] if len(x_) > 1 else x_[0].__dict__,
276
+ ensure_ascii=True,
277
+ indent=4,
278
+ )
279
+ )
280
+ else:
281
+ for my_file in args.files:
282
+ print(
283
+ ", ".join(
284
+ [
285
+ el.encoding or "undefined"
286
+ for el in x_
287
+ if el.path == abspath(my_file.name)
288
+ ]
289
+ )
290
+ )
291
+
292
+ return 0
293
+
294
+
295
+ if __name__ == "__main__":
296
+ cli_detect()
llmeval-env/lib/python3.10/site-packages/charset_normalizer/cli/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (276 Bytes). View file
 
llmeval-env/lib/python3.10/site-packages/charset_normalizer/cli/__pycache__/__main__.cpython-310.pyc ADDED
Binary file (6.47 kB). View file
 
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py34_np19.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1abdb3ff5b555831f51f7ff00951e66a49277fc2aa787293f18cf8775be65023
3
+ size 794
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py35_np19.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a56c3fc6e0db3a4102aaed4a19fd4e154eecd956f30b6bf9179897844ed3c01e
3
+ size 790
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e064c2eecfdc58d552844467da7bd56eca596098322bfd266a7e1312abdd5735
3
+ size 1068
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.bz2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e86d6f6ecfe2626cf691827ac38a81d64ec3ebb527c5432eb344b8496781b45a
3
+ size 1000
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_03.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0c45ae2a289841cbeba2443b7ebaa3b31c0a9e9dcc73294aca5729da0092405
3
+ size 236
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_04.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ecbe244294ba93e08479b16c1b9a9411e3569ff660ed0459dca1d241381df05
3
+ size 104
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_02.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c1cf36cb781fbcc21b953bb0a0b45df092da0eae0e765882e5963ccd70105b1
3
+ size 120
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_04.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ecbe244294ba93e08479b16c1b9a9411e3569ff660ed0459dca1d241381df05
3
+ size 104
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py33_np18.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3d4cbc690d3ce9e5323a714ea546f32c01ab1710285c420184f6cdf4b26fc25
3
+ size 691
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py33_np18.pkl_02.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c1cf36cb781fbcc21b953bb0a0b45df092da0eae0e765882e5963ccd70105b1
3
+ size 120
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py34_np19.pkl_01.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0efbd7d9ce7eec3a6e0a0db41e795e0396cca3d6b037dad6c61b464843d28809
3
+ size 120
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py34_np19.pkl_02.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c1cf36cb781fbcc21b953bb0a0b45df092da0eae0e765882e5963ccd70105b1
3
+ size 120
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py34_np19.pkl_03.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ede9a64a52b25d7db30950956c978ec0b3932b7d14acd5abc63216e64babde7
3
+ size 307
llmeval-env/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py35_np19.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59f0d522a29c333ce1d60480b2121fcc1a08a5d2dd650b86efdc987f991fa4ea
3
+ size 691
llmeval-env/lib/python3.10/site-packages/nvidia/__init__.py ADDED
File without changes
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/__init__.py ADDED
File without changes
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (190 Bytes). View file
 
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/__init__.py ADDED
File without changes
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/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
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/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
+
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_activity.h ADDED
The diff for this file is too large to render. See raw diff
 
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_callbacks.h ADDED
@@ -0,0 +1,762 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2010-2020 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
+ CUPTI_CB_DOMAIN_SIZE,
133
+
134
+ CUPTI_CB_DOMAIN_FORCE_INT = 0x7fffffff
135
+ } CUpti_CallbackDomain;
136
+
137
+ /**
138
+ * \brief Callback IDs for resource domain.
139
+ *
140
+ * Callback IDs for resource domain, CUPTI_CB_DOMAIN_RESOURCE. This
141
+ * value is communicated to the callback function via the \p cbid
142
+ * parameter.
143
+ */
144
+ typedef enum {
145
+ /**
146
+ * Invalid resource callback ID.
147
+ */
148
+ CUPTI_CBID_RESOURCE_INVALID = 0,
149
+ /**
150
+ * A new context has been created.
151
+ */
152
+ CUPTI_CBID_RESOURCE_CONTEXT_CREATED = 1,
153
+ /**
154
+ * A context is about to be destroyed.
155
+ */
156
+ CUPTI_CBID_RESOURCE_CONTEXT_DESTROY_STARTING = 2,
157
+ /**
158
+ * A new stream has been created.
159
+ */
160
+ CUPTI_CBID_RESOURCE_STREAM_CREATED = 3,
161
+ /**
162
+ * A stream is about to be destroyed.
163
+ */
164
+ CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING = 4,
165
+ /**
166
+ * The driver has finished initializing.
167
+ */
168
+ CUPTI_CBID_RESOURCE_CU_INIT_FINISHED = 5,
169
+ /**
170
+ * A module has been loaded.
171
+ */
172
+ CUPTI_CBID_RESOURCE_MODULE_LOADED = 6,
173
+ /**
174
+ * A module is about to be unloaded.
175
+ */
176
+ CUPTI_CBID_RESOURCE_MODULE_UNLOAD_STARTING = 7,
177
+ /**
178
+ * The current module which is being profiled.
179
+ */
180
+ CUPTI_CBID_RESOURCE_MODULE_PROFILED = 8,
181
+ /**
182
+ * CUDA graph has been created.
183
+ */
184
+ CUPTI_CBID_RESOURCE_GRAPH_CREATED = 9,
185
+ /**
186
+ * CUDA graph is about to be destroyed.
187
+ */
188
+ CUPTI_CBID_RESOURCE_GRAPH_DESTROY_STARTING = 10,
189
+ /**
190
+ * CUDA graph is cloned.
191
+ */
192
+ CUPTI_CBID_RESOURCE_GRAPH_CLONED = 11,
193
+ /**
194
+ * CUDA graph node is about to be created
195
+ */
196
+ CUPTI_CBID_RESOURCE_GRAPHNODE_CREATE_STARTING = 12,
197
+ /**
198
+ * CUDA graph node is created.
199
+ */
200
+ CUPTI_CBID_RESOURCE_GRAPHNODE_CREATED = 13,
201
+ /**
202
+ * CUDA graph node is about to be destroyed.
203
+ */
204
+ CUPTI_CBID_RESOURCE_GRAPHNODE_DESTROY_STARTING = 14,
205
+ /**
206
+ * Dependency on a CUDA graph node is created.
207
+ */
208
+ CUPTI_CBID_RESOURCE_GRAPHNODE_DEPENDENCY_CREATED = 15,
209
+ /**
210
+ * Dependency on a CUDA graph node is destroyed.
211
+ */
212
+ CUPTI_CBID_RESOURCE_GRAPHNODE_DEPENDENCY_DESTROY_STARTING = 16,
213
+ /**
214
+ * An executable CUDA graph is about to be created.
215
+ */
216
+ CUPTI_CBID_RESOURCE_GRAPHEXEC_CREATE_STARTING = 17,
217
+ /**
218
+ * An executable CUDA graph is created.
219
+ */
220
+ CUPTI_CBID_RESOURCE_GRAPHEXEC_CREATED = 18,
221
+ /**
222
+ * An executable CUDA graph is about to be destroyed.
223
+ */
224
+ CUPTI_CBID_RESOURCE_GRAPHEXEC_DESTROY_STARTING = 19,
225
+ /**
226
+ * CUDA graph node is cloned.
227
+ */
228
+ CUPTI_CBID_RESOURCE_GRAPHNODE_CLONED = 20,
229
+
230
+ CUPTI_CBID_RESOURCE_SIZE,
231
+ CUPTI_CBID_RESOURCE_FORCE_INT = 0x7fffffff
232
+ } CUpti_CallbackIdResource;
233
+
234
+ /**
235
+ * \brief Callback IDs for synchronization domain.
236
+ *
237
+ * Callback IDs for synchronization domain,
238
+ * CUPTI_CB_DOMAIN_SYNCHRONIZE. This value is communicated to the
239
+ * callback function via the \p cbid parameter.
240
+ */
241
+ typedef enum {
242
+ /**
243
+ * Invalid synchronize callback ID.
244
+ */
245
+ CUPTI_CBID_SYNCHRONIZE_INVALID = 0,
246
+ /**
247
+ * Stream synchronization has completed for the stream.
248
+ */
249
+ CUPTI_CBID_SYNCHRONIZE_STREAM_SYNCHRONIZED = 1,
250
+ /**
251
+ * Context synchronization has completed for the context.
252
+ */
253
+ CUPTI_CBID_SYNCHRONIZE_CONTEXT_SYNCHRONIZED = 2,
254
+ CUPTI_CBID_SYNCHRONIZE_SIZE,
255
+ CUPTI_CBID_SYNCHRONIZE_FORCE_INT = 0x7fffffff
256
+ } CUpti_CallbackIdSync;
257
+
258
+
259
+ /**
260
+ * \brief Data passed into a runtime or driver API callback function.
261
+ *
262
+ * Data passed into a runtime or driver API callback function as the
263
+ * \p cbdata argument to \ref CUpti_CallbackFunc. The \p cbdata will
264
+ * be this type for \p domain equal to CUPTI_CB_DOMAIN_DRIVER_API or
265
+ * CUPTI_CB_DOMAIN_RUNTIME_API. The callback data is valid only within
266
+ * the invocation of the callback function that is passed the data. If
267
+ * you need to retain some data for use outside of the callback, you
268
+ * must make a copy of that data. For example, if you make a shallow
269
+ * copy of CUpti_CallbackData within a callback, you cannot
270
+ * dereference \p functionParams outside of that callback to access
271
+ * the function parameters. \p functionName is an exception: the
272
+ * string pointed to by \p functionName is a global constant and so
273
+ * may be accessed outside of the callback.
274
+ */
275
+ typedef struct {
276
+ /**
277
+ * Point in the runtime or driver function from where the callback
278
+ * was issued.
279
+ */
280
+ CUpti_ApiCallbackSite callbackSite;
281
+
282
+ /**
283
+ * Name of the runtime or driver API function which issued the
284
+ * callback. This string is a global constant and so may be
285
+ * accessed outside of the callback.
286
+ */
287
+ const char *functionName;
288
+
289
+ /**
290
+ * Pointer to the arguments passed to the runtime or driver API
291
+ * call. See generated_cuda_runtime_api_meta.h and
292
+ * generated_cuda_meta.h for structure definitions for the
293
+ * parameters for each runtime and driver API function.
294
+ */
295
+ const void *functionParams;
296
+
297
+ /**
298
+ * Pointer to the return value of the runtime or driver API
299
+ * call. This field is only valid within the exit::CUPTI_API_EXIT
300
+ * callback. For a runtime API \p functionReturnValue points to a
301
+ * \p cudaError_t. For a driver API \p functionReturnValue points
302
+ * to a \p CUresult.
303
+ */
304
+ void *functionReturnValue;
305
+
306
+ /**
307
+ * Name of the symbol operated on by the runtime or driver API
308
+ * function which issued the callback. This entry is valid only for
309
+ * driver and runtime launch callbacks, where it returns the name of
310
+ * the kernel.
311
+ */
312
+ const char *symbolName;
313
+
314
+ /**
315
+ * Driver context current to the thread, or null if no context is
316
+ * current. This value can change from the entry to exit callback
317
+ * of a runtime API function if the runtime initializes a context.
318
+ */
319
+ CUcontext context;
320
+
321
+ /**
322
+ * Unique ID for the CUDA context associated with the thread. The
323
+ * UIDs are assigned sequentially as contexts are created and are
324
+ * unique within a process.
325
+ */
326
+ uint32_t contextUid;
327
+
328
+ /**
329
+ * Pointer to data shared between the entry and exit callbacks of
330
+ * a given runtime or drive API function invocation. This field
331
+ * can be used to pass 64-bit values from the entry callback to
332
+ * the corresponding exit callback.
333
+ */
334
+ uint64_t *correlationData;
335
+
336
+ /**
337
+ * The activity record correlation ID for this callback. For a
338
+ * driver domain callback (i.e. \p domain
339
+ * CUPTI_CB_DOMAIN_DRIVER_API) this ID will equal the correlation ID
340
+ * in the CUpti_ActivityAPI record corresponding to the CUDA driver
341
+ * function call. For a runtime domain callback (i.e. \p domain
342
+ * CUPTI_CB_DOMAIN_RUNTIME_API) this ID will equal the correlation
343
+ * ID in the CUpti_ActivityAPI record corresponding to the CUDA
344
+ * runtime function call. Within the callback, this ID can be
345
+ * recorded to correlate user data with the activity record. This
346
+ * field is new in 4.1.
347
+ */
348
+ uint32_t correlationId;
349
+
350
+ } CUpti_CallbackData;
351
+
352
+ /**
353
+ * \brief Data passed into a resource callback function.
354
+ *
355
+ * Data passed into a resource callback function as the \p cbdata
356
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
357
+ * type for \p domain equal to CUPTI_CB_DOMAIN_RESOURCE. The callback
358
+ * data is valid only within the invocation of the callback function
359
+ * that is passed the data. If you need to retain some data for use
360
+ * outside of the callback, you must make a copy of that data.
361
+ */
362
+ typedef struct {
363
+ /**
364
+ * For CUPTI_CBID_RESOURCE_CONTEXT_CREATED and
365
+ * CUPTI_CBID_RESOURCE_CONTEXT_DESTROY_STARTING, the context being
366
+ * created or destroyed. For CUPTI_CBID_RESOURCE_STREAM_CREATED and
367
+ * CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING, the context
368
+ * containing the stream being created or destroyed.
369
+ */
370
+ CUcontext context;
371
+
372
+ union {
373
+ /**
374
+ * For CUPTI_CBID_RESOURCE_STREAM_CREATED and
375
+ * CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING, the stream being
376
+ * created or destroyed.
377
+ */
378
+ CUstream stream;
379
+ } resourceHandle;
380
+
381
+ /**
382
+ * Reserved for future use.
383
+ */
384
+ void *resourceDescriptor;
385
+ } CUpti_ResourceData;
386
+
387
+
388
+ /**
389
+ * \brief Module data passed into a resource callback function.
390
+ *
391
+ * CUDA module data passed into a resource callback function as the \p cbdata
392
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
393
+ * type for \p domain equal to CUPTI_CB_DOMAIN_RESOURCE. The module
394
+ * data is valid only within the invocation of the callback function
395
+ * that is passed the data. If you need to retain some data for use
396
+ * outside of the callback, you must make a copy of that data.
397
+ */
398
+
399
+ typedef struct {
400
+ /**
401
+ * Identifier to associate with the CUDA module.
402
+ */
403
+ uint32_t moduleId;
404
+
405
+ /**
406
+ * The size of the cubin.
407
+ */
408
+ size_t cubinSize;
409
+
410
+ /**
411
+ * Pointer to the associated cubin.
412
+ */
413
+ const char *pCubin;
414
+ } CUpti_ModuleResourceData;
415
+
416
+ /**
417
+ * \brief CUDA graphs data passed into a resource callback function.
418
+ *
419
+ * CUDA graphs data passed into a resource callback function as the \p cbdata
420
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
421
+ * type for \p domain equal to CUPTI_CB_DOMAIN_RESOURCE. The graph
422
+ * data is valid only within the invocation of the callback function
423
+ * that is passed the data. If you need to retain some data for use
424
+ * outside of the callback, you must make a copy of that data.
425
+ */
426
+
427
+ typedef struct {
428
+ /**
429
+ * CUDA graph
430
+ */
431
+ CUgraph graph;
432
+ /**
433
+ * The original CUDA graph from which \param graph is cloned
434
+ */
435
+ CUgraph originalGraph;
436
+ /**
437
+ * CUDA graph node
438
+ */
439
+ CUgraphNode node;
440
+ /**
441
+ * The original CUDA graph node from which \param node is cloned
442
+ */
443
+ CUgraphNode originalNode;
444
+ /**
445
+ * Type of the \param node
446
+ */
447
+ CUgraphNodeType nodeType;
448
+ /**
449
+ * The dependent graph node
450
+ * The size of the array is \param numDependencies.
451
+ */
452
+ CUgraphNode dependency;
453
+ /**
454
+ * CUDA executable graph
455
+ */
456
+ CUgraphExec graphExec;
457
+ } CUpti_GraphData;
458
+
459
+ /**
460
+ * \brief Data passed into a synchronize callback function.
461
+ *
462
+ * Data passed into a synchronize callback function as the \p cbdata
463
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
464
+ * type for \p domain equal to CUPTI_CB_DOMAIN_SYNCHRONIZE. The
465
+ * callback data is valid only within the invocation of the callback
466
+ * function that is passed the data. If you need to retain some data
467
+ * for use outside of the callback, you must make a copy of that data.
468
+ */
469
+ typedef struct {
470
+ /**
471
+ * The context of the stream being synchronized.
472
+ */
473
+ CUcontext context;
474
+ /**
475
+ * The stream being synchronized.
476
+ */
477
+ CUstream stream;
478
+ } CUpti_SynchronizeData;
479
+
480
+ /**
481
+ * \brief Data passed into a NVTX callback function.
482
+ *
483
+ * Data passed into a NVTX callback function as the \p cbdata argument
484
+ * to \ref CUpti_CallbackFunc. The \p cbdata will be this type for \p
485
+ * domain equal to CUPTI_CB_DOMAIN_NVTX. Unless otherwise notes, the
486
+ * callback data is valid only within the invocation of the callback
487
+ * function that is passed the data. If you need to retain some data
488
+ * for use outside of the callback, you must make a copy of that data.
489
+ */
490
+ typedef struct {
491
+ /**
492
+ * Name of the NVTX API function which issued the callback. This
493
+ * string is a global constant and so may be accessed outside of the
494
+ * callback.
495
+ */
496
+ const char *functionName;
497
+
498
+ /**
499
+ * Pointer to the arguments passed to the NVTX API call. See
500
+ * generated_nvtx_meta.h for structure definitions for the
501
+ * parameters for each NVTX API function.
502
+ */
503
+ const void *functionParams;
504
+
505
+ /**
506
+ * Pointer to the return value of the NVTX API call. See
507
+ * nvToolsExt.h for each NVTX API function's return value.
508
+ */
509
+ const void *functionReturnValue;
510
+ } CUpti_NvtxData;
511
+
512
+ /**
513
+ * \brief An ID for a driver API, runtime API, resource or
514
+ * synchronization callback.
515
+ *
516
+ * An ID for a driver API, runtime API, resource or synchronization
517
+ * callback. Within a driver API callback this should be interpreted
518
+ * as a CUpti_driver_api_trace_cbid value (these values are defined in
519
+ * cupti_driver_cbid.h). Within a runtime API callback this should be
520
+ * interpreted as a CUpti_runtime_api_trace_cbid value (these values
521
+ * are defined in cupti_runtime_cbid.h). Within a resource API
522
+ * callback this should be interpreted as a \ref
523
+ * CUpti_CallbackIdResource value. Within a synchronize API callback
524
+ * this should be interpreted as a \ref CUpti_CallbackIdSync value.
525
+ */
526
+ typedef uint32_t CUpti_CallbackId;
527
+
528
+ /**
529
+ * \brief Function type for a callback.
530
+ *
531
+ * Function type for a callback. The type of the data passed to the
532
+ * callback in \p cbdata depends on the \p domain. If \p domain is
533
+ * CUPTI_CB_DOMAIN_DRIVER_API or CUPTI_CB_DOMAIN_RUNTIME_API the type
534
+ * of \p cbdata will be CUpti_CallbackData. If \p domain is
535
+ * CUPTI_CB_DOMAIN_RESOURCE the type of \p cbdata will be
536
+ * CUpti_ResourceData. If \p domain is CUPTI_CB_DOMAIN_SYNCHRONIZE the
537
+ * type of \p cbdata will be CUpti_SynchronizeData. If \p domain is
538
+ * CUPTI_CB_DOMAIN_NVTX the type of \p cbdata will be CUpti_NvtxData.
539
+ *
540
+ * \param userdata User data supplied at subscription of the callback
541
+ * \param domain The domain of the callback
542
+ * \param cbid The ID of the callback
543
+ * \param cbdata Data passed to the callback.
544
+ */
545
+ typedef void (CUPTIAPI *CUpti_CallbackFunc)(
546
+ void *userdata,
547
+ CUpti_CallbackDomain domain,
548
+ CUpti_CallbackId cbid,
549
+ const void *cbdata);
550
+
551
+ /**
552
+ * \brief A callback subscriber.
553
+ */
554
+ typedef struct CUpti_Subscriber_st *CUpti_SubscriberHandle;
555
+
556
+ /**
557
+ * \brief Pointer to an array of callback domains.
558
+ */
559
+ typedef CUpti_CallbackDomain *CUpti_DomainTable;
560
+
561
+ /**
562
+ * \brief Get the available callback domains.
563
+ *
564
+ * Returns in \p *domainTable an array of size \p *domainCount of all
565
+ * the available callback domains.
566
+ * \note \b Thread-safety: this function is thread safe.
567
+ *
568
+ * \param domainCount Returns number of callback domains
569
+ * \param domainTable Returns pointer to array of available callback domains
570
+ *
571
+ * \retval CUPTI_SUCCESS on success
572
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialize CUPTI
573
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p domainCount or \p domainTable are NULL
574
+ */
575
+ CUptiResult CUPTIAPI cuptiSupportedDomains(size_t *domainCount,
576
+ CUpti_DomainTable *domainTable);
577
+
578
+ /**
579
+ * \brief Initialize a callback subscriber with a callback function
580
+ * and user data.
581
+ *
582
+ * Initializes a callback subscriber with a callback function and
583
+ * (optionally) a pointer to user data. The returned subscriber handle
584
+ * can be used to enable and disable the callback for specific domains
585
+ * and callback IDs.
586
+ * \note Only a single subscriber can be registered at a time. To ensure
587
+ * that no other CUPTI client interrupts the profiling session, it's the
588
+ * responsibility of all the CUPTI clients to call this function before
589
+ * starting the profling session. In case profiling session is already
590
+ * started by another CUPTI client, this function returns the error code
591
+ * CUPTI_ERROR_MULTIPLE_SUBSCRIBERS_NOT_SUPPORTED.
592
+ * Note that this function returns the same error when application is
593
+ * launched using NVIDIA tools like nvprof, Visual Profiler, Nsight Systems,
594
+ * Nsight Compute, cuda-gdb and cuda-memcheck.
595
+ * \note This function does not enable any callbacks.
596
+ * \note \b Thread-safety: this function is thread safe.
597
+ *
598
+ * \param subscriber Returns handle to initialize subscriber
599
+ * \param callback The callback function
600
+ * \param userdata A pointer to user data. This data will be passed to
601
+ * the callback function via the \p userdata paramater.
602
+ *
603
+ * \retval CUPTI_SUCCESS on success
604
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialize CUPTI
605
+ * \retval CUPTI_ERROR_MULTIPLE_SUBSCRIBERS_NOT_SUPPORTED if there is already a CUPTI subscriber
606
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber is NULL
607
+ */
608
+ CUptiResult CUPTIAPI cuptiSubscribe(CUpti_SubscriberHandle *subscriber,
609
+ CUpti_CallbackFunc callback,
610
+ void *userdata);
611
+
612
+ /**
613
+ * \brief Unregister a callback subscriber.
614
+ *
615
+ * Removes a callback subscriber so that no future callbacks will be
616
+ * issued to that subscriber.
617
+ * \note \b Thread-safety: this function is thread safe.
618
+ *
619
+ * \param subscriber Handle to the initialize subscriber
620
+ *
621
+ * \retval CUPTI_SUCCESS on success
622
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
623
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber is NULL or not initialized
624
+ */
625
+ CUptiResult CUPTIAPI cuptiUnsubscribe(CUpti_SubscriberHandle subscriber);
626
+
627
+ /**
628
+ * \brief Get the current enabled/disabled state of a callback for a specific
629
+ * domain and function ID.
630
+ *
631
+ * Returns non-zero in \p *enable if the callback for a domain and
632
+ * callback ID is enabled, and zero if not enabled.
633
+ *
634
+ * \note \b Thread-safety: a subscriber must serialize access to
635
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
636
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackState(sub,
637
+ * d, c) and cuptiEnableCallback(sub, d, c) are called concurrently,
638
+ * the results are undefined.
639
+ *
640
+ * \param enable Returns non-zero if callback enabled, zero if not enabled
641
+ * \param subscriber Handle to the initialize subscriber
642
+ * \param domain The domain of the callback
643
+ * \param cbid The ID of the callback
644
+ *
645
+ * \retval CUPTI_SUCCESS on success
646
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
647
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p enabled is NULL, or if \p
648
+ * subscriber, \p domain or \p cbid is invalid.
649
+ */
650
+ CUptiResult CUPTIAPI cuptiGetCallbackState(uint32_t *enable,
651
+ CUpti_SubscriberHandle subscriber,
652
+ CUpti_CallbackDomain domain,
653
+ CUpti_CallbackId cbid);
654
+
655
+ /**
656
+ * \brief Enable or disabled callbacks for a specific domain and
657
+ * callback ID.
658
+ *
659
+ * Enable or disabled callbacks for a subscriber for a specific domain
660
+ * and callback ID.
661
+ *
662
+ * \note \b Thread-safety: a subscriber must serialize access to
663
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
664
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackState(sub,
665
+ * d, c) and cuptiEnableCallback(sub, d, c) are called concurrently,
666
+ * the results are undefined.
667
+ *
668
+ * \param enable New enable state for the callback. Zero disables the
669
+ * callback, non-zero enables the callback.
670
+ * \param subscriber - Handle to callback subscription
671
+ * \param domain The domain of the callback
672
+ * \param cbid The ID of the callback
673
+ *
674
+ * \retval CUPTI_SUCCESS on success
675
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
676
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber, \p domain or \p
677
+ * cbid is invalid.
678
+ */
679
+ CUptiResult CUPTIAPI cuptiEnableCallback(uint32_t enable,
680
+ CUpti_SubscriberHandle subscriber,
681
+ CUpti_CallbackDomain domain,
682
+ CUpti_CallbackId cbid);
683
+
684
+ /**
685
+ * \brief Enable or disabled all callbacks for a specific domain.
686
+ *
687
+ * Enable or disabled all callbacks for a specific domain.
688
+ *
689
+ * \note \b Thread-safety: a subscriber must serialize access to
690
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
691
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackEnabled(sub,
692
+ * d, *) and cuptiEnableDomain(sub, d) are called concurrently, the
693
+ * results are undefined.
694
+ *
695
+ * \param enable New enable state for all callbacks in the
696
+ * domain. Zero disables all callbacks, non-zero enables all
697
+ * callbacks.
698
+ * \param subscriber - Handle to callback subscription
699
+ * \param domain The domain of the callback
700
+ *
701
+ * \retval CUPTI_SUCCESS on success
702
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
703
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber or \p domain is invalid
704
+ */
705
+ CUptiResult CUPTIAPI cuptiEnableDomain(uint32_t enable,
706
+ CUpti_SubscriberHandle subscriber,
707
+ CUpti_CallbackDomain domain);
708
+
709
+ /**
710
+ * \brief Enable or disable all callbacks in all domains.
711
+ *
712
+ * Enable or disable all callbacks in all domains.
713
+ *
714
+ * \note \b Thread-safety: a subscriber must serialize access to
715
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
716
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackState(sub,
717
+ * d, *) and cuptiEnableAllDomains(sub) are called concurrently, the
718
+ * results are undefined.
719
+ *
720
+ * \param enable New enable state for all callbacks in all
721
+ * domain. Zero disables all callbacks, non-zero enables all
722
+ * callbacks.
723
+ * \param subscriber - Handle to callback subscription
724
+ *
725
+ * \retval CUPTI_SUCCESS on success
726
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
727
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber is invalid
728
+ */
729
+ CUptiResult CUPTIAPI cuptiEnableAllDomains(uint32_t enable,
730
+ CUpti_SubscriberHandle subscriber);
731
+
732
+ /**
733
+ * \brief Get the name of a callback for a specific domain and callback ID.
734
+ *
735
+ * Returns a pointer to the name c_string in \p **name.
736
+ *
737
+ * \note \b Names are available only for the DRIVER and RUNTIME domains.
738
+ *
739
+ * \param domain The domain of the callback
740
+ * \param cbid The ID of the callback
741
+ * \param name Returns pointer to the name string on success, NULL otherwise
742
+ *
743
+ * \retval CUPTI_SUCCESS on success
744
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p name is NULL, or if
745
+ * \p domain or \p cbid is invalid.
746
+ */
747
+ CUptiResult CUPTIAPI cuptiGetCallbackName(CUpti_CallbackDomain domain,
748
+ uint32_t cbid,
749
+ const char **name);
750
+
751
+ /** @} */ /* END CUPTI_CALLBACK_API */
752
+
753
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
754
+ #pragma GCC visibility pop
755
+ #endif
756
+
757
+ #if defined(__cplusplus)
758
+ }
759
+ #endif
760
+
761
+ #endif // file guard
762
+
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/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
+ }}}
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_driver_cbid.h ADDED
@@ -0,0 +1,725 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ typedef enum CUpti_driver_api_trace_cbid_enum {
10
+ CUPTI_DRIVER_TRACE_CBID_INVALID = 0,
11
+ CUPTI_DRIVER_TRACE_CBID_cuInit = 1,
12
+ CUPTI_DRIVER_TRACE_CBID_cuDriverGetVersion = 2,
13
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGet = 3,
14
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetCount = 4,
15
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetName = 5,
16
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceComputeCapability = 6,
17
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceTotalMem = 7,
18
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetProperties = 8,
19
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetAttribute = 9,
20
+ CUPTI_DRIVER_TRACE_CBID_cuCtxCreate = 10,
21
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDestroy = 11,
22
+ CUPTI_DRIVER_TRACE_CBID_cuCtxAttach = 12,
23
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDetach = 13,
24
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPushCurrent = 14,
25
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPopCurrent = 15,
26
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetDevice = 16,
27
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSynchronize = 17,
28
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoad = 18,
29
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoadData = 19,
30
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoadDataEx = 20,
31
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoadFatBinary = 21,
32
+ CUPTI_DRIVER_TRACE_CBID_cuModuleUnload = 22,
33
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetFunction = 23,
34
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetGlobal = 24,
35
+ CUPTI_DRIVER_TRACE_CBID_cu64ModuleGetGlobal = 25,
36
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetTexRef = 26,
37
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetInfo = 27,
38
+ CUPTI_DRIVER_TRACE_CBID_cu64MemGetInfo = 28,
39
+ CUPTI_DRIVER_TRACE_CBID_cuMemAlloc = 29,
40
+ CUPTI_DRIVER_TRACE_CBID_cu64MemAlloc = 30,
41
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocPitch = 31,
42
+ CUPTI_DRIVER_TRACE_CBID_cu64MemAllocPitch = 32,
43
+ CUPTI_DRIVER_TRACE_CBID_cuMemFree = 33,
44
+ CUPTI_DRIVER_TRACE_CBID_cu64MemFree = 34,
45
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAddressRange = 35,
46
+ CUPTI_DRIVER_TRACE_CBID_cu64MemGetAddressRange = 36,
47
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocHost = 37,
48
+ CUPTI_DRIVER_TRACE_CBID_cuMemFreeHost = 38,
49
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostAlloc = 39,
50
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostGetDevicePointer = 40,
51
+ CUPTI_DRIVER_TRACE_CBID_cu64MemHostGetDevicePointer = 41,
52
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostGetFlags = 42,
53
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoD = 43,
54
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyHtoD = 44,
55
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoH = 45,
56
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoH = 46,
57
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoD = 47,
58
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoD = 48,
59
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoA = 49,
60
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoA = 50,
61
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoD = 51,
62
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyAtoD = 52,
63
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoA = 53,
64
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoH = 54,
65
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoA = 55,
66
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2D = 56,
67
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DUnaligned = 57,
68
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3D = 58,
69
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy3D = 59,
70
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoDAsync = 60,
71
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyHtoDAsync = 61,
72
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoHAsync = 62,
73
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoHAsync = 63,
74
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoDAsync = 64,
75
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoDAsync = 65,
76
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoAAsync = 66,
77
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoHAsync = 67,
78
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DAsync = 68,
79
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DAsync = 69,
80
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy3DAsync = 70,
81
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8 = 71,
82
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD8 = 72,
83
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16 = 73,
84
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD16 = 74,
85
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32 = 75,
86
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD32 = 76,
87
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8 = 77,
88
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D8 = 78,
89
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16 = 79,
90
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D16 = 80,
91
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32 = 81,
92
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D32 = 82,
93
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetBlockShape = 83,
94
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetSharedSize = 84,
95
+ CUPTI_DRIVER_TRACE_CBID_cuFuncGetAttribute = 85,
96
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetCacheConfig = 86,
97
+ CUPTI_DRIVER_TRACE_CBID_cuArrayCreate = 87,
98
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetDescriptor = 88,
99
+ CUPTI_DRIVER_TRACE_CBID_cuArrayDestroy = 89,
100
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DCreate = 90,
101
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DGetDescriptor = 91,
102
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefCreate = 92,
103
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefDestroy = 93,
104
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetArray = 94,
105
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress = 95,
106
+ CUPTI_DRIVER_TRACE_CBID_cu64TexRefSetAddress = 96,
107
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress2D = 97,
108
+ CUPTI_DRIVER_TRACE_CBID_cu64TexRefSetAddress2D = 98,
109
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetFormat = 99,
110
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddressMode = 100,
111
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetFilterMode = 101,
112
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetFlags = 102,
113
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetAddress = 103,
114
+ CUPTI_DRIVER_TRACE_CBID_cu64TexRefGetAddress = 104,
115
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetArray = 105,
116
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetAddressMode = 106,
117
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetFilterMode = 107,
118
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetFormat = 108,
119
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetFlags = 109,
120
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetSize = 110,
121
+ CUPTI_DRIVER_TRACE_CBID_cuParamSeti = 111,
122
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetf = 112,
123
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetv = 113,
124
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetTexRef = 114,
125
+ CUPTI_DRIVER_TRACE_CBID_cuLaunch = 115,
126
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchGrid = 116,
127
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchGridAsync = 117,
128
+ CUPTI_DRIVER_TRACE_CBID_cuEventCreate = 118,
129
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecord = 119,
130
+ CUPTI_DRIVER_TRACE_CBID_cuEventQuery = 120,
131
+ CUPTI_DRIVER_TRACE_CBID_cuEventSynchronize = 121,
132
+ CUPTI_DRIVER_TRACE_CBID_cuEventDestroy = 122,
133
+ CUPTI_DRIVER_TRACE_CBID_cuEventElapsedTime = 123,
134
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCreate = 124,
135
+ CUPTI_DRIVER_TRACE_CBID_cuStreamQuery = 125,
136
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSynchronize = 126,
137
+ CUPTI_DRIVER_TRACE_CBID_cuStreamDestroy = 127,
138
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsUnregisterResource = 128,
139
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsSubResourceGetMappedArray = 129,
140
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedPointer = 130,
141
+ CUPTI_DRIVER_TRACE_CBID_cu64GraphicsResourceGetMappedPointer = 131,
142
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceSetMapFlags = 132,
143
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsMapResources = 133,
144
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsUnmapResources = 134,
145
+ CUPTI_DRIVER_TRACE_CBID_cuGetExportTable = 135,
146
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetLimit = 136,
147
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetLimit = 137,
148
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10GetDevice = 138,
149
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10CtxCreate = 139,
150
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsD3D10RegisterResource = 140,
151
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10RegisterResource = 141,
152
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10UnregisterResource = 142,
153
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10MapResources = 143,
154
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10UnmapResources = 144,
155
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceSetMapFlags = 145,
156
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedArray = 146,
157
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPointer = 147,
158
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedSize = 148,
159
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPitch = 149,
160
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetSurfaceDimensions = 150,
161
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11GetDevice = 151,
162
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11CtxCreate = 152,
163
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsD3D11RegisterResource = 153,
164
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9GetDevice = 154,
165
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9CtxCreate = 155,
166
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsD3D9RegisterResource = 156,
167
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9GetDirect3DDevice = 157,
168
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9RegisterResource = 158,
169
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnregisterResource = 159,
170
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9MapResources = 160,
171
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnmapResources = 161,
172
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceSetMapFlags = 162,
173
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetSurfaceDimensions = 163,
174
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedArray = 164,
175
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPointer = 165,
176
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedSize = 166,
177
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPitch = 167,
178
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9Begin = 168,
179
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9End = 169,
180
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9RegisterVertexBuffer = 170,
181
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9MapVertexBuffer = 171,
182
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnmapVertexBuffer = 172,
183
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnregisterVertexBuffer = 173,
184
+ CUPTI_DRIVER_TRACE_CBID_cuGLCtxCreate = 174,
185
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsGLRegisterBuffer = 175,
186
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsGLRegisterImage = 176,
187
+ CUPTI_DRIVER_TRACE_CBID_cuWGLGetDevice = 177,
188
+ CUPTI_DRIVER_TRACE_CBID_cuGLInit = 178,
189
+ CUPTI_DRIVER_TRACE_CBID_cuGLRegisterBufferObject = 179,
190
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObject = 180,
191
+ CUPTI_DRIVER_TRACE_CBID_cuGLUnmapBufferObject = 181,
192
+ CUPTI_DRIVER_TRACE_CBID_cuGLUnregisterBufferObject = 182,
193
+ CUPTI_DRIVER_TRACE_CBID_cuGLSetBufferObjectMapFlags = 183,
194
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObjectAsync = 184,
195
+ CUPTI_DRIVER_TRACE_CBID_cuGLUnmapBufferObjectAsync = 185,
196
+ CUPTI_DRIVER_TRACE_CBID_cuVDPAUGetDevice = 186,
197
+ CUPTI_DRIVER_TRACE_CBID_cuVDPAUCtxCreate = 187,
198
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsVDPAURegisterVideoSurface = 188,
199
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsVDPAURegisterOutputSurface = 189,
200
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetSurfRef = 190,
201
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefCreate = 191,
202
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefDestroy = 192,
203
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefSetFormat = 193,
204
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefSetArray = 194,
205
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefGetFormat = 195,
206
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefGetArray = 196,
207
+ CUPTI_DRIVER_TRACE_CBID_cu64DeviceTotalMem = 197,
208
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetMappedPointer = 198,
209
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetMappedSize = 199,
210
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetMappedPitch = 200,
211
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetSurfaceDimensions = 201,
212
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetSurfaceDimensions = 202,
213
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetMappedPointer = 203,
214
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetMappedSize = 204,
215
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetMappedPitch = 205,
216
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9MapVertexBuffer = 206,
217
+ CUPTI_DRIVER_TRACE_CBID_cu64GLMapBufferObject = 207,
218
+ CUPTI_DRIVER_TRACE_CBID_cu64GLMapBufferObjectAsync = 208,
219
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11GetDevices = 209,
220
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11CtxCreateOnDevice = 210,
221
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10GetDevices = 211,
222
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10CtxCreateOnDevice = 212,
223
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9GetDevices = 213,
224
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9CtxCreateOnDevice = 214,
225
+ CUPTI_DRIVER_TRACE_CBID_cu64MemHostAlloc = 215,
226
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8Async = 216,
227
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD8Async = 217,
228
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16Async = 218,
229
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD16Async = 219,
230
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32Async = 220,
231
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD32Async = 221,
232
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8Async = 222,
233
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D8Async = 223,
234
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16Async = 224,
235
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D16Async = 225,
236
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32Async = 226,
237
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D32Async = 227,
238
+ CUPTI_DRIVER_TRACE_CBID_cu64ArrayCreate = 228,
239
+ CUPTI_DRIVER_TRACE_CBID_cu64ArrayGetDescriptor = 229,
240
+ CUPTI_DRIVER_TRACE_CBID_cu64Array3DCreate = 230,
241
+ CUPTI_DRIVER_TRACE_CBID_cu64Array3DGetDescriptor = 231,
242
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy2D = 232,
243
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy2DUnaligned = 233,
244
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy2DAsync = 234,
245
+ CUPTI_DRIVER_TRACE_CBID_cuCtxCreate_v2 = 235,
246
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10CtxCreate_v2 = 236,
247
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11CtxCreate_v2 = 237,
248
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9CtxCreate_v2 = 238,
249
+ CUPTI_DRIVER_TRACE_CBID_cuGLCtxCreate_v2 = 239,
250
+ CUPTI_DRIVER_TRACE_CBID_cuVDPAUCtxCreate_v2 = 240,
251
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetGlobal_v2 = 241,
252
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetInfo_v2 = 242,
253
+ CUPTI_DRIVER_TRACE_CBID_cuMemAlloc_v2 = 243,
254
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocPitch_v2 = 244,
255
+ CUPTI_DRIVER_TRACE_CBID_cuMemFree_v2 = 245,
256
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAddressRange_v2 = 246,
257
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostGetDevicePointer_v2 = 247,
258
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy_v2 = 248,
259
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8_v2 = 249,
260
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16_v2 = 250,
261
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32_v2 = 251,
262
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8_v2 = 252,
263
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16_v2 = 253,
264
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32_v2 = 254,
265
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress_v2 = 255,
266
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress2D_v2 = 256,
267
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetAddress_v2 = 257,
268
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedPointer_v2 = 258,
269
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceTotalMem_v2 = 259,
270
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPointer_v2 = 260,
271
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedSize_v2 = 261,
272
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPitch_v2 = 262,
273
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetSurfaceDimensions_v2 = 263,
274
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetSurfaceDimensions_v2 = 264,
275
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPointer_v2 = 265,
276
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedSize_v2 = 266,
277
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPitch_v2 = 267,
278
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9MapVertexBuffer_v2 = 268,
279
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObject_v2 = 269,
280
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObjectAsync_v2 = 270,
281
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostAlloc_v2 = 271,
282
+ CUPTI_DRIVER_TRACE_CBID_cuArrayCreate_v2 = 272,
283
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetDescriptor_v2 = 273,
284
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DCreate_v2 = 274,
285
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DGetDescriptor_v2 = 275,
286
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoD_v2 = 276,
287
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoDAsync_v2 = 277,
288
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoH_v2 = 278,
289
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoHAsync_v2 = 279,
290
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoD_v2 = 280,
291
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoDAsync_v2 = 281,
292
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoH_v2 = 282,
293
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoHAsync_v2 = 283,
294
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoD_v2 = 284,
295
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoA_v2 = 285,
296
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoA_v2 = 286,
297
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2D_v2 = 287,
298
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DUnaligned_v2 = 288,
299
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DAsync_v2 = 289,
300
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3D_v2 = 290,
301
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DAsync_v2 = 291,
302
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoA_v2 = 292,
303
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoAAsync_v2 = 293,
304
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocHost_v2 = 294,
305
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitEvent = 295,
306
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetApiVersion = 296,
307
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10GetDirect3DDevice = 297,
308
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11GetDirect3DDevice = 298,
309
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetCacheConfig = 299,
310
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetCacheConfig = 300,
311
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostRegister = 301,
312
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostUnregister = 302,
313
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetCurrent = 303,
314
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetCurrent = 304,
315
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy = 305,
316
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAsync = 306,
317
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernel = 307,
318
+ CUPTI_DRIVER_TRACE_CBID_cuProfilerStart = 308,
319
+ CUPTI_DRIVER_TRACE_CBID_cuProfilerStop = 309,
320
+ CUPTI_DRIVER_TRACE_CBID_cuPointerGetAttribute = 310,
321
+ CUPTI_DRIVER_TRACE_CBID_cuProfilerInitialize = 311,
322
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceCanAccessPeer = 312,
323
+ CUPTI_DRIVER_TRACE_CBID_cuCtxEnablePeerAccess = 313,
324
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDisablePeerAccess = 314,
325
+ CUPTI_DRIVER_TRACE_CBID_cuMemPeerRegister = 315,
326
+ CUPTI_DRIVER_TRACE_CBID_cuMemPeerUnregister = 316,
327
+ CUPTI_DRIVER_TRACE_CBID_cuMemPeerGetDevicePointer = 317,
328
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeer = 318,
329
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeerAsync = 319,
330
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeer = 320,
331
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeerAsync = 321,
332
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDestroy_v2 = 322,
333
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPushCurrent_v2 = 323,
334
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPopCurrent_v2 = 324,
335
+ CUPTI_DRIVER_TRACE_CBID_cuEventDestroy_v2 = 325,
336
+ CUPTI_DRIVER_TRACE_CBID_cuStreamDestroy_v2 = 326,
337
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress2D_v3 = 327,
338
+ CUPTI_DRIVER_TRACE_CBID_cuIpcGetMemHandle = 328,
339
+ CUPTI_DRIVER_TRACE_CBID_cuIpcOpenMemHandle = 329,
340
+ CUPTI_DRIVER_TRACE_CBID_cuIpcCloseMemHandle = 330,
341
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetByPCIBusId = 331,
342
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetPCIBusId = 332,
343
+ CUPTI_DRIVER_TRACE_CBID_cuGLGetDevices = 333,
344
+ CUPTI_DRIVER_TRACE_CBID_cuIpcGetEventHandle = 334,
345
+ CUPTI_DRIVER_TRACE_CBID_cuIpcOpenEventHandle = 335,
346
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetSharedMemConfig = 336,
347
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetSharedMemConfig = 337,
348
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetSharedMemConfig = 338,
349
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectCreate = 339,
350
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectDestroy = 340,
351
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectGetResourceDesc = 341,
352
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectGetTextureDesc = 342,
353
+ CUPTI_DRIVER_TRACE_CBID_cuSurfObjectCreate = 343,
354
+ CUPTI_DRIVER_TRACE_CBID_cuSurfObjectDestroy = 344,
355
+ CUPTI_DRIVER_TRACE_CBID_cuSurfObjectGetResourceDesc = 345,
356
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAddCallback = 346,
357
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayCreate = 347,
358
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayGetLevel = 348,
359
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayDestroy = 349,
360
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmappedArray = 350,
361
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmapFilterMode = 351,
362
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmapLevelBias = 352,
363
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmapLevelClamp = 353,
364
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMaxAnisotropy = 354,
365
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmappedArray = 355,
366
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmapFilterMode = 356,
367
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmapLevelBias = 357,
368
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmapLevelClamp = 358,
369
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMaxAnisotropy = 359,
370
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedMipmappedArray = 360,
371
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectGetResourceViewDesc = 361,
372
+ CUPTI_DRIVER_TRACE_CBID_cuLinkCreate = 362,
373
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddData = 363,
374
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddFile = 364,
375
+ CUPTI_DRIVER_TRACE_CBID_cuLinkComplete = 365,
376
+ CUPTI_DRIVER_TRACE_CBID_cuLinkDestroy = 366,
377
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCreateWithPriority = 367,
378
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetPriority = 368,
379
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetFlags = 369,
380
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetStreamPriorityRange = 370,
381
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocManaged = 371,
382
+ CUPTI_DRIVER_TRACE_CBID_cuGetErrorString = 372,
383
+ CUPTI_DRIVER_TRACE_CBID_cuGetErrorName = 373,
384
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxActiveBlocksPerMultiprocessor = 374,
385
+ CUPTI_DRIVER_TRACE_CBID_cuCompilePtx = 375,
386
+ CUPTI_DRIVER_TRACE_CBID_cuBinaryFree = 376,
387
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAttachMemAsync = 377,
388
+ CUPTI_DRIVER_TRACE_CBID_cuPointerSetAttribute = 378,
389
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostRegister_v2 = 379,
390
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceSetMapFlags_v2 = 380,
391
+ CUPTI_DRIVER_TRACE_CBID_cuLinkCreate_v2 = 381,
392
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddData_v2 = 382,
393
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddFile_v2 = 383,
394
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxPotentialBlockSize = 384,
395
+ CUPTI_DRIVER_TRACE_CBID_cuGLGetDevices_v2 = 385,
396
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxRetain = 386,
397
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxRelease = 387,
398
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxSetFlags = 388,
399
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxReset = 389,
400
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsEGLRegisterImage = 390,
401
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetFlags = 391,
402
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxGetState = 392,
403
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerConnect = 393,
404
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerDisconnect = 394,
405
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerAcquireFrame = 395,
406
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerReleaseFrame = 396,
407
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoD_v2_ptds = 397,
408
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoH_v2_ptds = 398,
409
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoD_v2_ptds = 399,
410
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoA_v2_ptds = 400,
411
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoD_v2_ptds = 401,
412
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoA_v2_ptds = 402,
413
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoH_v2_ptds = 403,
414
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoA_v2_ptds = 404,
415
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2D_v2_ptds = 405,
416
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DUnaligned_v2_ptds = 406,
417
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3D_v2_ptds = 407,
418
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy_ptds = 408,
419
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeer_ptds = 409,
420
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeer_ptds = 410,
421
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8_v2_ptds = 411,
422
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16_v2_ptds = 412,
423
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32_v2_ptds = 413,
424
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8_v2_ptds = 414,
425
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16_v2_ptds = 415,
426
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32_v2_ptds = 416,
427
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObject_v2_ptds = 417,
428
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAsync_ptsz = 418,
429
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoAAsync_v2_ptsz = 419,
430
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoHAsync_v2_ptsz = 420,
431
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoDAsync_v2_ptsz = 421,
432
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoHAsync_v2_ptsz = 422,
433
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoDAsync_v2_ptsz = 423,
434
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DAsync_v2_ptsz = 424,
435
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DAsync_v2_ptsz = 425,
436
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeerAsync_ptsz = 426,
437
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeerAsync_ptsz = 427,
438
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8Async_ptsz = 428,
439
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16Async_ptsz = 429,
440
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32Async_ptsz = 430,
441
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8Async_ptsz = 431,
442
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16Async_ptsz = 432,
443
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32Async_ptsz = 433,
444
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetPriority_ptsz = 434,
445
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetFlags_ptsz = 435,
446
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitEvent_ptsz = 436,
447
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAddCallback_ptsz = 437,
448
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAttachMemAsync_ptsz = 438,
449
+ CUPTI_DRIVER_TRACE_CBID_cuStreamQuery_ptsz = 439,
450
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSynchronize_ptsz = 440,
451
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecord_ptsz = 441,
452
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernel_ptsz = 442,
453
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsMapResources_ptsz = 443,
454
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsUnmapResources_ptsz = 444,
455
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObjectAsync_v2_ptsz = 445,
456
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerConnect = 446,
457
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerDisconnect = 447,
458
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerPresentFrame = 448,
459
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedEglFrame = 449,
460
+ CUPTI_DRIVER_TRACE_CBID_cuPointerGetAttributes = 450,
461
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = 451,
462
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxPotentialBlockSizeWithFlags = 452,
463
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerReturnFrame = 453,
464
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetP2PAttribute = 454,
465
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetBorderColor = 455,
466
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetBorderColor = 456,
467
+ CUPTI_DRIVER_TRACE_CBID_cuMemAdvise = 457,
468
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32 = 458,
469
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32_ptsz = 459,
470
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32 = 460,
471
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32_ptsz = 461,
472
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp = 462,
473
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp_ptsz = 463,
474
+ CUPTI_DRIVER_TRACE_CBID_cuNVNbufferGetPointer = 464,
475
+ CUPTI_DRIVER_TRACE_CBID_cuNVNtextureGetArray = 465,
476
+ CUPTI_DRIVER_TRACE_CBID_cuNNSetAllocator = 466,
477
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync = 467,
478
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync_ptsz = 468,
479
+ CUPTI_DRIVER_TRACE_CBID_cuEventCreateFromNVNSync = 469,
480
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerConnectWithFlags = 470,
481
+ CUPTI_DRIVER_TRACE_CBID_cuMemRangeGetAttribute = 471,
482
+ CUPTI_DRIVER_TRACE_CBID_cuMemRangeGetAttributes = 472,
483
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64 = 473,
484
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64_ptsz = 474,
485
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64 = 475,
486
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64_ptsz = 476,
487
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchCooperativeKernel = 477,
488
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchCooperativeKernel_ptsz = 478,
489
+ CUPTI_DRIVER_TRACE_CBID_cuEventCreateFromEGLSync = 479,
490
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchCooperativeKernelMultiDevice = 480,
491
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetAttribute = 481,
492
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetUuid = 482,
493
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCtx = 483,
494
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCtx_ptsz = 484,
495
+ CUPTI_DRIVER_TRACE_CBID_cuImportExternalMemory = 485,
496
+ CUPTI_DRIVER_TRACE_CBID_cuExternalMemoryGetMappedBuffer = 486,
497
+ CUPTI_DRIVER_TRACE_CBID_cuExternalMemoryGetMappedMipmappedArray = 487,
498
+ CUPTI_DRIVER_TRACE_CBID_cuDestroyExternalMemory = 488,
499
+ CUPTI_DRIVER_TRACE_CBID_cuImportExternalSemaphore = 489,
500
+ CUPTI_DRIVER_TRACE_CBID_cuSignalExternalSemaphoresAsync = 490,
501
+ CUPTI_DRIVER_TRACE_CBID_cuSignalExternalSemaphoresAsync_ptsz = 491,
502
+ CUPTI_DRIVER_TRACE_CBID_cuWaitExternalSemaphoresAsync = 492,
503
+ CUPTI_DRIVER_TRACE_CBID_cuWaitExternalSemaphoresAsync_ptsz = 493,
504
+ CUPTI_DRIVER_TRACE_CBID_cuDestroyExternalSemaphore = 494,
505
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture = 495,
506
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture_ptsz = 496,
507
+ CUPTI_DRIVER_TRACE_CBID_cuStreamEndCapture = 497,
508
+ CUPTI_DRIVER_TRACE_CBID_cuStreamEndCapture_ptsz = 498,
509
+ CUPTI_DRIVER_TRACE_CBID_cuStreamIsCapturing = 499,
510
+ CUPTI_DRIVER_TRACE_CBID_cuStreamIsCapturing_ptsz = 500,
511
+ CUPTI_DRIVER_TRACE_CBID_cuGraphCreate = 501,
512
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddKernelNode = 502,
513
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeGetParams = 503,
514
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemcpyNode = 504,
515
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemcpyNodeGetParams = 505,
516
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemsetNode = 506,
517
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemsetNodeGetParams = 507,
518
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemsetNodeSetParams = 508,
519
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetType = 509,
520
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetRootNodes = 510,
521
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependencies = 511,
522
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependentNodes = 512,
523
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiate = 513,
524
+ CUPTI_DRIVER_TRACE_CBID_cuGraphLaunch = 514,
525
+ CUPTI_DRIVER_TRACE_CBID_cuGraphLaunch_ptsz = 515,
526
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecDestroy = 516,
527
+ CUPTI_DRIVER_TRACE_CBID_cuGraphDestroy = 517,
528
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddDependencies = 518,
529
+ CUPTI_DRIVER_TRACE_CBID_cuGraphRemoveDependencies = 519,
530
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemcpyNodeSetParams = 520,
531
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeSetParams = 521,
532
+ CUPTI_DRIVER_TRACE_CBID_cuGraphDestroyNode = 522,
533
+ CUPTI_DRIVER_TRACE_CBID_cuGraphClone = 523,
534
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeFindInClone = 524,
535
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddChildGraphNode = 525,
536
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddEmptyNode = 526,
537
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchHostFunc = 527,
538
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchHostFunc_ptsz = 528,
539
+ CUPTI_DRIVER_TRACE_CBID_cuGraphChildGraphNodeGetGraph = 529,
540
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddHostNode = 530,
541
+ CUPTI_DRIVER_TRACE_CBID_cuGraphHostNodeGetParams = 531,
542
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetLuid = 532,
543
+ CUPTI_DRIVER_TRACE_CBID_cuGraphHostNodeSetParams = 533,
544
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetNodes = 534,
545
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetEdges = 535,
546
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo = 536,
547
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_ptsz = 537,
548
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecKernelNodeSetParams = 538,
549
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture_v2 = 539,
550
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture_v2_ptsz = 540,
551
+ CUPTI_DRIVER_TRACE_CBID_cuThreadExchangeStreamCaptureMode = 541,
552
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetNvSciSyncAttributes = 542,
553
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyAvailableDynamicSMemPerBlock = 543,
554
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxRelease_v2 = 544,
555
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxReset_v2 = 545,
556
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxSetFlags_v2 = 546,
557
+ CUPTI_DRIVER_TRACE_CBID_cuMemAddressReserve = 547,
558
+ CUPTI_DRIVER_TRACE_CBID_cuMemAddressFree = 548,
559
+ CUPTI_DRIVER_TRACE_CBID_cuMemCreate = 549,
560
+ CUPTI_DRIVER_TRACE_CBID_cuMemRelease = 550,
561
+ CUPTI_DRIVER_TRACE_CBID_cuMemMap = 551,
562
+ CUPTI_DRIVER_TRACE_CBID_cuMemUnmap = 552,
563
+ CUPTI_DRIVER_TRACE_CBID_cuMemSetAccess = 553,
564
+ CUPTI_DRIVER_TRACE_CBID_cuMemExportToShareableHandle = 554,
565
+ CUPTI_DRIVER_TRACE_CBID_cuMemImportFromShareableHandle = 555,
566
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAllocationGranularity = 556,
567
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAllocationPropertiesFromHandle = 557,
568
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAccess = 558,
569
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetFlags = 559,
570
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetFlags_ptsz = 560,
571
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecUpdate = 561,
572
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecMemcpyNodeSetParams = 562,
573
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecMemsetNodeSetParams = 563,
574
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecHostNodeSetParams = 564,
575
+ CUPTI_DRIVER_TRACE_CBID_cuMemRetainAllocationHandle = 565,
576
+ CUPTI_DRIVER_TRACE_CBID_cuFuncGetModule = 566,
577
+ CUPTI_DRIVER_TRACE_CBID_cuIpcOpenMemHandle_v2 = 567,
578
+ CUPTI_DRIVER_TRACE_CBID_cuCtxResetPersistingL2Cache = 568,
579
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeCopyAttributes = 569,
580
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeGetAttribute = 570,
581
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeSetAttribute = 571,
582
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCopyAttributes = 572,
583
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCopyAttributes_ptsz = 573,
584
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetAttribute = 574,
585
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetAttribute_ptsz = 575,
586
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetAttribute = 576,
587
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetAttribute_ptsz = 577,
588
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiate_v2 = 578,
589
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetTexture1DLinearMaxWidth = 579,
590
+ CUPTI_DRIVER_TRACE_CBID_cuGraphUpload = 580,
591
+ CUPTI_DRIVER_TRACE_CBID_cuGraphUpload_ptsz = 581,
592
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetSparseProperties = 582,
593
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayGetSparseProperties = 583,
594
+ CUPTI_DRIVER_TRACE_CBID_cuMemMapArrayAsync = 584,
595
+ CUPTI_DRIVER_TRACE_CBID_cuMemMapArrayAsync_ptsz = 585,
596
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecChildGraphNodeSetParams = 586,
597
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecordWithFlags = 587,
598
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecordWithFlags_ptsz = 588,
599
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddEventRecordNode = 589,
600
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddEventWaitNode = 590,
601
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventRecordNodeGetEvent = 591,
602
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventWaitNodeGetEvent = 592,
603
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventRecordNodeSetEvent = 593,
604
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventWaitNodeSetEvent = 594,
605
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecEventRecordNodeSetEvent = 595,
606
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecEventWaitNodeSetEvent = 596,
607
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetPlane = 597,
608
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocAsync = 598,
609
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocAsync_ptsz = 599,
610
+ CUPTI_DRIVER_TRACE_CBID_cuMemFreeAsync = 600,
611
+ CUPTI_DRIVER_TRACE_CBID_cuMemFreeAsync_ptsz = 601,
612
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolTrimTo = 602,
613
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolSetAttribute = 603,
614
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolGetAttribute = 604,
615
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolSetAccess = 605,
616
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetDefaultMemPool = 606,
617
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolCreate = 607,
618
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolDestroy = 608,
619
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceSetMemPool = 609,
620
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetMemPool = 610,
621
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocFromPoolAsync = 611,
622
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocFromPoolAsync_ptsz = 612,
623
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolExportToShareableHandle = 613,
624
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolImportFromShareableHandle = 614,
625
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolExportPointer = 615,
626
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolImportPointer = 616,
627
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolGetAccess = 617,
628
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddExternalSemaphoresSignalNode = 618,
629
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresSignalNodeGetParams = 619,
630
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresSignalNodeSetParams = 620,
631
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddExternalSemaphoresWaitNode = 621,
632
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresWaitNodeGetParams = 622,
633
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresWaitNodeSetParams = 623,
634
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecExternalSemaphoresSignalNodeSetParams = 624,
635
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecExternalSemaphoresWaitNodeSetParams = 625,
636
+ CUPTI_DRIVER_TRACE_CBID_cuGetProcAddress = 626,
637
+ CUPTI_DRIVER_TRACE_CBID_cuFlushGPUDirectRDMAWrites = 627,
638
+ CUPTI_DRIVER_TRACE_CBID_cuGraphDebugDotPrint = 628,
639
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v2 = 629,
640
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v2_ptsz = 630,
641
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies = 631,
642
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies_ptsz = 632,
643
+ CUPTI_DRIVER_TRACE_CBID_cuUserObjectCreate = 633,
644
+ CUPTI_DRIVER_TRACE_CBID_cuUserObjectRetain = 634,
645
+ CUPTI_DRIVER_TRACE_CBID_cuUserObjectRelease = 635,
646
+ CUPTI_DRIVER_TRACE_CBID_cuGraphRetainUserObject = 636,
647
+ CUPTI_DRIVER_TRACE_CBID_cuGraphReleaseUserObject = 637,
648
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemAllocNode = 638,
649
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemFreeNode = 639,
650
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGraphMemTrim = 640,
651
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetGraphMemAttribute = 641,
652
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceSetGraphMemAttribute = 642,
653
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiateWithFlags = 643,
654
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetExecAffinitySupport = 644,
655
+ CUPTI_DRIVER_TRACE_CBID_cuCtxCreate_v3 = 645,
656
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetExecAffinity = 646,
657
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetUuid_v2 = 647,
658
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemAllocNodeGetParams = 648,
659
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemFreeNodeGetParams = 649,
660
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeSetEnabled = 650,
661
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetEnabled = 651,
662
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernelEx = 652,
663
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernelEx_ptsz = 653,
664
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetMemoryRequirements = 654,
665
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayGetMemoryRequirements = 655,
666
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiateWithParams = 656,
667
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiateWithParams_ptsz = 657,
668
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecGetFlags = 658,
669
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32_v2 = 659,
670
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32_v2_ptsz = 660,
671
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64_v2 = 661,
672
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64_v2_ptsz = 662,
673
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32_v2 = 663,
674
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32_v2_ptsz = 664,
675
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64_v2 = 665,
676
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64_v2_ptsz = 666,
677
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp_v2 = 667,
678
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp_v2_ptsz = 668,
679
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddBatchMemOpNode = 669,
680
+ CUPTI_DRIVER_TRACE_CBID_cuGraphBatchMemOpNodeGetParams = 670,
681
+ CUPTI_DRIVER_TRACE_CBID_cuGraphBatchMemOpNodeSetParams = 671,
682
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecBatchMemOpNodeSetParams = 672,
683
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetLoadingMode = 673,
684
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetHandleForAddressRange = 674,
685
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxPotentialClusterSize = 675,
686
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxActiveClusters = 676,
687
+ CUPTI_DRIVER_TRACE_CBID_cuGetProcAddress_v2 = 677,
688
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryLoadData = 678,
689
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryLoadFromFile = 679,
690
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryUnload = 680,
691
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetKernel = 681,
692
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetModule = 682,
693
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetFunction = 683,
694
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetGlobal = 684,
695
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetManaged = 685,
696
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetAttribute = 686,
697
+ CUPTI_DRIVER_TRACE_CBID_cuKernelSetAttribute = 687,
698
+ CUPTI_DRIVER_TRACE_CBID_cuKernelSetCacheConfig = 688,
699
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddKernelNode_v2 = 689,
700
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeGetParams_v2 = 690,
701
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeSetParams_v2 = 691,
702
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecKernelNodeSetParams_v2 = 692,
703
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetId = 693,
704
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetId_ptsz = 694,
705
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetId = 695,
706
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecUpdate_v2 = 696,
707
+ CUPTI_DRIVER_TRACE_CBID_cuTensorMapEncodeTiled = 697,
708
+ CUPTI_DRIVER_TRACE_CBID_cuTensorMapEncodeIm2col = 698,
709
+ CUPTI_DRIVER_TRACE_CBID_cuTensorMapReplaceAddress = 699,
710
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetUnifiedFunction = 700,
711
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpGetAttribute = 701,
712
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpGetAttributeGlobal = 702,
713
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpSetAttribute = 703,
714
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpSetAttributeGlobal = 704,
715
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetFlags = 705,
716
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastCreate = 706,
717
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastAddDevice = 707,
718
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastBindMem = 708,
719
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastBindAddr = 709,
720
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastUnbind = 710,
721
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastGetGranularity = 711,
722
+ CUPTI_DRIVER_TRACE_CBID_SIZE = 712,
723
+ CUPTI_DRIVER_TRACE_CBID_FORCE_INT = 0x7fffffff
724
+ } CUpti_driver_api_trace_cbid;
725
+
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_events.h ADDED
@@ -0,0 +1,1371 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2010-2021 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 CUPTI event API from the header cupti_events.h are not supported on devices
79
+ * with compute capability 7.5 and higher (i.e. Turing and later GPU architectures).
80
+ * These API will be deprecated in a future CUDA release. These are replaced by
81
+ * Profiling API in the header cupti_profiler_target.h and Perfworks metrics API
82
+ * in the headers nvperf_host.h and nvperf_target.h which are supported on
83
+ * devices with compute capability 7.0 and higher (i.e. Volta and later GPU
84
+ * architectures).
85
+ *
86
+ * @{
87
+ */
88
+
89
+ /**
90
+ * \brief ID for an event.
91
+ *
92
+ * An event represents a countable activity, action, or occurrence on
93
+ * the device.
94
+ */
95
+ typedef uint32_t CUpti_EventID;
96
+
97
+ /**
98
+ * \brief ID for an event domain.
99
+ *
100
+ * ID for an event domain. An event domain represents a group of
101
+ * related events. A device may have multiple instances of a domain,
102
+ * indicating that the device can simultaneously record multiple
103
+ * instances of each event within that domain.
104
+ */
105
+ typedef uint32_t CUpti_EventDomainID;
106
+
107
+ /**
108
+ * \brief A group of events.
109
+ *
110
+ * An event group is a collection of events that are managed
111
+ * together. All events in an event group must belong to the same
112
+ * domain.
113
+ */
114
+ typedef void *CUpti_EventGroup;
115
+
116
+ /**
117
+ * \brief Device class.
118
+ *
119
+ * Enumeration of device classes for device attribute
120
+ * CUPTI_DEVICE_ATTR_DEVICE_CLASS.
121
+ */
122
+ typedef enum {
123
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_TESLA = 0,
124
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_QUADRO = 1,
125
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_GEFORCE = 2,
126
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_TEGRA = 3,
127
+ } CUpti_DeviceAttributeDeviceClass;
128
+
129
+ /**
130
+ * \brief Device attributes.
131
+ *
132
+ * CUPTI device attributes. These attributes can be read using \ref
133
+ * cuptiDeviceGetAttribute.
134
+ */
135
+ typedef enum {
136
+ /**
137
+ * Number of event IDs for a device. Value is a uint32_t.
138
+ */
139
+ CUPTI_DEVICE_ATTR_MAX_EVENT_ID = 1,
140
+ /**
141
+ * Number of event domain IDs for a device. Value is a uint32_t.
142
+ */
143
+ CUPTI_DEVICE_ATTR_MAX_EVENT_DOMAIN_ID = 2,
144
+ /**
145
+ * Get global memory bandwidth in Kbytes/sec. Value is a uint64_t.
146
+ */
147
+ CUPTI_DEVICE_ATTR_GLOBAL_MEMORY_BANDWIDTH = 3,
148
+ /**
149
+ * Get theoretical maximum number of instructions per cycle. Value
150
+ * is a uint32_t.
151
+ */
152
+ CUPTI_DEVICE_ATTR_INSTRUCTION_PER_CYCLE = 4,
153
+ /**
154
+ * Get theoretical maximum number of single precision instructions
155
+ * that can be executed per second. Value is a uint64_t.
156
+ */
157
+ CUPTI_DEVICE_ATTR_INSTRUCTION_THROUGHPUT_SINGLE_PRECISION = 5,
158
+ /**
159
+ * Get number of frame buffers for device. Value is a uint64_t.
160
+ */
161
+ CUPTI_DEVICE_ATTR_MAX_FRAME_BUFFERS = 6,
162
+ /**
163
+ * Get PCIE link rate in Mega bits/sec for device. Return 0 if bus-type
164
+ * is non-PCIE. Value is a uint64_t.
165
+ */
166
+ CUPTI_DEVICE_ATTR_PCIE_LINK_RATE = 7,
167
+ /**
168
+ * Get PCIE link width for device. Return 0 if bus-type
169
+ * is non-PCIE. Value is a uint64_t.
170
+ */
171
+ CUPTI_DEVICE_ATTR_PCIE_LINK_WIDTH = 8,
172
+ /**
173
+ * Get PCIE generation for device. Return 0 if bus-type
174
+ * is non-PCIE. Value is a uint64_t.
175
+ */
176
+ CUPTI_DEVICE_ATTR_PCIE_GEN = 9,
177
+ /**
178
+ * Get the class for the device. Value is a
179
+ * CUpti_DeviceAttributeDeviceClass.
180
+ */
181
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS = 10,
182
+ /**
183
+ * Get the peak single precision flop per cycle. Value is a uint64_t.
184
+ */
185
+ CUPTI_DEVICE_ATTR_FLOP_SP_PER_CYCLE = 11,
186
+ /**
187
+ * Get the peak double precision flop per cycle. Value is a uint64_t.
188
+ */
189
+ CUPTI_DEVICE_ATTR_FLOP_DP_PER_CYCLE = 12,
190
+ /**
191
+ * Get number of L2 units. Value is a uint64_t.
192
+ */
193
+ CUPTI_DEVICE_ATTR_MAX_L2_UNITS = 13,
194
+ /**
195
+ * Get the maximum shared memory for the CU_FUNC_CACHE_PREFER_SHARED
196
+ * preference. Value is a uint64_t.
197
+ */
198
+ CUPTI_DEVICE_ATTR_MAX_SHARED_MEMORY_CACHE_CONFIG_PREFER_SHARED = 14,
199
+ /**
200
+ * Get the maximum shared memory for the CU_FUNC_CACHE_PREFER_L1
201
+ * preference. Value is a uint64_t.
202
+ */
203
+ CUPTI_DEVICE_ATTR_MAX_SHARED_MEMORY_CACHE_CONFIG_PREFER_L1 = 15,
204
+ /**
205
+ * Get the maximum shared memory for the CU_FUNC_CACHE_PREFER_EQUAL
206
+ * preference. Value is a uint64_t.
207
+ */
208
+ CUPTI_DEVICE_ATTR_MAX_SHARED_MEMORY_CACHE_CONFIG_PREFER_EQUAL = 16,
209
+ /**
210
+ * Get the peak half precision flop per cycle. Value is a uint64_t.
211
+ */
212
+ CUPTI_DEVICE_ATTR_FLOP_HP_PER_CYCLE = 17,
213
+ /**
214
+ * Check if Nvlink is connected to device. Returns 1, if at least one
215
+ * Nvlink is connected to the device, returns 0 otherwise.
216
+ * Value is a uint32_t.
217
+ */
218
+ CUPTI_DEVICE_ATTR_NVLINK_PRESENT = 18,
219
+ /**
220
+ * Check if Nvlink is present between GPU and CPU. Returns Bandwidth,
221
+ * in Bytes/sec, if Nvlink is present, returns 0 otherwise.
222
+ * Value is a uint64_t.
223
+ */
224
+ CUPTI_DEVICE_ATTR_GPU_CPU_NVLINK_BW = 19,
225
+ /**
226
+ * Check if NVSwitch is present in the underlying topology.
227
+ * Returns 1, if present, returns 0 otherwise.
228
+ * Value is a uint32_t.
229
+ */
230
+ CUPTI_DEVICE_ATTR_NVSWITCH_PRESENT = 20,
231
+ CUPTI_DEVICE_ATTR_FORCE_INT = 0x7fffffff,
232
+ } CUpti_DeviceAttribute;
233
+
234
+ /**
235
+ * \brief Event domain attributes.
236
+ *
237
+ * Event domain attributes. Except where noted, all the attributes can
238
+ * be read using either \ref cuptiDeviceGetEventDomainAttribute or
239
+ * \ref cuptiEventDomainGetAttribute.
240
+ */
241
+ typedef enum {
242
+ /**
243
+ * Event domain name. Value is a null terminated const c-string.
244
+ */
245
+ CUPTI_EVENT_DOMAIN_ATTR_NAME = 0,
246
+ /**
247
+ * Number of instances of the domain for which event counts will be
248
+ * collected. The domain may have additional instances that cannot
249
+ * be profiled (see CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT).
250
+ * Can be read only with \ref
251
+ * cuptiDeviceGetEventDomainAttribute. Value is a uint32_t.
252
+ */
253
+ CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT = 1,
254
+ /**
255
+ * Total number of instances of the domain, including instances that
256
+ * cannot be profiled. Use CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT
257
+ * to get the number of instances that can be profiled. Can be read
258
+ * only with \ref cuptiDeviceGetEventDomainAttribute. Value is a
259
+ * uint32_t.
260
+ */
261
+ CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT = 3,
262
+ /**
263
+ * Collection method used for events contained in the event domain.
264
+ * Value is a \ref CUpti_EventCollectionMethod.
265
+ */
266
+ CUPTI_EVENT_DOMAIN_ATTR_COLLECTION_METHOD = 4,
267
+
268
+ CUPTI_EVENT_DOMAIN_ATTR_FORCE_INT = 0x7fffffff,
269
+ } CUpti_EventDomainAttribute;
270
+
271
+ /**
272
+ * \brief The collection method used for an event.
273
+ *
274
+ * The collection method indicates how an event is collected.
275
+ */
276
+ typedef enum {
277
+ /**
278
+ * Event is collected using a hardware global performance monitor.
279
+ */
280
+ CUPTI_EVENT_COLLECTION_METHOD_PM = 0,
281
+ /**
282
+ * Event is collected using a hardware SM performance monitor.
283
+ */
284
+ CUPTI_EVENT_COLLECTION_METHOD_SM = 1,
285
+ /**
286
+ * Event is collected using software instrumentation.
287
+ */
288
+ CUPTI_EVENT_COLLECTION_METHOD_INSTRUMENTED = 2,
289
+ /**
290
+ * Event is collected using NvLink throughput counter method.
291
+ */
292
+ CUPTI_EVENT_COLLECTION_METHOD_NVLINK_TC = 3,
293
+ CUPTI_EVENT_COLLECTION_METHOD_FORCE_INT = 0x7fffffff
294
+ } CUpti_EventCollectionMethod;
295
+
296
+ /**
297
+ * \brief Event group attributes.
298
+ *
299
+ * Event group attributes. These attributes can be read using \ref
300
+ * cuptiEventGroupGetAttribute. Attributes marked [rw] can also be
301
+ * written using \ref cuptiEventGroupSetAttribute.
302
+ */
303
+ typedef enum {
304
+ /**
305
+ * The domain to which the event group is bound. This attribute is
306
+ * set when the first event is added to the group. Value is a
307
+ * CUpti_EventDomainID.
308
+ */
309
+ CUPTI_EVENT_GROUP_ATTR_EVENT_DOMAIN_ID = 0,
310
+ /**
311
+ * [rw] Profile all the instances of the domain for this
312
+ * eventgroup. This feature can be used to get load balancing
313
+ * across all instances of a domain. Value is an integer.
314
+ */
315
+ CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES = 1,
316
+ /**
317
+ * [rw] Reserved for user data.
318
+ */
319
+ CUPTI_EVENT_GROUP_ATTR_USER_DATA = 2,
320
+ /**
321
+ * Number of events in the group. Value is a uint32_t.
322
+ */
323
+ CUPTI_EVENT_GROUP_ATTR_NUM_EVENTS = 3,
324
+ /**
325
+ * Enumerates events in the group. Value is a pointer to buffer of
326
+ * size sizeof(CUpti_EventID) * num_of_events in the eventgroup.
327
+ * num_of_events can be queried using
328
+ * CUPTI_EVENT_GROUP_ATTR_NUM_EVENTS.
329
+ */
330
+ CUPTI_EVENT_GROUP_ATTR_EVENTS = 4,
331
+ /**
332
+ * Number of instances of the domain bound to this event group that
333
+ * will be counted. Value is a uint32_t.
334
+ */
335
+ CUPTI_EVENT_GROUP_ATTR_INSTANCE_COUNT = 5,
336
+ /**
337
+ * Event group scope can be set to CUPTI_EVENT_PROFILING_SCOPE_DEVICE or
338
+ * CUPTI_EVENT_PROFILING_SCOPE_CONTEXT for an eventGroup, before
339
+ * adding any event.
340
+ * Sets the scope of eventgroup as CUPTI_EVENT_PROFILING_SCOPE_DEVICE or
341
+ * CUPTI_EVENT_PROFILING_SCOPE_CONTEXT when the scope of the events
342
+ * that will be added is CUPTI_EVENT_PROFILING_SCOPE_BOTH.
343
+ * If profiling scope of event is either
344
+ * CUPTI_EVENT_PROFILING_SCOPE_DEVICE or CUPTI_EVENT_PROFILING_SCOPE_CONTEXT
345
+ * then setting this attribute will not affect the default scope.
346
+ * It is not allowed to add events of different scope to same eventgroup.
347
+ * Value is a uint32_t.
348
+ */
349
+ CUPTI_EVENT_GROUP_ATTR_PROFILING_SCOPE = 6,
350
+ CUPTI_EVENT_GROUP_ATTR_FORCE_INT = 0x7fffffff,
351
+ } CUpti_EventGroupAttribute;
352
+
353
+ /**
354
+ * \brief Profiling scope for event.
355
+ *
356
+ * Profiling scope of event indicates if the event can be collected at context
357
+ * scope or device scope or both i.e. it can be collected at any of context or
358
+ * device scope.
359
+ */
360
+ typedef enum {
361
+ /**
362
+ * Event is collected at context scope.
363
+ */
364
+ CUPTI_EVENT_PROFILING_SCOPE_CONTEXT = 0,
365
+ /**
366
+ * Event is collected at device scope.
367
+ */
368
+ CUPTI_EVENT_PROFILING_SCOPE_DEVICE = 1,
369
+ /**
370
+ * Event can be collected at device or context scope.
371
+ * The scope can be set using \ref cuptiEventGroupSetAttribute API.
372
+ */
373
+ CUPTI_EVENT_PROFILING_SCOPE_BOTH = 2,
374
+ CUPTI_EVENT_PROFILING_SCOPE_FORCE_INT = 0x7fffffff
375
+ } CUpti_EventProfilingScope;
376
+
377
+ /**
378
+ * \brief Event attributes.
379
+ *
380
+ * Event attributes. These attributes can be read using \ref
381
+ * cuptiEventGetAttribute.
382
+ */
383
+ typedef enum {
384
+ /**
385
+ * Event name. Value is a null terminated const c-string.
386
+ */
387
+ CUPTI_EVENT_ATTR_NAME = 0,
388
+ /**
389
+ * Short description of event. Value is a null terminated const
390
+ * c-string.
391
+ */
392
+ CUPTI_EVENT_ATTR_SHORT_DESCRIPTION = 1,
393
+ /**
394
+ * Long description of event. Value is a null terminated const
395
+ * c-string.
396
+ */
397
+ CUPTI_EVENT_ATTR_LONG_DESCRIPTION = 2,
398
+ /**
399
+ * Category of event. Value is CUpti_EventCategory.
400
+ */
401
+ CUPTI_EVENT_ATTR_CATEGORY = 3,
402
+ /**
403
+ * Profiling scope of the events. It can be either device or context or both.
404
+ * Value is a \ref CUpti_EventProfilingScope.
405
+ */
406
+ CUPTI_EVENT_ATTR_PROFILING_SCOPE = 5,
407
+
408
+ CUPTI_EVENT_ATTR_FORCE_INT = 0x7fffffff,
409
+ } CUpti_EventAttribute;
410
+
411
+ /**
412
+ * \brief Event collection modes.
413
+ *
414
+ * The event collection mode determines the period over which the
415
+ * events within the enabled event groups will be collected.
416
+ */
417
+ typedef enum {
418
+ /**
419
+ * Events are collected for the entire duration between the
420
+ * cuptiEventGroupEnable and cuptiEventGroupDisable calls.
421
+ * Event values are reset when the events are read.
422
+ * For CUDA toolkit v6.0 and older this was the default mode.
423
+ */
424
+ CUPTI_EVENT_COLLECTION_MODE_CONTINUOUS = 0,
425
+ /**
426
+ * Events are collected only for the durations of kernel executions
427
+ * that occur between the cuptiEventGroupEnable and
428
+ * cuptiEventGroupDisable calls. Event collection begins when a
429
+ * kernel execution begins, and stops when kernel execution
430
+ * completes. Event values are reset to zero when each kernel
431
+ * execution begins. If multiple kernel executions occur between the
432
+ * cuptiEventGroupEnable and cuptiEventGroupDisable calls then the
433
+ * event values must be read after each kernel launch if those
434
+ * events need to be associated with the specific kernel launch.
435
+ * Note that collection in this mode may significantly change the
436
+ * overall performance characteristics of the application because
437
+ * kernel executions that occur between the cuptiEventGroupEnable and
438
+ * cuptiEventGroupDisable calls are serialized on the GPU.
439
+ * This is the default mode from CUDA toolkit v6.5
440
+ */
441
+ CUPTI_EVENT_COLLECTION_MODE_KERNEL = 1,
442
+ CUPTI_EVENT_COLLECTION_MODE_FORCE_INT = 0x7fffffff
443
+ } CUpti_EventCollectionMode;
444
+
445
+ /**
446
+ * \brief An event category.
447
+ *
448
+ * Each event is assigned to a category that represents the general
449
+ * type of the event. A event's category is accessed using \ref
450
+ * cuptiEventGetAttribute and the CUPTI_EVENT_ATTR_CATEGORY attribute.
451
+ */
452
+ typedef enum {
453
+ /**
454
+ * An instruction related event.
455
+ */
456
+ CUPTI_EVENT_CATEGORY_INSTRUCTION = 0,
457
+ /**
458
+ * A memory related event.
459
+ */
460
+ CUPTI_EVENT_CATEGORY_MEMORY = 1,
461
+ /**
462
+ * A cache related event.
463
+ */
464
+ CUPTI_EVENT_CATEGORY_CACHE = 2,
465
+ /**
466
+ * A profile-trigger event.
467
+ */
468
+ CUPTI_EVENT_CATEGORY_PROFILE_TRIGGER = 3,
469
+ /**
470
+ * A system event.
471
+ */
472
+ CUPTI_EVENT_CATEGORY_SYSTEM = 4,
473
+ CUPTI_EVENT_CATEGORY_FORCE_INT = 0x7fffffff
474
+ } CUpti_EventCategory;
475
+
476
+ /**
477
+ * \brief The overflow value for a CUPTI event.
478
+ *
479
+ * The CUPTI event value that indicates an overflow.
480
+ */
481
+ #define CUPTI_EVENT_OVERFLOW ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
482
+
483
+ /**
484
+ * \brief The value that indicates the event value is invalid
485
+ */
486
+ #define CUPTI_EVENT_INVALID ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
487
+
488
+ /**
489
+ * \brief Flags for cuptiEventGroupReadEvent an
490
+ * cuptiEventGroupReadAllEvents.
491
+ *
492
+ * Flags for \ref cuptiEventGroupReadEvent an \ref
493
+ * cuptiEventGroupReadAllEvents.
494
+ */
495
+ typedef enum {
496
+ /**
497
+ * No flags.
498
+ */
499
+ CUPTI_EVENT_READ_FLAG_NONE = 0,
500
+ CUPTI_EVENT_READ_FLAG_FORCE_INT = 0x7fffffff,
501
+ } CUpti_ReadEventFlags;
502
+
503
+
504
+ /**
505
+ * \brief A set of event groups.
506
+ *
507
+ * A set of event groups. When returned by \ref
508
+ * cuptiEventGroupSetsCreate and \ref cuptiMetricCreateEventGroupSets
509
+ * a set indicates that event groups that can be enabled at the same
510
+ * time (i.e. all the events in the set can be collected
511
+ * simultaneously).
512
+ */
513
+ typedef struct {
514
+ /**
515
+ * The number of event groups in the set.
516
+ */
517
+ uint32_t numEventGroups;
518
+ /**
519
+ * An array of \p numEventGroups event groups.
520
+ */
521
+ CUpti_EventGroup *eventGroups;
522
+ } CUpti_EventGroupSet;
523
+
524
+ /**
525
+ * \brief A set of event group sets.
526
+ *
527
+ * A set of event group sets. When returned by \ref
528
+ * cuptiEventGroupSetsCreate and \ref cuptiMetricCreateEventGroupSets
529
+ * a CUpti_EventGroupSets indicates the number of passes required to
530
+ * collect all the events, and the event groups that should be
531
+ * collected during each pass.
532
+ */
533
+ typedef struct {
534
+ /**
535
+ * Number of event group sets.
536
+ */
537
+ uint32_t numSets;
538
+ /**
539
+ * An array of \p numSets event group sets.
540
+ */
541
+ CUpti_EventGroupSet *sets;
542
+ } CUpti_EventGroupSets;
543
+
544
+ /**
545
+ * \brief Set the event collection mode.
546
+ *
547
+ * Set the event collection mode for a \p context. The \p mode
548
+ * controls the event collection behavior of all events in event
549
+ * groups created in the \p context. This API is invalid in kernel
550
+ * replay mode.
551
+ * \note \b Thread-safety: this function is thread safe.
552
+ *
553
+ * \param context The context
554
+ * \param mode The event collection mode
555
+ *
556
+ * \retval CUPTI_SUCCESS
557
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
558
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
559
+ * \retval CUPTI_ERROR_INVALID_OPERATION if called when replay mode is enabled
560
+ * \retval CUPTI_ERROR_NOT_SUPPORTED if mode is not supported on the device
561
+ */
562
+
563
+ CUptiResult CUPTIAPI cuptiSetEventCollectionMode(CUcontext context,
564
+ CUpti_EventCollectionMode mode);
565
+
566
+ /**
567
+ * \brief Read a device attribute.
568
+ *
569
+ * Read a device attribute and return it in \p *value.
570
+ * \note \b Thread-safety: this function is thread safe.
571
+ *
572
+ * \param device The CUDA device
573
+ * \param attrib The attribute to read
574
+ * \param valueSize Size of buffer pointed by the value, and
575
+ * returns the number of bytes written to \p value
576
+ * \param value Returns the value of the attribute
577
+ *
578
+ * \retval CUPTI_SUCCESS
579
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
580
+ * \retval CUPTI_ERROR_INVALID_DEVICE
581
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
582
+ * is NULL, or if \p attrib is not a device attribute
583
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
584
+ * attribute values, indicates that the \p value buffer is too small
585
+ * to hold the attribute value.
586
+ */
587
+ CUptiResult CUPTIAPI cuptiDeviceGetAttribute(CUdevice device,
588
+ CUpti_DeviceAttribute attrib,
589
+ size_t *valueSize,
590
+ void *value);
591
+
592
+ /**
593
+ * \brief Read a device timestamp.
594
+ *
595
+ * Returns the device timestamp in \p *timestamp. The timestamp is
596
+ * reported in nanoseconds and indicates the time since the device was
597
+ * last reset.
598
+ * \note \b Thread-safety: this function is thread safe.
599
+ *
600
+ * \param context A context on the device from which to get the timestamp
601
+ * \param timestamp Returns the device timestamp
602
+ *
603
+ * \retval CUPTI_SUCCESS
604
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
605
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
606
+ * \retval CUPTI_ERROR_INVALID_PARAMETER is \p timestamp is NULL
607
+
608
+ * **DEPRECATED** This API is deprecated as of CUDA 11.3
609
+ */
610
+ CUptiResult CUPTIAPI cuptiDeviceGetTimestamp(CUcontext context,
611
+ uint64_t *timestamp);
612
+
613
+ /**
614
+ * \brief Get the number of domains for a device.
615
+ *
616
+ * Returns the number of domains in \p numDomains for a device.
617
+ * \note \b Thread-safety: this function is thread safe.
618
+ *
619
+ * \param device The CUDA device
620
+ * \param numDomains Returns the number of domains
621
+ *
622
+ * \retval CUPTI_SUCCESS
623
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
624
+ * \retval CUPTI_ERROR_INVALID_DEVICE
625
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numDomains is NULL
626
+ */
627
+ CUptiResult CUPTIAPI cuptiDeviceGetNumEventDomains(CUdevice device,
628
+ uint32_t *numDomains);
629
+
630
+ /**
631
+ * \brief Get the event domains for a device.
632
+ *
633
+ * Returns the event domains IDs in \p domainArray for a device. The
634
+ * size of the \p domainArray buffer is given by \p
635
+ * *arraySizeBytes. The size of the \p domainArray buffer must be at
636
+ * least \p numdomains * sizeof(CUpti_EventDomainID) or else all
637
+ * domains will not be returned. The value returned in \p
638
+ * *arraySizeBytes contains the number of bytes returned in \p
639
+ * domainArray.
640
+ * \note \b Thread-safety: this function is thread safe.
641
+ *
642
+ * \param device The CUDA device
643
+ * \param arraySizeBytes The size of \p domainArray in bytes, and
644
+ * returns the number of bytes written to \p domainArray
645
+ * \param domainArray Returns the IDs of the event domains for the device
646
+ *
647
+ * \retval CUPTI_SUCCESS
648
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
649
+ * \retval CUPTI_ERROR_INVALID_DEVICE
650
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
651
+ * \p domainArray are NULL
652
+ */
653
+ CUptiResult CUPTIAPI cuptiDeviceEnumEventDomains(CUdevice device,
654
+ size_t *arraySizeBytes,
655
+ CUpti_EventDomainID *domainArray);
656
+
657
+ /**
658
+ * \brief Read an event domain attribute.
659
+ *
660
+ * Returns an event domain attribute in \p *value. The size of the \p
661
+ * value buffer is given by \p *valueSize. The value returned in \p
662
+ * *valueSize contains the number of bytes returned in \p value.
663
+ *
664
+ * If the attribute value is a c-string that is longer than \p
665
+ * *valueSize, then only the first \p *valueSize characters will be
666
+ * returned and there will be no terminating null byte.
667
+ * \note \b Thread-safety: this function is thread safe.
668
+ *
669
+ * \param device The CUDA device
670
+ * \param eventDomain ID of the event domain
671
+ * \param attrib The event domain attribute to read
672
+ * \param valueSize The size of the \p value buffer in bytes, and
673
+ * returns the number of bytes written to \p value
674
+ * \param value Returns the attribute's value
675
+ *
676
+ * \retval CUPTI_SUCCESS
677
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
678
+ * \retval CUPTI_ERROR_INVALID_DEVICE
679
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
680
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
681
+ * is NULL, or if \p attrib is not an event domain attribute
682
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
683
+ * attribute values, indicates that the \p value buffer is too small
684
+ * to hold the attribute value.
685
+ */
686
+ CUptiResult CUPTIAPI cuptiDeviceGetEventDomainAttribute(CUdevice device,
687
+ CUpti_EventDomainID eventDomain,
688
+ CUpti_EventDomainAttribute attrib,
689
+ size_t *valueSize,
690
+ void *value);
691
+
692
+ /**
693
+ * \brief Get the number of event domains available on any device.
694
+ *
695
+ * Returns the total number of event domains available on any
696
+ * CUDA-capable device.
697
+ * \note \b Thread-safety: this function is thread safe.
698
+ *
699
+ * \param numDomains Returns the number of domains
700
+ *
701
+ * \retval CUPTI_SUCCESS
702
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numDomains is NULL
703
+ */
704
+ CUptiResult CUPTIAPI cuptiGetNumEventDomains(uint32_t *numDomains);
705
+
706
+ /**
707
+ * \brief Get the event domains available on any device.
708
+ *
709
+ * Returns all the event domains available on any CUDA-capable device.
710
+ * Event domain IDs are returned in \p domainArray. The size of the \p
711
+ * domainArray buffer is given by \p *arraySizeBytes. The size of the
712
+ * \p domainArray buffer must be at least \p numDomains *
713
+ * sizeof(CUpti_EventDomainID) or all domains will not be
714
+ * returned. The value returned in \p *arraySizeBytes contains the
715
+ * number of bytes returned in \p domainArray.
716
+ * \note \b Thread-safety: this function is thread safe.
717
+ *
718
+ * \param arraySizeBytes The size of \p domainArray in bytes, and
719
+ * returns the number of bytes written to \p domainArray
720
+ * \param domainArray Returns all the event domains
721
+ *
722
+ * \retval CUPTI_SUCCESS
723
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
724
+ * \p domainArray are NULL
725
+ */
726
+ CUptiResult CUPTIAPI cuptiEnumEventDomains(size_t *arraySizeBytes,
727
+ CUpti_EventDomainID *domainArray);
728
+
729
+ /**
730
+ * \brief Read an event domain attribute.
731
+ *
732
+ * Returns an event domain attribute in \p *value. The size of the \p
733
+ * value buffer is given by \p *valueSize. The value returned in \p
734
+ * *valueSize contains the number of bytes returned in \p value.
735
+ *
736
+ * If the attribute value is a c-string that is longer than \p
737
+ * *valueSize, then only the first \p *valueSize characters will be
738
+ * returned and there will be no terminating null byte.
739
+ * \note \b Thread-safety: this function is thread safe.
740
+ *
741
+ * \param eventDomain ID of the event domain
742
+ * \param attrib The event domain attribute to read
743
+ * \param valueSize The size of the \p value buffer in bytes, and
744
+ * returns the number of bytes written to \p value
745
+ * \param value Returns the attribute's value
746
+ *
747
+ * \retval CUPTI_SUCCESS
748
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
749
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
750
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
751
+ * is NULL, or if \p attrib is not an event domain attribute
752
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
753
+ * attribute values, indicates that the \p value buffer is too small
754
+ * to hold the attribute value.
755
+ */
756
+ CUptiResult CUPTIAPI cuptiEventDomainGetAttribute(CUpti_EventDomainID eventDomain,
757
+ CUpti_EventDomainAttribute attrib,
758
+ size_t *valueSize,
759
+ void *value);
760
+
761
+ /**
762
+ * \brief Get number of events in a domain.
763
+ *
764
+ * Returns the number of events in \p numEvents for a domain.
765
+ * \note \b Thread-safety: this function is thread safe.
766
+ *
767
+ * \param eventDomain ID of the event domain
768
+ * \param numEvents Returns the number of events in the domain
769
+ *
770
+ * \retval CUPTI_SUCCESS
771
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
772
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
773
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numEvents is NULL
774
+ */
775
+ CUptiResult CUPTIAPI cuptiEventDomainGetNumEvents(CUpti_EventDomainID eventDomain,
776
+ uint32_t *numEvents);
777
+
778
+ /**
779
+ * \brief Get the events in a domain.
780
+ *
781
+ * Returns the event IDs in \p eventArray for a domain. The size of
782
+ * the \p eventArray buffer is given by \p *arraySizeBytes. The size
783
+ * of the \p eventArray buffer must be at least \p numdomainevents *
784
+ * sizeof(CUpti_EventID) or else all events will not be returned. The
785
+ * value returned in \p *arraySizeBytes contains the number of bytes
786
+ * returned in \p eventArray.
787
+ * \note \b Thread-safety: this function is thread safe.
788
+ *
789
+ * \param eventDomain ID of the event domain
790
+ * \param arraySizeBytes The size of \p eventArray in bytes, and
791
+ * returns the number of bytes written to \p eventArray
792
+ * \param eventArray Returns the IDs of the events in the domain
793
+ *
794
+ * \retval CUPTI_SUCCESS
795
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
796
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
797
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or \p
798
+ * eventArray are NULL
799
+ */
800
+ CUptiResult CUPTIAPI cuptiEventDomainEnumEvents(CUpti_EventDomainID eventDomain,
801
+ size_t *arraySizeBytes,
802
+ CUpti_EventID *eventArray);
803
+
804
+ /**
805
+ * \brief Get an event attribute.
806
+ *
807
+ * Returns an event attribute in \p *value. The size of the \p
808
+ * value buffer is given by \p *valueSize. The value returned in \p
809
+ * *valueSize contains the number of bytes returned in \p value.
810
+ *
811
+ * If the attribute value is a c-string that is longer than \p
812
+ * *valueSize, then only the first \p *valueSize characters will be
813
+ * returned and there will be no terminating null byte.
814
+ * \note \b Thread-safety: this function is thread safe.
815
+ *
816
+ * \param event ID of the event
817
+ * \param attrib The event attribute to read
818
+ * \param valueSize The size of the \p value buffer in bytes, and
819
+ * returns the number of bytes written to \p value
820
+ * \param value Returns the attribute's value
821
+ *
822
+ * \retval CUPTI_SUCCESS
823
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
824
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
825
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
826
+ * is NULL, or if \p attrib is not an event attribute
827
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
828
+ * attribute values, indicates that the \p value buffer is too small
829
+ * to hold the attribute value.
830
+ */
831
+ CUptiResult CUPTIAPI cuptiEventGetAttribute(CUpti_EventID event,
832
+ CUpti_EventAttribute attrib,
833
+ size_t *valueSize,
834
+ void *value);
835
+
836
+ /**
837
+ * \brief Find an event by name.
838
+ *
839
+ * Find an event by name and return the event ID in \p *event.
840
+ * \note \b Thread-safety: this function is thread safe.
841
+ *
842
+ * \param device The CUDA device
843
+ * \param eventName The name of the event to find
844
+ * \param event Returns the ID of the found event or undefined if
845
+ * unable to find the event
846
+ *
847
+ * \retval CUPTI_SUCCESS
848
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
849
+ * \retval CUPTI_ERROR_INVALID_DEVICE
850
+ * \retval CUPTI_ERROR_INVALID_EVENT_NAME if unable to find an event
851
+ * with name \p eventName. In this case \p *event is undefined
852
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventName or \p event are NULL
853
+ */
854
+ CUptiResult CUPTIAPI cuptiEventGetIdFromName(CUdevice device,
855
+ const char *eventName,
856
+ CUpti_EventID *event);
857
+
858
+ /**
859
+ * \brief Create a new event group for a context.
860
+ *
861
+ * Creates a new event group for \p context and returns the new group
862
+ * in \p *eventGroup.
863
+ * \note \p flags are reserved for future use and should be set to zero.
864
+ * \note \b Thread-safety: this function is thread safe.
865
+ *
866
+ * \param context The context for the event group
867
+ * \param eventGroup Returns the new event group
868
+ * \param flags Reserved - must be zero
869
+ *
870
+ * \retval CUPTI_SUCCESS
871
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
872
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
873
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY
874
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
875
+ */
876
+ CUptiResult CUPTIAPI cuptiEventGroupCreate(CUcontext context,
877
+ CUpti_EventGroup *eventGroup,
878
+ uint32_t flags);
879
+
880
+ /**
881
+ * \brief Destroy an event group.
882
+ *
883
+ * Destroy an \p eventGroup and free its resources. An event group
884
+ * cannot be destroyed if it is enabled.
885
+ * \note \b Thread-safety: this function is thread safe.
886
+ *
887
+ * \param eventGroup The event group to destroy
888
+ *
889
+ * \retval CUPTI_SUCCESS
890
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
891
+ * \retval CUPTI_ERROR_INVALID_OPERATION if the event group is enabled
892
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if eventGroup is NULL
893
+ */
894
+ CUptiResult CUPTIAPI cuptiEventGroupDestroy(CUpti_EventGroup eventGroup);
895
+
896
+ /**
897
+ * \brief Read an event group attribute.
898
+ *
899
+ * Read an event group attribute and return it in \p *value.
900
+ * \note \b Thread-safety: this function is thread safe but client
901
+ * must guard against simultaneous destruction or modification of \p
902
+ * eventGroup (for example, client must guard against simultaneous
903
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
904
+ * etc.), and must guard against simultaneous destruction of the
905
+ * context in which \p eventGroup was created (for example, client
906
+ * must guard against simultaneous calls to cudaDeviceReset,
907
+ * cuCtxDestroy, etc.).
908
+ *
909
+ * \param eventGroup The event group
910
+ * \param attrib The attribute to read
911
+ * \param valueSize Size of buffer pointed by the value, and
912
+ * returns the number of bytes written to \p value
913
+ * \param value Returns the value of the attribute
914
+ *
915
+ * \retval CUPTI_SUCCESS
916
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
917
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
918
+ * is NULL, or if \p attrib is not an eventgroup attribute
919
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
920
+ * attribute values, indicates that the \p value buffer is too small
921
+ * to hold the attribute value.
922
+ */
923
+ CUptiResult CUPTIAPI cuptiEventGroupGetAttribute(CUpti_EventGroup eventGroup,
924
+ CUpti_EventGroupAttribute attrib,
925
+ size_t *valueSize,
926
+ void *value);
927
+
928
+ /**
929
+ * \brief Write an event group attribute.
930
+ *
931
+ * Write an event group attribute.
932
+ * \note \b Thread-safety: this function is thread safe.
933
+ *
934
+ * \param eventGroup The event group
935
+ * \param attrib The attribute to write
936
+ * \param valueSize The size, in bytes, of the value
937
+ * \param value The attribute value to write
938
+ *
939
+ * \retval CUPTI_SUCCESS
940
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
941
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
942
+ * is NULL, or if \p attrib is not an event group attribute, or if
943
+ * \p attrib is not a writable attribute
944
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT Indicates that
945
+ * the \p value buffer is too small to hold the attribute value.
946
+ */
947
+ CUptiResult CUPTIAPI cuptiEventGroupSetAttribute(CUpti_EventGroup eventGroup,
948
+ CUpti_EventGroupAttribute attrib,
949
+ size_t valueSize,
950
+ void *value);
951
+
952
+ /**
953
+ * \brief Add an event to an event group.
954
+ *
955
+ * Add an event to an event group. The event add can fail for a number of reasons:
956
+ * \li The event group is enabled
957
+ * \li The event does not belong to the same event domain as the
958
+ * events that are already in the event group
959
+ * \li Device limitations on the events that can belong to the same group
960
+ * \li The event group is full
961
+ *
962
+ * \note \b Thread-safety: this function is thread safe.
963
+ *
964
+ * \param eventGroup The event group
965
+ * \param event The event to add to the group
966
+ *
967
+ * \retval CUPTI_SUCCESS
968
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
969
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
970
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY
971
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
972
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p event belongs to a
973
+ * different event domain than the events already in \p eventGroup, or
974
+ * if a device limitation prevents \p event from being collected at
975
+ * the same time as the events already in \p eventGroup
976
+ * \retval CUPTI_ERROR_MAX_LIMIT_REACHED if \p eventGroup is full
977
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
978
+ */
979
+ CUptiResult CUPTIAPI cuptiEventGroupAddEvent(CUpti_EventGroup eventGroup,
980
+ CUpti_EventID event);
981
+
982
+ /**
983
+ * \brief Remove an event from an event group.
984
+ *
985
+ * Remove \p event from the an event group. The event cannot be
986
+ * removed if the event group is enabled.
987
+ * \note \b Thread-safety: this function is thread safe.
988
+ *
989
+ * \param eventGroup The event group
990
+ * \param event The event to remove from the group
991
+ *
992
+ * \retval CUPTI_SUCCESS
993
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
994
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
995
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
996
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
997
+ */
998
+ CUptiResult CUPTIAPI cuptiEventGroupRemoveEvent(CUpti_EventGroup eventGroup,
999
+ CUpti_EventID event);
1000
+
1001
+ /**
1002
+ * \brief Remove all events from an event group.
1003
+ *
1004
+ * Remove all events from an event group. Events cannot be removed if
1005
+ * the event group is enabled.
1006
+ * \note \b Thread-safety: this function is thread safe.
1007
+ *
1008
+ * \param eventGroup The event group
1009
+ *
1010
+ * \retval CUPTI_SUCCESS
1011
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1012
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
1013
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
1014
+ */
1015
+ CUptiResult CUPTIAPI cuptiEventGroupRemoveAllEvents(CUpti_EventGroup eventGroup);
1016
+
1017
+ /**
1018
+ * \brief Zero all the event counts in an event group.
1019
+ *
1020
+ * Zero all the event counts in an event group.
1021
+ * \note \b Thread-safety: this function is thread safe but client
1022
+ * must guard against simultaneous destruction or modification of \p
1023
+ * eventGroup (for example, client must guard against simultaneous
1024
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
1025
+ * etc.), and must guard against simultaneous destruction of the
1026
+ * context in which \p eventGroup was created (for example, client
1027
+ * must guard against simultaneous calls to cudaDeviceReset,
1028
+ * cuCtxDestroy, etc.).
1029
+ *
1030
+ * \param eventGroup The event group
1031
+ *
1032
+ * \retval CUPTI_SUCCESS
1033
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1034
+ * \retval CUPTI_ERROR_HARDWARE
1035
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
1036
+ */
1037
+ CUptiResult CUPTIAPI cuptiEventGroupResetAllEvents(CUpti_EventGroup eventGroup);
1038
+
1039
+ /**
1040
+ * \brief Enable an event group.
1041
+ *
1042
+ * Enable an event group. Enabling an event group zeros the value of
1043
+ * all the events in the group and then starts collection of those
1044
+ * events.
1045
+ * \note \b Thread-safety: this function is thread safe.
1046
+ *
1047
+ * \param eventGroup The event group
1048
+ *
1049
+ * \retval CUPTI_SUCCESS
1050
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1051
+ * \retval CUPTI_ERROR_HARDWARE
1052
+ * \retval CUPTI_ERROR_NOT_READY if \p eventGroup does not contain any events
1053
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p eventGroup cannot be
1054
+ * enabled due to other already enabled event groups
1055
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
1056
+ * \retval CUPTI_ERROR_HARDWARE_BUSY if another client is profiling
1057
+ * and hardware is busy
1058
+ */
1059
+ CUptiResult CUPTIAPI cuptiEventGroupEnable(CUpti_EventGroup eventGroup);
1060
+
1061
+ /**
1062
+ * \brief Disable an event group.
1063
+ *
1064
+ * Disable an event group. Disabling an event group stops collection
1065
+ * of events contained in the group.
1066
+ * \note \b Thread-safety: this function is thread safe.
1067
+ *
1068
+ * \param eventGroup The event group
1069
+ *
1070
+ * \retval CUPTI_SUCCESS
1071
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1072
+ * \retval CUPTI_ERROR_HARDWARE
1073
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
1074
+ */
1075
+ CUptiResult CUPTIAPI cuptiEventGroupDisable(CUpti_EventGroup eventGroup);
1076
+
1077
+ /**
1078
+ * \brief Read the value for an event in an event group.
1079
+ *
1080
+ * Read the value for an event in an event group. The event value is
1081
+ * returned in the \p eventValueBuffer buffer. \p
1082
+ * eventValueBufferSizeBytes indicates the size of the \p
1083
+ * eventValueBuffer buffer. The buffer must be at least sizeof(uint64)
1084
+ * if ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is not set
1085
+ * on the group containing the event. The buffer must be at least
1086
+ * (sizeof(uint64) * number of domain instances) if
1087
+ * ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is set on the
1088
+ * group.
1089
+ *
1090
+ * If any instance of an event counter overflows, the value returned
1091
+ * for that event instance will be ::CUPTI_EVENT_OVERFLOW.
1092
+ *
1093
+ * The only allowed value for \p flags is ::CUPTI_EVENT_READ_FLAG_NONE.
1094
+ *
1095
+ * Reading an event from a disabled event group is not allowed. After
1096
+ * being read, an event's value is reset to zero.
1097
+ * \note \b Thread-safety: this function is thread safe but client
1098
+ * must guard against simultaneous destruction or modification of \p
1099
+ * eventGroup (for example, client must guard against simultaneous
1100
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
1101
+ * etc.), and must guard against simultaneous destruction of the
1102
+ * context in which \p eventGroup was created (for example, client
1103
+ * must guard against simultaneous calls to cudaDeviceReset,
1104
+ * cuCtxDestroy, etc.). If \ref cuptiEventGroupResetAllEvents is
1105
+ * called simultaneously with this function, then returned event
1106
+ * values are undefined.
1107
+ *
1108
+ * \param eventGroup The event group
1109
+ * \param flags Flags controlling the reading mode
1110
+ * \param event The event to read
1111
+ * \param eventValueBufferSizeBytes The size of \p eventValueBuffer
1112
+ * in bytes, and returns the number of bytes written to \p
1113
+ * eventValueBuffer
1114
+ * \param eventValueBuffer Returns the event value(s)
1115
+ *
1116
+ * \retval CUPTI_SUCCESS
1117
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1118
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
1119
+ * \retval CUPTI_ERROR_HARDWARE
1120
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is disabled
1121
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup, \p
1122
+ * eventValueBufferSizeBytes or \p eventValueBuffer is NULL
1123
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if size of \p eventValueBuffer
1124
+ * is not sufficient
1125
+ */
1126
+ CUptiResult CUPTIAPI cuptiEventGroupReadEvent(CUpti_EventGroup eventGroup,
1127
+ CUpti_ReadEventFlags flags,
1128
+ CUpti_EventID event,
1129
+ size_t *eventValueBufferSizeBytes,
1130
+ uint64_t *eventValueBuffer);
1131
+
1132
+ /**
1133
+ * \brief Read the values for all the events in an event group.
1134
+ *
1135
+ * Read the values for all the events in an event group. The event
1136
+ * values are returned in the \p eventValueBuffer buffer. \p
1137
+ * eventValueBufferSizeBytes indicates the size of \p
1138
+ * eventValueBuffer. The buffer must be at least (sizeof(uint64) *
1139
+ * number of events in group) if
1140
+ * ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is not set on
1141
+ * the group containing the events. The buffer must be at least
1142
+ * (sizeof(uint64) * number of domain instances * number of events in
1143
+ * group) if ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is
1144
+ * set on the group.
1145
+ *
1146
+ * The data format returned in \p eventValueBuffer is:
1147
+ * - domain instance 0: event0 event1 ... eventN
1148
+ * - domain instance 1: event0 event1 ... eventN
1149
+ * - ...
1150
+ * - domain instance M: event0 event1 ... eventN
1151
+ *
1152
+ * The event order in \p eventValueBuffer is returned in \p
1153
+ * eventIdArray. The size of \p eventIdArray is specified in \p
1154
+ * eventIdArraySizeBytes. The size should be at least
1155
+ * (sizeof(CUpti_EventID) * number of events in group).
1156
+ *
1157
+ * If any instance of any event counter overflows, the value returned
1158
+ * for that event instance will be ::CUPTI_EVENT_OVERFLOW.
1159
+ *
1160
+ * The only allowed value for \p flags is ::CUPTI_EVENT_READ_FLAG_NONE.
1161
+ *
1162
+ * Reading events from a disabled event group is not allowed. After
1163
+ * being read, an event's value is reset to zero.
1164
+ * \note \b Thread-safety: this function is thread safe but client
1165
+ * must guard against simultaneous destruction or modification of \p
1166
+ * eventGroup (for example, client must guard against simultaneous
1167
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
1168
+ * etc.), and must guard against simultaneous destruction of the
1169
+ * context in which \p eventGroup was created (for example, client
1170
+ * must guard against simultaneous calls to cudaDeviceReset,
1171
+ * cuCtxDestroy, etc.). If \ref cuptiEventGroupResetAllEvents is
1172
+ * called simultaneously with this function, then returned event
1173
+ * values are undefined.
1174
+ *
1175
+ * \param eventGroup The event group
1176
+ * \param flags Flags controlling the reading mode
1177
+ * \param eventValueBufferSizeBytes The size of \p eventValueBuffer in
1178
+ * bytes, and returns the number of bytes written to \p
1179
+ * eventValueBuffer
1180
+ * \param eventValueBuffer Returns the event values
1181
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes,
1182
+ * and returns the number of bytes written to \p eventIdArray
1183
+ * \param eventIdArray Returns the IDs of the events in the same order
1184
+ * as the values return in eventValueBuffer.
1185
+ * \param numEventIdsRead Returns the number of event IDs returned
1186
+ * in \p eventIdArray
1187
+ *
1188
+ * \retval CUPTI_SUCCESS
1189
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1190
+ * \retval CUPTI_ERROR_HARDWARE
1191
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is disabled
1192
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup, \p
1193
+ * eventValueBufferSizeBytes, \p eventValueBuffer, \p
1194
+ * eventIdArraySizeBytes, \p eventIdArray or \p numEventIdsRead is
1195
+ * NULL
1196
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if size of \p eventValueBuffer
1197
+ * or \p eventIdArray is not sufficient
1198
+ */
1199
+ CUptiResult CUPTIAPI cuptiEventGroupReadAllEvents(CUpti_EventGroup eventGroup,
1200
+ CUpti_ReadEventFlags flags,
1201
+ size_t *eventValueBufferSizeBytes,
1202
+ uint64_t *eventValueBuffer,
1203
+ size_t *eventIdArraySizeBytes,
1204
+ CUpti_EventID *eventIdArray,
1205
+ size_t *numEventIdsRead);
1206
+
1207
+ /**
1208
+ * \brief For a set of events, get the grouping that indicates the
1209
+ * number of passes and the event groups necessary to collect the
1210
+ * events.
1211
+ *
1212
+ * The number of events that can be collected simultaneously varies by
1213
+ * device and by the type of the events. When events can be collected
1214
+ * simultaneously, they may need to be grouped into multiple event
1215
+ * groups because they are from different event domains. This function
1216
+ * takes a set of events and determines how many passes are required
1217
+ * to collect all those events, and which events can be collected
1218
+ * simultaneously in each pass.
1219
+ *
1220
+ * The CUpti_EventGroupSets returned in \p eventGroupPasses indicates
1221
+ * how many passes are required to collect the events with the \p
1222
+ * numSets field. Within each event group set, the \p sets array
1223
+ * indicates the event groups that should be collected on each pass.
1224
+ * \note \b Thread-safety: this function is thread safe, but client
1225
+ * must guard against another thread simultaneously destroying \p
1226
+ * context.
1227
+ *
1228
+ * \param context The context for event collection
1229
+ * \param eventIdArraySizeBytes Size of \p eventIdArray in bytes
1230
+ * \param eventIdArray Array of event IDs that need to be grouped
1231
+ * \param eventGroupPasses Returns a CUpti_EventGroupSets object that
1232
+ * indicates the number of passes required to collect the events and
1233
+ * the events to collect on each pass
1234
+ *
1235
+ * \retval CUPTI_SUCCESS
1236
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1237
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
1238
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
1239
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventIdArray or
1240
+ * \p eventGroupPasses is NULL
1241
+ */
1242
+ CUptiResult CUPTIAPI cuptiEventGroupSetsCreate(CUcontext context,
1243
+ size_t eventIdArraySizeBytes,
1244
+ CUpti_EventID *eventIdArray,
1245
+ CUpti_EventGroupSets **eventGroupPasses);
1246
+
1247
+ /**
1248
+ * \brief Destroy a event group sets object.
1249
+ *
1250
+ * Destroy a CUpti_EventGroupSets object.
1251
+ * \note \b Thread-safety: this function is thread safe.
1252
+ *
1253
+ * \param eventGroupSets The object to destroy
1254
+ *
1255
+ * \retval CUPTI_SUCCESS
1256
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1257
+ * \retval CUPTI_ERROR_INVALID_OPERATION if any of the event groups
1258
+ * contained in the sets is enabled
1259
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSets is NULL
1260
+ */
1261
+ CUptiResult CUPTIAPI cuptiEventGroupSetsDestroy(CUpti_EventGroupSets *eventGroupSets);
1262
+
1263
+
1264
+ /**
1265
+ * \brief Enable an event group set.
1266
+ *
1267
+ * Enable a set of event groups. Enabling a set of event groups zeros the value of
1268
+ * all the events in all the groups and then starts collection of those events.
1269
+ * \note \b Thread-safety: this function is thread safe.
1270
+ *
1271
+ * \param eventGroupSet The pointer to the event group set
1272
+ *
1273
+ * \retval CUPTI_SUCCESS
1274
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1275
+ * \retval CUPTI_ERROR_HARDWARE
1276
+ * \retval CUPTI_ERROR_NOT_READY if \p eventGroup does not contain any events
1277
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p eventGroup cannot be
1278
+ * enabled due to other already enabled event groups
1279
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSet is NULL
1280
+ * \retval CUPTI_ERROR_HARDWARE_BUSY if other client is profiling and hardware is
1281
+ * busy
1282
+ */
1283
+ CUptiResult CUPTIAPI cuptiEventGroupSetEnable(CUpti_EventGroupSet *eventGroupSet);
1284
+
1285
+ /**
1286
+ * \brief Disable an event group set.
1287
+ *
1288
+ * Disable a set of event groups. Disabling a set of event groups
1289
+ * stops collection of events contained in the groups.
1290
+ * \note \b Thread-safety: this function is thread safe.
1291
+ * \note \b If this call fails, some of the event groups in the set may be disabled
1292
+ * and other event groups may remain enabled.
1293
+ *
1294
+ * \param eventGroupSet The pointer to the event group set
1295
+ * \retval CUPTI_SUCCESS
1296
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1297
+ * \retval CUPTI_ERROR_HARDWARE
1298
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSet is NULL
1299
+ */
1300
+ CUptiResult CUPTIAPI cuptiEventGroupSetDisable(CUpti_EventGroupSet *eventGroupSet);
1301
+
1302
+ /**
1303
+ * \brief Enable kernel replay mode.
1304
+ *
1305
+ * Set profiling mode for the context to replay mode. In this mode,
1306
+ * any number of events can be collected in one run of the kernel. The
1307
+ * event collection mode will automatically switch to
1308
+ * CUPTI_EVENT_COLLECTION_MODE_KERNEL. In this mode, \ref
1309
+ * cuptiSetEventCollectionMode will return
1310
+ * CUPTI_ERROR_INVALID_OPERATION.
1311
+ * \note \b Kernels might take longer to run if many events are enabled.
1312
+ * \note \b Thread-safety: this function is thread safe.
1313
+ *
1314
+ * \param context The context
1315
+ * \retval CUPTI_SUCCESS
1316
+ */
1317
+ CUptiResult CUPTIAPI cuptiEnableKernelReplayMode(CUcontext context);
1318
+
1319
+ /**
1320
+ * \brief Disable kernel replay mode.
1321
+ *
1322
+ * Set profiling mode for the context to non-replay (default)
1323
+ * mode. Event collection mode will be set to
1324
+ * CUPTI_EVENT_COLLECTION_MODE_KERNEL. All previously enabled
1325
+ * event groups and event group sets will be disabled.
1326
+ * \note \b Thread-safety: this function is thread safe.
1327
+ *
1328
+ * \param context The context
1329
+ * \retval CUPTI_SUCCESS
1330
+ */
1331
+ CUptiResult CUPTIAPI cuptiDisableKernelReplayMode(CUcontext context);
1332
+
1333
+ /**
1334
+ * \brief Function type for getting updates on kernel replay.
1335
+ *
1336
+ * \param kernelName The mangled kernel name
1337
+ * \param numReplaysDone Number of replays done so far
1338
+ * \param customData Pointer of any custom data passed in when subscribing
1339
+ */
1340
+ typedef void (CUPTIAPI *CUpti_KernelReplayUpdateFunc)(
1341
+ const char *kernelName,
1342
+ int numReplaysDone,
1343
+ void *customData);
1344
+
1345
+ /**
1346
+ * \brief Subscribe to kernel replay updates.
1347
+ *
1348
+ * When subscribed, the function pointer passed in will be called each time a
1349
+ * kernel run is finished during kernel replay. Previously subscribed function
1350
+ * pointer will be replaced. Pass in NULL as the function pointer unsubscribes
1351
+ * the update.
1352
+ *
1353
+ * \param updateFunc The update function pointer
1354
+ * \param customData Pointer to any custom data
1355
+ * \retval CUPTI_SUCCESS
1356
+ */
1357
+ CUptiResult CUPTIAPI cuptiKernelReplaySubscribeUpdate(CUpti_KernelReplayUpdateFunc updateFunc, void *customData);
1358
+
1359
+ /** @} */ /* END CUPTI_EVENT_API */
1360
+
1361
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
1362
+ #pragma GCC visibility pop
1363
+ #endif
1364
+
1365
+ #if defined(__cplusplus)
1366
+ }
1367
+ #endif
1368
+
1369
+ #endif /*_CUPTI_EVENTS_H_*/
1370
+
1371
+
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_metrics.h ADDED
@@ -0,0 +1,825 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2011-2020 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 CUPTI metric API from the header cupti_metrics.h are not supported on devices
79
+ * with compute capability 7.5 and higher (i.e. Turing and later GPU architectures).
80
+ * These API will be deprecated in a future CUDA release. These are replaced by
81
+ * Profiling API in the header cupti_profiler_target.h and Perfworks metrics API
82
+ * in the headers nvperf_host.h and nvperf_target.h which are supported on
83
+ * devices with compute capability 7.0 and higher (i.e. Volta and later GPU
84
+ * architectures).
85
+ *
86
+ * @{
87
+ */
88
+
89
+ /**
90
+ * \brief ID for a metric.
91
+ *
92
+ * A metric provides a measure of some aspect of the device.
93
+ */
94
+ typedef uint32_t CUpti_MetricID;
95
+
96
+ /**
97
+ * \brief A metric category.
98
+ *
99
+ * Each metric is assigned to a category that represents the general
100
+ * type of the metric. A metric's category is accessed using \ref
101
+ * cuptiMetricGetAttribute and the CUPTI_METRIC_ATTR_CATEGORY
102
+ * attribute.
103
+ */
104
+ typedef enum {
105
+ /**
106
+ * A memory related metric.
107
+ */
108
+ CUPTI_METRIC_CATEGORY_MEMORY = 0,
109
+ /**
110
+ * An instruction related metric.
111
+ */
112
+ CUPTI_METRIC_CATEGORY_INSTRUCTION = 1,
113
+ /**
114
+ * A multiprocessor related metric.
115
+ */
116
+ CUPTI_METRIC_CATEGORY_MULTIPROCESSOR = 2,
117
+ /**
118
+ * A cache related metric.
119
+ */
120
+ CUPTI_METRIC_CATEGORY_CACHE = 3,
121
+ /**
122
+ * A texture related metric.
123
+ */
124
+ CUPTI_METRIC_CATEGORY_TEXTURE = 4,
125
+ /**
126
+ *A Nvlink related metric.
127
+ */
128
+ CUPTI_METRIC_CATEGORY_NVLINK = 5,
129
+ /**
130
+ *A PCIe related metric.
131
+ */
132
+ CUPTI_METRIC_CATEGORY_PCIE = 6,
133
+ CUPTI_METRIC_CATEGORY_FORCE_INT = 0x7fffffff,
134
+ } CUpti_MetricCategory;
135
+
136
+ /**
137
+ * \brief A metric evaluation mode.
138
+ *
139
+ * A metric can be evaluated per hardware instance to know the load balancing
140
+ * across instances of a domain or the metric can be evaluated in aggregate mode
141
+ * when the events involved in metric evaluation are from different event
142
+ * domains. It might be possible to evaluate some metrics in both
143
+ * modes for convenience. A metric's evaluation mode is accessed using \ref
144
+ * CUpti_MetricEvaluationMode and the CUPTI_METRIC_ATTR_EVALUATION_MODE
145
+ * attribute.
146
+ */
147
+ typedef enum {
148
+ /**
149
+ * If this bit is set, the metric can be profiled for each instance of the
150
+ * domain. The event values passed to \ref cuptiMetricGetValue can contain
151
+ * values for one instance of the domain. And \ref cuptiMetricGetValue can
152
+ * be called for each instance.
153
+ */
154
+ CUPTI_METRIC_EVALUATION_MODE_PER_INSTANCE = 1,
155
+ /**
156
+ * If this bit is set, the metric can be profiled over all instances. The
157
+ * event values passed to \ref cuptiMetricGetValue can be aggregated values
158
+ * of events for all instances of the domain.
159
+ */
160
+ CUPTI_METRIC_EVALUATION_MODE_AGGREGATE = 1 << 1,
161
+ CUPTI_METRIC_EVALUATION_MODE_FORCE_INT = 0x7fffffff,
162
+ } CUpti_MetricEvaluationMode;
163
+
164
+ /**
165
+ * \brief Kinds of metric values.
166
+ *
167
+ * Metric values can be one of several different kinds. Corresponding
168
+ * to each kind is a member of the CUpti_MetricValue union. The metric
169
+ * value returned by \ref cuptiMetricGetValue should be accessed using
170
+ * the appropriate member of that union based on its value kind.
171
+ */
172
+ typedef enum {
173
+ /**
174
+ * The metric value is a 64-bit double.
175
+ */
176
+ CUPTI_METRIC_VALUE_KIND_DOUBLE = 0,
177
+ /**
178
+ * The metric value is a 64-bit unsigned integer.
179
+ */
180
+ CUPTI_METRIC_VALUE_KIND_UINT64 = 1,
181
+ /**
182
+ * The metric value is a percentage represented by a 64-bit
183
+ * double. For example, 57.5% is represented by the value 57.5.
184
+ */
185
+ CUPTI_METRIC_VALUE_KIND_PERCENT = 2,
186
+ /**
187
+ * The metric value is a throughput represented by a 64-bit
188
+ * integer. The unit for throughput values is bytes/second.
189
+ */
190
+ CUPTI_METRIC_VALUE_KIND_THROUGHPUT = 3,
191
+ /**
192
+ * The metric value is a 64-bit signed integer.
193
+ */
194
+ CUPTI_METRIC_VALUE_KIND_INT64 = 4,
195
+ /**
196
+ * The metric value is a utilization level, as represented by
197
+ * CUpti_MetricValueUtilizationLevel.
198
+ */
199
+ CUPTI_METRIC_VALUE_KIND_UTILIZATION_LEVEL = 5,
200
+
201
+ CUPTI_METRIC_VALUE_KIND_FORCE_INT = 0x7fffffff
202
+ } CUpti_MetricValueKind;
203
+
204
+ /**
205
+ * \brief Enumeration of utilization levels for metrics values of kind
206
+ * CUPTI_METRIC_VALUE_KIND_UTILIZATION_LEVEL. Utilization values can
207
+ * vary from IDLE (0) to MAX (10) but the enumeration only provides
208
+ * specific names for a few values.
209
+ */
210
+ typedef enum {
211
+ CUPTI_METRIC_VALUE_UTILIZATION_IDLE = 0,
212
+ CUPTI_METRIC_VALUE_UTILIZATION_LOW = 2,
213
+ CUPTI_METRIC_VALUE_UTILIZATION_MID = 5,
214
+ CUPTI_METRIC_VALUE_UTILIZATION_HIGH = 8,
215
+ CUPTI_METRIC_VALUE_UTILIZATION_MAX = 10,
216
+ CUPTI_METRIC_VALUE_UTILIZATION_FORCE_INT = 0x7fffffff
217
+ } CUpti_MetricValueUtilizationLevel;
218
+
219
+ /**
220
+ * \brief Metric attributes.
221
+ *
222
+ * Metric attributes describe properties of a metric. These attributes
223
+ * can be read using \ref cuptiMetricGetAttribute.
224
+ */
225
+ typedef enum {
226
+ /**
227
+ * Metric name. Value is a null terminated const c-string.
228
+ */
229
+ CUPTI_METRIC_ATTR_NAME = 0,
230
+ /**
231
+ * Short description of metric. Value is a null terminated const c-string.
232
+ */
233
+ CUPTI_METRIC_ATTR_SHORT_DESCRIPTION = 1,
234
+ /**
235
+ * Long description of metric. Value is a null terminated const c-string.
236
+ */
237
+ CUPTI_METRIC_ATTR_LONG_DESCRIPTION = 2,
238
+ /**
239
+ * Category of the metric. Value is of type CUpti_MetricCategory.
240
+ */
241
+ CUPTI_METRIC_ATTR_CATEGORY = 3,
242
+ /**
243
+ * Value type of the metric. Value is of type CUpti_MetricValueKind.
244
+ */
245
+ CUPTI_METRIC_ATTR_VALUE_KIND = 4,
246
+ /**
247
+ * Metric evaluation mode. Value is of type CUpti_MetricEvaluationMode.
248
+ */
249
+ CUPTI_METRIC_ATTR_EVALUATION_MODE = 5,
250
+ CUPTI_METRIC_ATTR_FORCE_INT = 0x7fffffff,
251
+ } CUpti_MetricAttribute;
252
+
253
+ /**
254
+ * \brief A metric value.
255
+ *
256
+ * Metric values can be one of several different kinds. Corresponding
257
+ * to each kind is a member of the CUpti_MetricValue union. The metric
258
+ * value returned by \ref cuptiMetricGetValue should be accessed using
259
+ * the appropriate member of that union based on its value kind.
260
+ */
261
+ typedef union {
262
+ /*
263
+ * Value for CUPTI_METRIC_VALUE_KIND_DOUBLE.
264
+ */
265
+ double metricValueDouble;
266
+ /*
267
+ * Value for CUPTI_METRIC_VALUE_KIND_UINT64.
268
+ */
269
+ uint64_t metricValueUint64;
270
+ /*
271
+ * Value for CUPTI_METRIC_VALUE_KIND_INT64.
272
+ */
273
+ int64_t metricValueInt64;
274
+ /*
275
+ * Value for CUPTI_METRIC_VALUE_KIND_PERCENT. For example, 57.5% is
276
+ * represented by the value 57.5.
277
+ */
278
+ double metricValuePercent;
279
+ /*
280
+ * Value for CUPTI_METRIC_VALUE_KIND_THROUGHPUT. The unit for
281
+ * throughput values is bytes/second.
282
+ */
283
+ uint64_t metricValueThroughput;
284
+ /*
285
+ * Value for CUPTI_METRIC_VALUE_KIND_UTILIZATION_LEVEL.
286
+ */
287
+ CUpti_MetricValueUtilizationLevel metricValueUtilizationLevel;
288
+ } CUpti_MetricValue;
289
+
290
+ /**
291
+ * \brief Device class.
292
+ *
293
+ * Enumeration of device classes for metric property
294
+ * CUPTI_METRIC_PROPERTY_DEVICE_CLASS.
295
+ */
296
+ typedef enum {
297
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_TESLA = 0,
298
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_QUADRO = 1,
299
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_GEFORCE = 2,
300
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_TEGRA = 3,
301
+ } CUpti_MetricPropertyDeviceClass;
302
+
303
+ /**
304
+ * \brief Metric device properties.
305
+ *
306
+ * Metric device properties describe device properties which are needed for a metric.
307
+ * Some of these properties can be collected using cuDeviceGetAttribute.
308
+ */
309
+ typedef enum {
310
+ /*
311
+ * Number of multiprocessors on a device. This can be collected
312
+ * using value of \param CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT of
313
+ * cuDeviceGetAttribute.
314
+ */
315
+ CUPTI_METRIC_PROPERTY_MULTIPROCESSOR_COUNT,
316
+ /*
317
+ * Maximum number of warps on a multiprocessor. This can be
318
+ * collected using ratio of value of \param
319
+ * CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR and \param
320
+ * CU_DEVICE_ATTRIBUTE_WARP_SIZE of cuDeviceGetAttribute.
321
+ */
322
+ CUPTI_METRIC_PROPERTY_WARPS_PER_MULTIPROCESSOR,
323
+ /*
324
+ * GPU Time for kernel in ns. This should be profiled using CUPTI
325
+ * Activity API.
326
+ */
327
+ CUPTI_METRIC_PROPERTY_KERNEL_GPU_TIME,
328
+ /*
329
+ * Clock rate for device in KHz. This should be collected using
330
+ * value of \param CU_DEVICE_ATTRIBUTE_CLOCK_RATE of
331
+ * cuDeviceGetAttribute.
332
+ */
333
+ CUPTI_METRIC_PROPERTY_CLOCK_RATE,
334
+ /*
335
+ * Number of Frame buffer units for device. This should be collected
336
+ * using value of \param CUPTI_DEVICE_ATTRIBUTE_MAX_FRAME_BUFFERS of
337
+ * cuptiDeviceGetAttribute.
338
+ */
339
+ CUPTI_METRIC_PROPERTY_FRAME_BUFFER_COUNT,
340
+ /*
341
+ * Global memory bandwidth in KBytes/sec. This should be collected
342
+ * using value of \param CUPTI_DEVICE_ATTR_GLOBAL_MEMORY_BANDWIDTH
343
+ * of cuptiDeviceGetAttribute.
344
+ */
345
+ CUPTI_METRIC_PROPERTY_GLOBAL_MEMORY_BANDWIDTH,
346
+ /*
347
+ * PCIE link rate in Mega bits/sec. This should be collected using
348
+ * value of \param CUPTI_DEVICE_ATTR_PCIE_LINK_RATE of
349
+ * cuptiDeviceGetAttribute.
350
+ */
351
+ CUPTI_METRIC_PROPERTY_PCIE_LINK_RATE,
352
+ /*
353
+ * PCIE link width for device. This should be collected using
354
+ * value of \param CUPTI_DEVICE_ATTR_PCIE_LINK_WIDTH of
355
+ * cuptiDeviceGetAttribute.
356
+ */
357
+ CUPTI_METRIC_PROPERTY_PCIE_LINK_WIDTH,
358
+ /*
359
+ * PCIE generation for device. This should be collected using
360
+ * value of \param CUPTI_DEVICE_ATTR_PCIE_GEN of
361
+ * cuptiDeviceGetAttribute.
362
+ */
363
+ CUPTI_METRIC_PROPERTY_PCIE_GEN,
364
+ /*
365
+ * The device class. This should be collected using
366
+ * value of \param CUPTI_DEVICE_ATTR_DEVICE_CLASS of
367
+ * cuptiDeviceGetAttribute.
368
+ */
369
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS,
370
+ /*
371
+ * Peak single precision floating point operations that
372
+ * can be performed in one cycle by the device.
373
+ * This should be collected using value of
374
+ * \param CUPTI_DEVICE_ATTR_FLOP_SP_PER_CYCLE of
375
+ * cuptiDeviceGetAttribute.
376
+ */
377
+ CUPTI_METRIC_PROPERTY_FLOP_SP_PER_CYCLE,
378
+ /*
379
+ * Peak double precision floating point operations that
380
+ * can be performed in one cycle by the device.
381
+ * This should be collected using value of
382
+ * \param CUPTI_DEVICE_ATTR_FLOP_DP_PER_CYCLE of
383
+ * cuptiDeviceGetAttribute.
384
+ */
385
+ CUPTI_METRIC_PROPERTY_FLOP_DP_PER_CYCLE,
386
+ /*
387
+ * Number of L2 units on a device. This can be collected
388
+ * using value of \param CUPTI_DEVICE_ATTR_MAX_L2_UNITS of
389
+ * cuDeviceGetAttribute.
390
+ */
391
+ CUPTI_METRIC_PROPERTY_L2_UNITS,
392
+ /*
393
+ * Whether ECC support is enabled on the device. This can be
394
+ * collected using value of \param CU_DEVICE_ATTRIBUTE_ECC_ENABLED of
395
+ * cuDeviceGetAttribute.
396
+ */
397
+ CUPTI_METRIC_PROPERTY_ECC_ENABLED,
398
+ /*
399
+ * Peak half precision floating point operations that
400
+ * can be performed in one cycle by the device.
401
+ * This should be collected using value of
402
+ * \param CUPTI_DEVICE_ATTR_FLOP_HP_PER_CYCLE of
403
+ * cuptiDeviceGetAttribute.
404
+ */
405
+ CUPTI_METRIC_PROPERTY_FLOP_HP_PER_CYCLE,
406
+ /*
407
+ * NVLINK Bandwitdh for device. This should be collected
408
+ * using value of \param CUPTI_DEVICE_ATTR_GPU_CPU_NVLINK_BW of
409
+ * cuptiDeviceGetAttribute.
410
+ */
411
+ CUPTI_METRIC_PROPERTY_GPU_CPU_NVLINK_BANDWIDTH,
412
+ } CUpti_MetricPropertyID;
413
+
414
+ /**
415
+ * \brief Get the total number of metrics available on any device.
416
+ *
417
+ * Returns the total number of metrics available on any CUDA-capable
418
+ * devices.
419
+ *
420
+ * \param numMetrics Returns the number of metrics
421
+ *
422
+ * \retval CUPTI_SUCCESS
423
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numMetrics is NULL
424
+ */
425
+ CUptiResult CUPTIAPI cuptiGetNumMetrics(uint32_t *numMetrics);
426
+
427
+ /**
428
+ * \brief Get all the metrics available on any device.
429
+ *
430
+ * Returns the metric IDs in \p metricArray for all CUDA-capable
431
+ * devices. The size of the \p metricArray buffer is given by \p
432
+ * *arraySizeBytes. The size of the \p metricArray buffer must be at
433
+ * least \p numMetrics * sizeof(CUpti_MetricID) or all metric IDs will
434
+ * not be returned. The value returned in \p *arraySizeBytes contains
435
+ * the number of bytes returned in \p metricArray.
436
+ *
437
+ * \param arraySizeBytes The size of \p metricArray in bytes, and
438
+ * returns the number of bytes written to \p metricArray
439
+ * \param metricArray Returns the IDs of the metrics
440
+ *
441
+ * \retval CUPTI_SUCCESS
442
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
443
+ * \p metricArray are NULL
444
+ */
445
+ CUptiResult CUPTIAPI cuptiEnumMetrics(size_t *arraySizeBytes,
446
+ CUpti_MetricID *metricArray);
447
+
448
+ /**
449
+ * \brief Get the number of metrics for a device.
450
+ *
451
+ * Returns the number of metrics available for a device.
452
+ *
453
+ * \param device The CUDA device
454
+ * \param numMetrics Returns the number of metrics available for the
455
+ * device
456
+ *
457
+ * \retval CUPTI_SUCCESS
458
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
459
+ * \retval CUPTI_ERROR_INVALID_DEVICE
460
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numMetrics is NULL
461
+ */
462
+ CUptiResult CUPTIAPI cuptiDeviceGetNumMetrics(CUdevice device,
463
+ uint32_t *numMetrics);
464
+
465
+ /**
466
+ * \brief Get the metrics for a device.
467
+ *
468
+ * Returns the metric IDs in \p metricArray for a device. The size of
469
+ * the \p metricArray buffer is given by \p *arraySizeBytes. The size
470
+ * of the \p metricArray buffer must be at least \p numMetrics *
471
+ * sizeof(CUpti_MetricID) or else all metric IDs will not be
472
+ * returned. The value returned in \p *arraySizeBytes contains the
473
+ * number of bytes returned in \p metricArray.
474
+ *
475
+ * \param device The CUDA device
476
+ * \param arraySizeBytes The size of \p metricArray in bytes, and
477
+ * returns the number of bytes written to \p metricArray
478
+ * \param metricArray Returns the IDs of the metrics for the device
479
+ *
480
+ * \retval CUPTI_SUCCESS
481
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
482
+ * \retval CUPTI_ERROR_INVALID_DEVICE
483
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
484
+ * \p metricArray are NULL
485
+ */
486
+ CUptiResult CUPTIAPI cuptiDeviceEnumMetrics(CUdevice device,
487
+ size_t *arraySizeBytes,
488
+ CUpti_MetricID *metricArray);
489
+
490
+ /**
491
+ * \brief Get a metric attribute.
492
+ *
493
+ * Returns a metric attribute in \p *value. The size of the \p
494
+ * value buffer is given by \p *valueSize. The value returned in \p
495
+ * *valueSize contains the number of bytes returned in \p value.
496
+ *
497
+ * If the attribute value is a c-string that is longer than \p
498
+ * *valueSize, then only the first \p *valueSize characters will be
499
+ * returned and there will be no terminating null byte.
500
+ *
501
+ * \param metric ID of the metric
502
+ * \param attrib The metric attribute to read
503
+ * \param valueSize The size of the \p value buffer in bytes, and
504
+ * returns the number of bytes written to \p value
505
+ * \param value Returns the attribute's value
506
+ *
507
+ * \retval CUPTI_SUCCESS
508
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
509
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
510
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
511
+ * is NULL, or if \p attrib is not a metric attribute
512
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
513
+ * attribute values, indicates that the \p value buffer is too small
514
+ * to hold the attribute value.
515
+ */
516
+ CUptiResult CUPTIAPI cuptiMetricGetAttribute(CUpti_MetricID metric,
517
+ CUpti_MetricAttribute attrib,
518
+ size_t *valueSize,
519
+ void *value);
520
+
521
+ /**
522
+ * \brief Find an metric by name.
523
+ *
524
+ * Find a metric by name and return the metric ID in \p *metric.
525
+ *
526
+ * \param device The CUDA device
527
+ * \param metricName The name of metric to find
528
+ * \param metric Returns the ID of the found metric or undefined if
529
+ * unable to find the metric
530
+ *
531
+ * \retval CUPTI_SUCCESS
532
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
533
+ * \retval CUPTI_ERROR_INVALID_DEVICE
534
+ * \retval CUPTI_ERROR_INVALID_METRIC_NAME if unable to find a metric
535
+ * with name \p metricName. In this case \p *metric is undefined
536
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricName or \p
537
+ * metric are NULL.
538
+ */
539
+ CUptiResult CUPTIAPI cuptiMetricGetIdFromName(CUdevice device,
540
+ const char *metricName,
541
+ CUpti_MetricID *metric);
542
+
543
+ /**
544
+ * \brief Get number of events required to calculate a metric.
545
+ *
546
+ * Returns the number of events in \p numEvents that are required to
547
+ * calculate a metric.
548
+ *
549
+ * \param metric ID of the metric
550
+ * \param numEvents Returns the number of events required for the metric
551
+ *
552
+ * \retval CUPTI_SUCCESS
553
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
554
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
555
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numEvents is NULL
556
+ */
557
+ CUptiResult CUPTIAPI cuptiMetricGetNumEvents(CUpti_MetricID metric,
558
+ uint32_t *numEvents);
559
+
560
+ /**
561
+ * \brief Get the events required to calculating a metric.
562
+ *
563
+ * Gets the event IDs in \p eventIdArray required to calculate a \p
564
+ * metric. The size of the \p eventIdArray buffer is given by \p
565
+ * *eventIdArraySizeBytes and must be at least \p numEvents *
566
+ * sizeof(CUpti_EventID) or all events will not be returned. The value
567
+ * returned in \p *eventIdArraySizeBytes contains the number of bytes
568
+ * returned in \p eventIdArray.
569
+ *
570
+ * \param metric ID of the metric
571
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes,
572
+ * and returns the number of bytes written to \p eventIdArray
573
+ * \param eventIdArray Returns the IDs of the events required to
574
+ * calculate \p metric
575
+ *
576
+ * \retval CUPTI_SUCCESS
577
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
578
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
579
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventIdArraySizeBytes or \p
580
+ * eventIdArray are NULL.
581
+ */
582
+ CUptiResult CUPTIAPI cuptiMetricEnumEvents(CUpti_MetricID metric,
583
+ size_t *eventIdArraySizeBytes,
584
+ CUpti_EventID *eventIdArray);
585
+
586
+ /**
587
+ * \brief Get number of properties required to calculate a metric.
588
+ *
589
+ * Returns the number of properties in \p numProp that are required to
590
+ * calculate a metric.
591
+ *
592
+ * \param metric ID of the metric
593
+ * \param numProp Returns the number of properties required for the
594
+ * metric
595
+ *
596
+ * \retval CUPTI_SUCCESS
597
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
598
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
599
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numProp is NULL
600
+ */
601
+ CUptiResult CUPTIAPI cuptiMetricGetNumProperties(CUpti_MetricID metric,
602
+ uint32_t *numProp);
603
+
604
+ /**
605
+ * \brief Get the properties required to calculating a metric.
606
+ *
607
+ * Gets the property IDs in \p propIdArray required to calculate a \p
608
+ * metric. The size of the \p propIdArray buffer is given by \p
609
+ * *propIdArraySizeBytes and must be at least \p numProp *
610
+ * sizeof(CUpti_DeviceAttribute) or all properties will not be
611
+ * returned. The value returned in \p *propIdArraySizeBytes contains
612
+ * the number of bytes returned in \p propIdArray.
613
+ *
614
+ * \param metric ID of the metric
615
+ * \param propIdArraySizeBytes The size of \p propIdArray in bytes,
616
+ * and returns the number of bytes written to \p propIdArray
617
+ * \param propIdArray Returns the IDs of the properties required to
618
+ * calculate \p metric
619
+ *
620
+ * \retval CUPTI_SUCCESS
621
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
622
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
623
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p propIdArraySizeBytes or \p
624
+ * propIdArray are NULL.
625
+ */
626
+ CUptiResult CUPTIAPI cuptiMetricEnumProperties(CUpti_MetricID metric,
627
+ size_t *propIdArraySizeBytes,
628
+ CUpti_MetricPropertyID *propIdArray);
629
+
630
+
631
+ /**
632
+ * \brief For a metric get the groups of events that must be collected
633
+ * in the same pass.
634
+ *
635
+ * For a metric get the groups of events that must be collected in the
636
+ * same pass to ensure that the metric is calculated correctly. If the
637
+ * events are not collected as specified then the metric value may be
638
+ * inaccurate.
639
+ *
640
+ * The function returns NULL if a metric does not have any required
641
+ * event group. In this case the events needed for the metric can be
642
+ * grouped in any manner for collection.
643
+ *
644
+ * \param context The context for event collection
645
+ * \param metric The metric ID
646
+ * \param eventGroupSets Returns a CUpti_EventGroupSets object that
647
+ * indicates the events that must be collected in the same pass to
648
+ * ensure the metric is calculated correctly. Returns NULL if no
649
+ * grouping is required for metric
650
+ * \retval CUPTI_SUCCESS
651
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
652
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
653
+ */
654
+ CUptiResult CUPTIAPI cuptiMetricGetRequiredEventGroupSets(CUcontext context,
655
+ CUpti_MetricID metric,
656
+ CUpti_EventGroupSets **eventGroupSets);
657
+
658
+ /**
659
+ * \brief For a set of metrics, get the grouping that indicates the
660
+ * number of passes and the event groups necessary to collect the
661
+ * events required for those metrics.
662
+ *
663
+ * For a set of metrics, get the grouping that indicates the number of
664
+ * passes and the event groups necessary to collect the events
665
+ * required for those metrics.
666
+ *
667
+ * \see cuptiEventGroupSetsCreate for details on event group set
668
+ * creation.
669
+ *
670
+ * \param context The context for event collection
671
+ * \param metricIdArraySizeBytes Size of the metricIdArray in bytes
672
+ * \param metricIdArray Array of metric IDs
673
+ * \param eventGroupPasses Returns a CUpti_EventGroupSets object that
674
+ * indicates the number of passes required to collect the events and
675
+ * the events to collect on each pass
676
+ *
677
+ * \retval CUPTI_SUCCESS
678
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
679
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
680
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
681
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricIdArray or
682
+ * \p eventGroupPasses is NULL
683
+ */
684
+ CUptiResult CUPTIAPI cuptiMetricCreateEventGroupSets(CUcontext context,
685
+ size_t metricIdArraySizeBytes,
686
+ CUpti_MetricID *metricIdArray,
687
+ CUpti_EventGroupSets **eventGroupPasses);
688
+
689
+ /**
690
+ * \brief Calculate the value for a metric.
691
+ *
692
+ * Use the events collected for a metric to calculate the metric
693
+ * value. Metric value evaluation depends on the evaluation mode
694
+ * \ref CUpti_MetricEvaluationMode that the metric supports.
695
+ * If a metric has evaluation mode as CUPTI_METRIC_EVALUATION_MODE_PER_INSTANCE,
696
+ * then it assumes that the input event value is for one domain instance.
697
+ * If a metric has evaluation mode as CUPTI_METRIC_EVALUATION_MODE_AGGREGATE,
698
+ * it assumes that input event values are
699
+ * normalized to represent all domain instances on a device. For the
700
+ * most accurate metric collection, the events required for the metric
701
+ * should be collected for all profiled domain instances. For example,
702
+ * to collect all instances of an event, set the
703
+ * CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES attribute on
704
+ * the group containing the event to 1. The normalized value for the
705
+ * event is then: (\p sum_event_values * \p totalInstanceCount) / \p
706
+ * instanceCount, where \p sum_event_values is the summation of the
707
+ * event values across all profiled domain instances, \p
708
+ * totalInstanceCount is obtained from querying
709
+ * CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT and \p instanceCount
710
+ * is obtained from querying CUPTI_EVENT_GROUP_ATTR_INSTANCE_COUNT (or
711
+ * CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT).
712
+ *
713
+ * \param device The CUDA device that the metric is being calculated for
714
+ * \param metric The metric ID
715
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes
716
+ * \param eventIdArray The event IDs required to calculate \p metric
717
+ * \param eventValueArraySizeBytes The size of \p eventValueArray in bytes
718
+ * \param eventValueArray The normalized event values required to
719
+ * calculate \p metric. The values must be order to match the order of
720
+ * events in \p eventIdArray
721
+ * \param timeDuration The duration over which the events were
722
+ * collected, in ns
723
+ * \param metricValue Returns the value for the metric
724
+ *
725
+ * \retval CUPTI_SUCCESS
726
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
727
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
728
+ * \retval CUPTI_ERROR_INVALID_OPERATION
729
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if the
730
+ * eventIdArray does not contain all the events needed for metric
731
+ * \retval CUPTI_ERROR_INVALID_EVENT_VALUE if any of the
732
+ * event values required for the metric is CUPTI_EVENT_OVERFLOW
733
+ * \retval CUPTI_ERROR_INVALID_METRIC_VALUE if the computed metric value
734
+ * cannot be represented in the metric's value type. For example,
735
+ * if the metric value type is unsigned and the computed metric value is negative
736
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricValue,
737
+ * \p eventIdArray or \p eventValueArray is NULL
738
+ */
739
+ CUptiResult CUPTIAPI cuptiMetricGetValue(CUdevice device,
740
+ CUpti_MetricID metric,
741
+ size_t eventIdArraySizeBytes,
742
+ CUpti_EventID *eventIdArray,
743
+ size_t eventValueArraySizeBytes,
744
+ uint64_t *eventValueArray,
745
+ uint64_t timeDuration,
746
+ CUpti_MetricValue *metricValue);
747
+
748
+ /**
749
+ * \brief Calculate the value for a metric.
750
+ *
751
+ * Use the events and properties collected for a metric to calculate
752
+ * the metric value. Metric value evaluation depends on the evaluation
753
+ * mode \ref CUpti_MetricEvaluationMode that the metric supports. If
754
+ * a metric has evaluation mode as
755
+ * CUPTI_METRIC_EVALUATION_MODE_PER_INSTANCE, then it assumes that the
756
+ * input event value is for one domain instance. If a metric has
757
+ * evaluation mode as CUPTI_METRIC_EVALUATION_MODE_AGGREGATE, it
758
+ * assumes that input event values are normalized to represent all
759
+ * domain instances on a device. For the most accurate metric
760
+ * collection, the events required for the metric should be collected
761
+ * for all profiled domain instances. For example, to collect all
762
+ * instances of an event, set the
763
+ * CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES attribute on
764
+ * the group containing the event to 1. The normalized value for the
765
+ * event is then: (\p sum_event_values * \p totalInstanceCount) / \p
766
+ * instanceCount, where \p sum_event_values is the summation of the
767
+ * event values across all profiled domain instances, \p
768
+ * totalInstanceCount is obtained from querying
769
+ * CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT and \p instanceCount
770
+ * is obtained from querying CUPTI_EVENT_GROUP_ATTR_INSTANCE_COUNT (or
771
+ * CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT).
772
+ *
773
+ * \param metric The metric ID
774
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes
775
+ * \param eventIdArray The event IDs required to calculate \p metric
776
+ * \param eventValueArraySizeBytes The size of \p eventValueArray in bytes
777
+ * \param eventValueArray The normalized event values required to
778
+ * calculate \p metric. The values must be order to match the order of
779
+ * events in \p eventIdArray
780
+ * \param propIdArraySizeBytes The size of \p propIdArray in bytes
781
+ * \param propIdArray The metric property IDs required to calculate \p metric
782
+ * \param propValueArraySizeBytes The size of \p propValueArray in bytes
783
+ * \param propValueArray The metric property values required to
784
+ * calculate \p metric. The values must be order to match the order of
785
+ * metric properties in \p propIdArray
786
+ * \param metricValue Returns the value for the metric
787
+ *
788
+ * \retval CUPTI_SUCCESS
789
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
790
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
791
+ * \retval CUPTI_ERROR_INVALID_OPERATION
792
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if the
793
+ * eventIdArray does not contain all the events needed for metric
794
+ * \retval CUPTI_ERROR_INVALID_EVENT_VALUE if any of the
795
+ * event values required for the metric is CUPTI_EVENT_OVERFLOW
796
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if the computed metric value
797
+ * cannot be represented in the metric's value type. For example,
798
+ * if the metric value type is unsigned and the computed metric value is negative
799
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricValue,
800
+ * \p eventIdArray or \p eventValueArray is NULL
801
+ */
802
+ CUptiResult CUPTIAPI cuptiMetricGetValue2(CUpti_MetricID metric,
803
+ size_t eventIdArraySizeBytes,
804
+ CUpti_EventID *eventIdArray,
805
+ size_t eventValueArraySizeBytes,
806
+ uint64_t *eventValueArray,
807
+ size_t propIdArraySizeBytes,
808
+ CUpti_MetricPropertyID *propIdArray,
809
+ size_t propValueArraySizeBytes,
810
+ uint64_t *propValueArray,
811
+ CUpti_MetricValue *metricValue);
812
+
813
+ /** @} */ /* END CUPTI_METRIC_API */
814
+
815
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
816
+ #pragma GCC visibility pop
817
+ #endif
818
+
819
+ #if defined(__cplusplus)
820
+ }
821
+ #endif
822
+
823
+ #endif /*_CUPTI_METRIC_H_*/
824
+
825
+
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/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
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pcsampling.h ADDED
@@ -0,0 +1,950 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
58
+ #ifndef CUPTIAPI
59
+ #ifdef _WIN32
60
+ #define CUPTIAPI __stdcall
61
+ #else
62
+ #define CUPTIAPI
63
+ #endif
64
+ #endif
65
+
66
+ #define ACTIVITY_RECORD_ALIGNMENT 8
67
+ #if defined(_WIN32) // Windows 32- and 64-bit
68
+ #define START_PACKED_ALIGNMENT __pragma(pack(push,1)) // exact fit - no padding
69
+ #define PACKED_ALIGNMENT __declspec(align(ACTIVITY_RECORD_ALIGNMENT))
70
+ #define END_PACKED_ALIGNMENT __pragma(pack(pop))
71
+ #elif defined(__GNUC__) // GCC
72
+ #define START_PACKED_ALIGNMENT
73
+ #define PACKED_ALIGNMENT __attribute__ ((__packed__)) __attribute__ ((aligned (ACTIVITY_RECORD_ALIGNMENT)))
74
+ #define END_PACKED_ALIGNMENT
75
+ #else // all other compilers
76
+ #define START_PACKED_ALIGNMENT
77
+ #define PACKED_ALIGNMENT
78
+ #define END_PACKED_ALIGNMENT
79
+ #endif
80
+
81
+ #if defined(__cplusplus)
82
+ extern "C" {
83
+ #endif
84
+
85
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
86
+ #pragma GCC visibility push(default)
87
+ #endif
88
+
89
+ /**
90
+ * \defgroup CUPTI_PCSAMPLING_API CUPTI PC Sampling API
91
+ * Functions, types, and enums that implement the CUPTI PC Sampling API.
92
+ * @{
93
+ */
94
+
95
+ #ifndef CUPTI_PCSAMPLING_STRUCT_SIZE
96
+ #define CUPTI_PCSAMPLING_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
97
+ #endif
98
+
99
+ #ifndef CUPTI_STALL_REASON_STRING_SIZE
100
+ #define CUPTI_STALL_REASON_STRING_SIZE 128
101
+ #endif
102
+
103
+ /**
104
+ * \brief PC Sampling collection mode
105
+ */
106
+ typedef enum
107
+ {
108
+ /**
109
+ * INVALID Value
110
+ */
111
+ CUPTI_PC_SAMPLING_COLLECTION_MODE_INVALID = 0,
112
+ /**
113
+ * Continuous mode. Kernels are not serialized in this mode.
114
+ */
115
+ CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS = 1,
116
+ /**
117
+ * Serialized mode. Kernels are serialized in this mode.
118
+ */
119
+ CUPTI_PC_SAMPLING_COLLECTION_MODE_KERNEL_SERIALIZED = 2,
120
+ } CUpti_PCSamplingCollectionMode;
121
+
122
+ /**
123
+ * \brief PC Sampling stall reasons
124
+ */
125
+ typedef struct PACKED_ALIGNMENT
126
+ {
127
+ /**
128
+ * [r] Collected stall reason index
129
+ */
130
+ uint32_t pcSamplingStallReasonIndex;
131
+ /**
132
+ * [r] Number of times the PC was sampled with the stallReason.
133
+ */
134
+ uint32_t samples;
135
+ } CUpti_PCSamplingStallReason;
136
+
137
+ /**
138
+ * \brief PC Sampling data
139
+ */
140
+ typedef struct PACKED_ALIGNMENT
141
+ {
142
+ /**
143
+ * [w] Size of the data structure.
144
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
145
+ * available in the structure. Used to preserve backward compatibility.
146
+ */
147
+ size_t size;
148
+ /**
149
+ * [r] Unique cubin id
150
+ */
151
+ uint64_t cubinCrc;
152
+ /**
153
+ * [r] PC offset
154
+ */
155
+ uint64_t pcOffset;
156
+ /**
157
+ * The function's unique symbol index in the module.
158
+ */
159
+ uint32_t functionIndex;
160
+ /**
161
+ * Padding
162
+ */
163
+ uint32_t pad;
164
+ /**
165
+ * [r] The function name. This name string might be shared across all the records
166
+ * including records from activity APIs representing the same function, and so it should not be
167
+ * modified or freed until post processing of all the records is done. Once done, it is user’s responsibility to
168
+ * free the memory using free() function.
169
+ */
170
+ char* functionName;
171
+ /**
172
+ * [r] Collected stall reason count
173
+ */
174
+ size_t stallReasonCount;
175
+ /**
176
+ * [r] Stall reason id
177
+ * Total samples
178
+ */
179
+ CUpti_PCSamplingStallReason *stallReason;
180
+ } CUpti_PCSamplingPCData;
181
+
182
+ /**
183
+ * \brief PC Sampling output data format
184
+ */
185
+ typedef enum
186
+ {
187
+ CUPTI_PC_SAMPLING_OUTPUT_DATA_FORMAT_INVALID = 0,
188
+ /**
189
+ * HW buffer data will be parsed during collection of data
190
+ */
191
+ CUPTI_PC_SAMPLING_OUTPUT_DATA_FORMAT_PARSED = 1,
192
+ } CUpti_PCSamplingOutputDataFormat;
193
+
194
+ /**
195
+ * \brief Collected PC Sampling data
196
+ *
197
+ */
198
+ typedef struct PACKED_ALIGNMENT
199
+ {
200
+ /**
201
+ * [w] Size of the data structure.
202
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
203
+ * available in the structure. Used to preserve backward compatibility.
204
+ */
205
+ size_t size;
206
+ /**
207
+ * [w] Number of PCs to be collected
208
+ */
209
+ size_t collectNumPcs;
210
+ /**
211
+ * [r] Number of samples collected across all PCs.
212
+ * It includes samples for user modules, samples for non-user kernels and dropped samples.
213
+ * It includes counts for all non selected stall reasons.
214
+ * CUPTI does not provide PC records for non-user kernels.
215
+ * CUPTI does not provide PC records for instructions for which all selected stall reason metrics counts are zero.
216
+ */
217
+ uint64_t totalSamples;
218
+ /**
219
+ * [r] Number of samples that were dropped by hardware due to backpressure/overflow.
220
+ */
221
+ uint64_t droppedSamples;
222
+ /**
223
+ * [r] Number of PCs collected
224
+ */
225
+ size_t totalNumPcs;
226
+ /**
227
+ * [r] Number of PCs available for collection
228
+ */
229
+ size_t remainingNumPcs;
230
+ /**
231
+ * [r] Unique identifier for each range.
232
+ * Data collected across multiple ranges in multiple buffers can be identified using range id.
233
+ */
234
+ uint64_t rangeId;
235
+ /**
236
+ * [r] Profiled PC data
237
+ * This data struct should have enough memory to collect number of PCs mentioned in \brief collectNumPcs
238
+ */
239
+ CUpti_PCSamplingPCData *pPcData;
240
+ /**
241
+ * [r] Number of samples collected across all non user kernels PCs.
242
+ * It includes samples for non-user kernels.
243
+ * It includes counts for all non selected stall reasons as well.
244
+ * CUPTI does not provide PC records for non-user kernels.
245
+ */
246
+ uint64_t nonUsrKernelsTotalSamples;
247
+
248
+ /**
249
+ * [r] Status of the hardware buffer.
250
+ * CUPTI returns the error code CUPTI_ERROR_OUT_OF_MEMORY when hardware buffer is full.
251
+ * 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:
252
+ * 1. Increase the hardware buffer size using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_HARDWARE_BUFFER_SIZE
253
+ * 2. Decrease the thread sleep span using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_WORKER_THREAD_PERIODIC_SLEEP_SPAN
254
+ * 3. Decrease the sampling frequency using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_PERIOD
255
+ */
256
+ uint8_t hardwareBufferFull;
257
+ } CUpti_PCSamplingData;
258
+
259
+ /**
260
+ * \brief PC Sampling configuration attributes
261
+ *
262
+ * PC Sampling configuration attribute types. These attributes can be read
263
+ * using \ref cuptiPCSamplingGetConfigurationAttribute and can be written
264
+ * using \ref cuptiPCSamplingSetConfigurationAttribute. Attributes marked
265
+ * [r] can only be read using \ref cuptiPCSamplingGetConfigurationAttribute
266
+ * [w] can only be written using \ref cuptiPCSamplingSetConfigurationAttribute
267
+ * [rw] can be read using \ref cuptiPCSamplingGetConfigurationAttribute and
268
+ * written using \ref cuptiPCSamplingSetConfigurationAttribute
269
+ */
270
+ typedef enum
271
+ {
272
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_INVALID = 0,
273
+ /**
274
+ * [rw] Sampling period for PC Sampling.
275
+ * DEFAULT - CUPTI defined value based on number of SMs
276
+ * Valid values for the sampling
277
+ * periods are between 5 to 31 both inclusive. This will set the
278
+ * sampling period to (2^samplingPeriod) cycles.
279
+ * For e.g. for sampling period = 5 to 31, cycles = 32, 64, 128,..., 2^31
280
+ * Value is a uint32_t
281
+ */
282
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_PERIOD = 1,
283
+ /**
284
+ * [w] Number of stall reasons to collect.
285
+ * DEFAULT - All stall reasons will be collected
286
+ * Value is a size_t
287
+ * [w] Stall reasons to collect
288
+ * DEFAULT - All stall reasons will be collected
289
+ * Input value should be a pointer pointing to array of stall reason indexes
290
+ * containing all the stall reason indexes to collect.
291
+ */
292
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_STALL_REASON = 2,
293
+ /**
294
+ * [rw] Size of SW buffer for raw PC counter data downloaded from HW buffer
295
+ * DEFAULT - 1 MB, which can accommodate approximately 5500 PCs
296
+ * with all stall reasons
297
+ * Approximately it takes 16 Bytes (and some fixed size memory)
298
+ * to accommodate one PC with one stall reason
299
+ * For e.g. 1 PC with 1 stall reason = 32 Bytes
300
+ * 1 PC with 2 stall reason = 48 Bytes
301
+ * 1 PC with 4 stall reason = 96 Bytes
302
+ * Value is a size_t
303
+ */
304
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SCRATCH_BUFFER_SIZE = 3,
305
+ /**
306
+ * [rw] Size of HW buffer in bytes
307
+ * DEFAULT - 512 MB
308
+ * If sampling period is too less, HW buffer can overflow
309
+ * and drop PC data
310
+ * Value is a size_t
311
+ */
312
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_HARDWARE_BUFFER_SIZE = 4,
313
+ /**
314
+ * [rw] PC Sampling collection mode
315
+ * DEFAULT - CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS
316
+ * Input value should be of type \ref CUpti_PCSamplingCollectionMode.
317
+ */
318
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_COLLECTION_MODE = 5,
319
+ /**
320
+ * [rw] Control over PC Sampling data collection range
321
+ * Default - 0
322
+ * 1 - Allows user to start and stop PC Sampling using APIs -
323
+ * \ref cuptiPCSamplingStart() - Start PC Sampling
324
+ * \ref cuptiPCSamplingStop() - Stop PC Sampling
325
+ * Value is a uint32_t
326
+ */
327
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL = 6,
328
+ /**
329
+ * [w] Value for output data format
330
+ * Default - CUPTI_PC_SAMPLING_OUTPUT_DATA_FORMAT_PARSED
331
+ * Input value should be of type \ref CUpti_PCSamplingOutputDataFormat.
332
+ */
333
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_OUTPUT_DATA_FORMAT = 7,
334
+ /**
335
+ * [w] Data buffer to hold collected PC Sampling data PARSED_DATA
336
+ * Default - none.
337
+ * Buffer type is void * which can point to PARSED_DATA
338
+ * Refer \ref CUpti_PCSamplingData for buffer format for PARSED_DATA
339
+ */
340
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_DATA_BUFFER = 8,
341
+ /**
342
+ * [rw] Control sleep time of the worker threads created by CUPTI for various PC sampling operations.
343
+ * CUPTI creates multiple worker threads to offload certain operations to these threads. This includes decoding of HW data to
344
+ * the CUPTI PC sampling data and correlating PC data to SASS instructions. CUPTI wakes up these threads periodically.
345
+ * Default - 100 milliseconds.
346
+ * Value is a uint32_t
347
+ */
348
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_WORKER_THREAD_PERIODIC_SLEEP_SPAN = 9,
349
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_FORCE_INT = 0x7fffffff,
350
+ } CUpti_PCSamplingConfigurationAttributeType;
351
+
352
+ /**
353
+ * \brief PC sampling configuration information structure
354
+ *
355
+ * This structure provides \ref CUpti_PCSamplingConfigurationAttributeType which can be configured
356
+ * or queried for PC sampling configuration
357
+ */
358
+ typedef struct
359
+ {
360
+ /**
361
+ * Refer \ref CUpti_PCSamplingConfigurationAttributeType for all supported attribute types
362
+ */
363
+ CUpti_PCSamplingConfigurationAttributeType attributeType;
364
+ /*
365
+ * Configure or query status for \p attributeType
366
+ * CUPTI_SUCCESS for valid \p attributeType and \p attributeData
367
+ * CUPTI_ERROR_INVALID_OPERATION if \p attributeData is not valid
368
+ * CUPTI_ERROR_INVALID_PARAMETER if \p attributeType is not valid
369
+ */
370
+ CUptiResult attributeStatus;
371
+ union
372
+ {
373
+ /**
374
+ * Invalid Value
375
+ */
376
+ struct
377
+ {
378
+ uint64_t data[3];
379
+ } invalidData;
380
+ /**
381
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_PERIOD
382
+ */
383
+ struct
384
+ {
385
+ uint32_t samplingPeriod;
386
+ } samplingPeriodData;
387
+ /**
388
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_STALL_REASON
389
+ */
390
+ struct
391
+ {
392
+ size_t stallReasonCount;
393
+ uint32_t *pStallReasonIndex;
394
+ } stallReasonData;
395
+ /**
396
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SCRATCH_BUFFER_SIZE
397
+ */
398
+ struct
399
+ {
400
+ size_t scratchBufferSize;
401
+ } scratchBufferSizeData;
402
+ /**
403
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_HARDWARE_BUFFER_SIZE
404
+ */
405
+ struct
406
+ {
407
+ size_t hardwareBufferSize;
408
+ } hardwareBufferSizeData;
409
+ /**
410
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_COLLECTION_MODE
411
+ */
412
+ struct
413
+ {
414
+ CUpti_PCSamplingCollectionMode collectionMode;
415
+ } collectionModeData;
416
+ /**
417
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL
418
+ */
419
+ struct
420
+ {
421
+ uint32_t enableStartStopControl;
422
+ } enableStartStopControlData;
423
+ /**
424
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_OUTPUT_DATA_FORMAT
425
+ */
426
+ struct
427
+ {
428
+ CUpti_PCSamplingOutputDataFormat outputDataFormat;
429
+ } outputDataFormatData;
430
+ /**
431
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_DATA_BUFFER
432
+ */
433
+ struct
434
+ {
435
+ void *samplingDataBuffer;
436
+ } samplingDataBufferData;
437
+ /**
438
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_WORKER_THREAD_PERIODIC_SLEEP_SPAN
439
+ */
440
+ struct
441
+ {
442
+ uint32_t workerThreadPeriodicSleepSpan;
443
+ } workerThreadPeriodicSleepSpanData;
444
+
445
+ } attributeData;
446
+ } CUpti_PCSamplingConfigurationInfo;
447
+
448
+ /**
449
+ * \brief PC sampling configuration structure
450
+ *
451
+ * This structure configures PC sampling using \ref cuptiPCSamplingSetConfigurationAttribute
452
+ * and queries PC sampling default configuration using \ref cuptiPCSamplingGetConfigurationAttribute
453
+ */
454
+ typedef struct
455
+ {
456
+ /**
457
+ * [w] Size of the data structure i.e. CUpti_PCSamplingConfigurationInfoParamsSize
458
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
459
+ * available in the structure. Used to preserve backward compatibility.
460
+ */
461
+ size_t size;
462
+ /**
463
+ * [w] Assign to NULL
464
+ */
465
+ void* pPriv;
466
+ /**
467
+ * [w] CUcontext
468
+ */
469
+ CUcontext ctx;
470
+ /**
471
+ * [w] Number of attributes to configure using \ref cuptiPCSamplingSetConfigurationAttribute or query
472
+ * using \ref cuptiPCSamplingGetConfigurationAttribute
473
+ */
474
+ size_t numAttributes;
475
+ /**
476
+ * Refer \ref CUpti_PCSamplingConfigurationInfo
477
+ */
478
+ CUpti_PCSamplingConfigurationInfo *pPCSamplingConfigurationInfo;
479
+ } CUpti_PCSamplingConfigurationInfoParams;
480
+ #define CUpti_PCSamplingConfigurationInfoParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingConfigurationInfoParams,pPCSamplingConfigurationInfo)
481
+
482
+ /**
483
+ * \brief Write 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 \p attrib.
491
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if attribute \p value is not valid
492
+ * or any \p pParams is not valid
493
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
494
+ * does not support the API
495
+ */
496
+ CUptiResult CUPTIAPI cuptiPCSamplingSetConfigurationAttribute(CUpti_PCSamplingConfigurationInfoParams *pParams);
497
+
498
+ /**
499
+ * \brief Read PC Sampling configuration attribute.
500
+ *
501
+ * \param pParams A pointer to \ref CUpti_PCSamplingConfigurationInfoParams
502
+ * containing PC sampling configuration.
503
+ *
504
+ * \retval CUPTI_SUCCESS
505
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called with
506
+ * some invalid attribute.
507
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p attrib is not valid
508
+ * or any \p pParams is not valid
509
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT indicates that
510
+ * the \p value buffer is too small to hold the attribute value
511
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
512
+ * does not support the API
513
+ */
514
+ CUptiResult CUPTIAPI cuptiPCSamplingGetConfigurationAttribute(CUpti_PCSamplingConfigurationInfoParams *pParams);
515
+
516
+ /**
517
+ * \brief Params for cuptiPCSamplingEnable
518
+ */
519
+ typedef struct
520
+ {
521
+ /**
522
+ * [w] Size of the data structure i.e. CUpti_PCSamplingGetDataParamsSize
523
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
524
+ * available in the structure. Used to preserve backward compatibility.
525
+ */
526
+ size_t size;
527
+ /**
528
+ * [w] Assign to NULL
529
+ */
530
+ void* pPriv;
531
+ /**
532
+ * [w] CUcontext
533
+ */
534
+ CUcontext ctx;
535
+ /**
536
+ * \param pcSamplingData Data buffer to hold collected PC Sampling data PARSED_DATA
537
+ * Buffer type is void * which can point to PARSED_DATA
538
+ * Refer \ref CUpti_PCSamplingData for buffer format for PARSED_DATA
539
+ */
540
+ void *pcSamplingData;
541
+ } CUpti_PCSamplingGetDataParams;
542
+ #define CUpti_PCSamplingGetDataParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingGetDataParams, pcSamplingData)
543
+ /**
544
+ * \brief Flush GPU PC sampling data periodically.
545
+ *
546
+ * Flushing of GPU PC Sampling data is required at following point to maintain uniqueness of PCs:
547
+ * For \brief CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS, after every module load-unload-load
548
+ * For \brief CUPTI_PC_SAMPLING_COLLECTION_MODE_KERNEL_SERIALIZED, after every kernel ends
549
+ * If configuration option \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL
550
+ * is enabled, then after every range end i.e. \brief cuptiPCSamplingStop()
551
+ *
552
+ * If application is profiled in \brief CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS, with disabled
553
+ * \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL, and there is no module unload,
554
+ * user can collect data in two ways:
555
+ * Use \brief cuptiPCSamplingGetData() API periodically
556
+ * Use \brief cuptiPCSamplingDisable() on application exit and read GPU PC sampling data from sampling
557
+ * data buffer passed during configuration.
558
+ * Note: In case, \brief cuptiPCSamplingGetData() API is not called periodically, then sampling data buffer
559
+ * passed during configuration should be large enough to hold all PCs data.
560
+ * \brief cuptiPCSamplingGetData() API never does device synchronization.
561
+ * It is possible that when the API is called there is some unconsumed data from the HW buffer. In this case
562
+ * CUPTI provides only the data available with it at that moment.
563
+ *
564
+ * \param Refer \ref CUpti_PCSamplingGetDataParams
565
+ *
566
+ * \retval CUPTI_SUCCESS
567
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called without
568
+ * enabling PC sampling.
569
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
570
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
571
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY indicates that the HW buffer is full
572
+ * does not support the API
573
+ */
574
+ CUptiResult CUPTIAPI cuptiPCSamplingGetData(CUpti_PCSamplingGetDataParams *pParams);
575
+
576
+ /**
577
+ * \brief Params for cuptiPCSamplingEnable
578
+ */
579
+ typedef struct
580
+ {
581
+ /**
582
+ * [w] Size of the data structure i.e. CUpti_PCSamplingEnableParamsSize
583
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
584
+ * available in the structure. Used to preserve backward compatibility.
585
+ */
586
+ size_t size;
587
+ /**
588
+ * [w] Assign to NULL
589
+ */
590
+ void* pPriv;
591
+ /**
592
+ * [w] CUcontext
593
+ */
594
+ CUcontext ctx;
595
+ } CUpti_PCSamplingEnableParams;
596
+ #define CUpti_PCSamplingEnableParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingEnableParams, ctx)
597
+
598
+ /**
599
+ * \brief Enable PC sampling.
600
+ *
601
+ * \param Refer \ref CUpti_PCSamplingEnableParams
602
+ *
603
+ * \retval CUPTI_SUCCESS
604
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
605
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
606
+ * does not support the API
607
+ */
608
+ CUptiResult CUPTIAPI cuptiPCSamplingEnable(CUpti_PCSamplingEnableParams *pParams);
609
+
610
+ /**
611
+ * \brief Params for cuptiPCSamplingDisable
612
+ */
613
+ typedef struct
614
+ {
615
+ /**
616
+ * [w] Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
617
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
618
+ * available in the structure. Used to preserve backward compatibility.
619
+ */
620
+ size_t size;
621
+ /**
622
+ * [w] Assign to NULL
623
+ */
624
+ void* pPriv;
625
+ /**
626
+ * [w] CUcontext
627
+ */
628
+ CUcontext ctx;
629
+ } CUpti_PCSamplingDisableParams;
630
+ #define CUpti_PCSamplingDisableParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingDisableParams, ctx)
631
+
632
+ /**
633
+ * \brief Disable PC sampling.
634
+ *
635
+ * For application which doesn't destroy the CUDA context explicitly,
636
+ * this API does the PC Sampling tear-down, joins threads and copies PC records in the buffer provided
637
+ * during the PC sampling configuration. PC records which can't be accommodated in the buffer are discarded.
638
+ *
639
+ * \param Refer \ref CUpti_PCSamplingDisableParams
640
+ *
641
+ * \retval CUPTI_SUCCESS
642
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
643
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
644
+ * does not support the API
645
+ */
646
+ CUptiResult CUPTIAPI cuptiPCSamplingDisable(CUpti_PCSamplingDisableParams *pParams);
647
+
648
+ /**
649
+ * \brief Params for cuptiPCSamplingStart
650
+ */
651
+ typedef struct
652
+ {
653
+ /**
654
+ * [w] Size of the data structure i.e. CUpti_PCSamplingStartParamsSize
655
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
656
+ * available in the structure. Used to preserve backward compatibility.
657
+ */
658
+ size_t size;
659
+ /**
660
+ * [w] Assign to NULL
661
+ */
662
+ void* pPriv;
663
+ /**
664
+ * [w] CUcontext
665
+ */
666
+ CUcontext ctx;
667
+ } CUpti_PCSamplingStartParams;
668
+ #define CUpti_PCSamplingStartParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingStartParams, ctx)
669
+
670
+ /**
671
+ * \brief Start PC sampling.
672
+ *
673
+ * User can collect PC Sampling data for user-defined range specified by Start/Stop APIs.
674
+ * This API can be used to mark starting of range. Set configuration option
675
+ * \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL to use this API.
676
+ *
677
+ * \param Refer \ref CUpti_PCSamplingStartParams
678
+ *
679
+ * \retval CUPTI_SUCCESS
680
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called with
681
+ * incorrect PC Sampling configuration.
682
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
683
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
684
+ * does not support the API
685
+ */
686
+ CUptiResult CUPTIAPI cuptiPCSamplingStart(CUpti_PCSamplingStartParams *pParams);
687
+
688
+ /**
689
+ * \brief Params for cuptiPCSamplingStop
690
+ */
691
+ typedef struct
692
+ {
693
+ /**
694
+ * [w] Size of the data structure i.e. CUpti_PCSamplingStopParamsSize
695
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
696
+ * available in the structure. Used to preserve backward compatibility.
697
+ */
698
+ size_t size;
699
+ /**
700
+ * [w] Assign to NULL
701
+ */
702
+ void* pPriv;
703
+ /**
704
+ * [w] CUcontext
705
+ */
706
+ CUcontext ctx;
707
+ } CUpti_PCSamplingStopParams;
708
+ #define CUpti_PCSamplingStopParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingStopParams, ctx)
709
+
710
+ /**
711
+ * \brief Stop PC sampling.
712
+ *
713
+ * User can collect PC Sampling data for user-defined range specified by Start/Stop APIs.
714
+ * This API can be used to mark end of range. Set configuration option
715
+ * \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL to use this API.
716
+ *
717
+ * \param Refer \ref CUpti_PCSamplingStopParams
718
+ *
719
+ * \retval CUPTI_SUCCESS
720
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called with
721
+ * incorrect PC Sampling configuration.
722
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
723
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
724
+ * does not support the API
725
+ */
726
+ CUptiResult CUPTIAPI cuptiPCSamplingStop(CUpti_PCSamplingStopParams *pParams);
727
+
728
+ /**
729
+ * \brief Params for cuptiPCSamplingGetNumStallReasons
730
+ */
731
+ typedef struct
732
+ {
733
+ /**
734
+ * [w] Size of the data structure i.e. CUpti_PCSamplingGetNumStallReasonsParamsSize
735
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
736
+ * available in the structure. Used to preserve backward compatibility.
737
+ */
738
+ size_t size;
739
+ /**
740
+ * [w] Assign to NULL
741
+ */
742
+ void* pPriv;
743
+ /**
744
+ * [w] CUcontext
745
+ */
746
+ CUcontext ctx;
747
+ /**
748
+ * [r] Number of stall reasons
749
+ */
750
+ size_t *numStallReasons;
751
+ } CUpti_PCSamplingGetNumStallReasonsParams;
752
+ #define CUpti_PCSamplingGetNumStallReasonsParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingGetNumStallReasonsParams, numStallReasons)
753
+
754
+ /**
755
+ * \brief Get PC sampling stall reason count.
756
+ *
757
+ * \param Refer \ref CUpti_PCSamplingGetNumStallReasonsParams
758
+ *
759
+ * \retval CUPTI_SUCCESS
760
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
761
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
762
+ * does not support the API
763
+ */
764
+ CUptiResult CUPTIAPI cuptiPCSamplingGetNumStallReasons(CUpti_PCSamplingGetNumStallReasonsParams *pParams);
765
+
766
+ /**
767
+ * \brief Params for cuptiPCSamplingGetStallReasons
768
+ */
769
+ typedef struct
770
+ {
771
+ /**
772
+ * [w] Size of the data structure i.e. CUpti_PCSamplingGetStallReasonsParamsSize
773
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
774
+ * available in the structure. Used to preserve backward compatibility.
775
+ */
776
+ size_t size;
777
+ /**
778
+ * [w] Assign to NULL
779
+ */
780
+ void* pPriv;
781
+ /**
782
+ * [w] CUcontext
783
+ */
784
+ CUcontext ctx;
785
+ /**
786
+ * [w] Number of stall reasons
787
+ */
788
+ size_t numStallReasons;
789
+ /**
790
+ * [r] Stall reason index
791
+ */
792
+ uint32_t *stallReasonIndex;
793
+ /**
794
+ * [r] Stall reasons name
795
+ */
796
+ char **stallReasons;
797
+ } CUpti_PCSamplingGetStallReasonsParams;
798
+ #define CUpti_PCSamplingGetStallReasonsParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingGetStallReasonsParams, stallReasons)
799
+
800
+ /**
801
+ * \brief Get PC sampling stall reasons.
802
+ *
803
+ * \param Refer \ref CUpti_PCSamplingGetStallReasonsParams
804
+ *
805
+ * \retval CUPTI_SUCCESS
806
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
807
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
808
+ * does not support the API
809
+ */
810
+ CUptiResult CUPTIAPI cuptiPCSamplingGetStallReasons(CUpti_PCSamplingGetStallReasonsParams *pParams);
811
+
812
+ /**
813
+ * \brief Params for cuptiGetSassToSourceCorrelation
814
+ */
815
+ typedef struct {
816
+ /**
817
+ * [w] Size of the data structure i.e. CUpti_GetSassToSourceCorrelationParamsSize
818
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
819
+ * available in the structure. Used to preserve backward compatibility.
820
+ */
821
+ size_t size;
822
+ /**
823
+ * [w] Pointer to cubin binary where function belongs.
824
+ */
825
+ const void* cubin;
826
+ /**
827
+ * [w] Function name to which PC belongs.
828
+ */
829
+ const char *functionName;
830
+ /**
831
+ * [w] Size of cubin binary.
832
+ */
833
+ size_t cubinSize;
834
+ /**
835
+ * [r] Line number in the source code.
836
+ */
837
+ uint32_t lineNumber;
838
+ /**
839
+ * [w] PC offset
840
+ */
841
+ uint64_t pcOffset;
842
+ /**
843
+ * [r] Path for the source file.
844
+ */
845
+ char *fileName;
846
+ /**
847
+ * [r] Path for the directory of source file.
848
+ */
849
+ char *dirName;
850
+ } CUpti_GetSassToSourceCorrelationParams;
851
+ #define CUpti_GetSassToSourceCorrelationParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_GetSassToSourceCorrelationParams, dirName)
852
+
853
+ /**
854
+ * \brief SASS to Source correlation.
855
+ *
856
+ * \param Refer \ref CUpti_GetSassToSourceCorrelationParams
857
+ *
858
+ * It is expected from user to free allocated memory for fileName and dirName after use.
859
+ *
860
+ * \retval CUPTI_SUCCESS
861
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if either of the parameters cubin or functionName
862
+ * is NULL or cubinSize is zero or size field is not set correctly.
863
+ * \retval CUPTI_ERROR_INVALID_MODULE provided cubin is invalid.
864
+ * \retval CUPTI_ERROR_UNKNOWN an internal error occurred.
865
+ * This error code is also used for cases when the function is not present in the module.
866
+ * A better error code will be returned in the future release.
867
+ */
868
+ CUptiResult CUPTIAPI cuptiGetSassToSourceCorrelation(CUpti_GetSassToSourceCorrelationParams *pParams);
869
+
870
+ /**
871
+ * \brief Params for cuptiGetCubinCrc
872
+ */
873
+ typedef struct {
874
+ /**
875
+ * [w] Size of configuration structure.
876
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
877
+ * available in the structure. Used to preserve backward compatibility.
878
+ */
879
+ size_t size;
880
+ /**
881
+ * [w] Size of cubin binary.
882
+ */
883
+ size_t cubinSize;
884
+ /**
885
+ * [w] Pointer to cubin binary
886
+ */
887
+ const void* cubin;
888
+ /**
889
+ * [r] Computed CRC will be stored in it.
890
+ */
891
+ uint64_t cubinCrc;
892
+ } CUpti_GetCubinCrcParams;
893
+ #define CUpti_GetCubinCrcParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_GetCubinCrcParams, cubinCrc)
894
+
895
+ /**
896
+ * \brief Get the CRC of cubin.
897
+ *
898
+ * This function returns the CRC of provided cubin binary.
899
+ *
900
+ * \param Refer \ref CUpti_GetCubinCrcParams
901
+ *
902
+ * \retval CUPTI_SUCCESS
903
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if parameter cubin is NULL or
904
+ * provided cubinSize is zero or size field is not set.
905
+ */
906
+ CUptiResult CUPTIAPI cuptiGetCubinCrc(CUpti_GetCubinCrcParams *pParams);
907
+
908
+ /**
909
+ * \brief Function type for callback used by CUPTI to request crc of
910
+ * loaded module.
911
+ *
912
+ * This callback function ask for crc of provided module in function.
913
+ * The provided crc will be stored in PC sampling records i.e. in the field 'cubinCrc' of the PC sampling
914
+ * struct CUpti_PCSamplingPCData. The CRC is uses during the offline source correlation to uniquely identify the module.
915
+ *
916
+ * \param cubin The pointer to cubin binary
917
+ * \param cubinSize The size of cubin binary.
918
+ * \param cubinCrc Returns the computed crc of cubin.
919
+ */
920
+ typedef void (CUPTIAPI *CUpti_ComputeCrcCallbackFunc)(
921
+ const void* cubin,
922
+ size_t cubinSize,
923
+ uint64_t *cubinCrc);
924
+
925
+ /**
926
+ * \brief Register callback function with CUPTI to use
927
+ * your own algorithm to compute cubin crc.
928
+ *
929
+ * This function registers a callback function and it gets called
930
+ * from CUPTI when a CUDA module is loaded.
931
+ *
932
+ * \param funcComputeCubinCrc callback is invoked when a CUDA module
933
+ * is loaded.
934
+ *
935
+ * \retval CUPTI_SUCCESS
936
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p funcComputeCubinCrc is NULL.
937
+ */
938
+ CUptiResult CUPTIAPI cuptiRegisterComputeCrcCallback(CUpti_ComputeCrcCallbackFunc funcComputeCubinCrc);
939
+
940
+ /** @} */ /* END CUPTI_PCSAMPLING_API */
941
+
942
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
943
+ #pragma GCC visibility pop
944
+ #endif
945
+
946
+ #if defined(__cplusplus)
947
+ }
948
+ #endif
949
+
950
+ #endif /*_CUPTI_PCSAMPLING_H_*/
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pcsampling_util.h ADDED
@@ -0,0 +1,419 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #if !defined(_CUPTI_PCSAMPLING_UTIL_H_)
2
+ #define _CUPTI_PCSAMPLING_UTIL_H_
3
+
4
+ #include <cupti_pcsampling.h>
5
+ #include <fstream>
6
+
7
+ #ifndef CUPTIUTILAPI
8
+ #ifdef _WIN32
9
+ #define CUPTIUTILAPI __stdcall
10
+ #else
11
+ #define CUPTIUTILAPI
12
+ #endif
13
+ #endif
14
+
15
+ #define ACTIVITY_RECORD_ALIGNMENT 8
16
+ #if defined(_WIN32) // Windows 32- and 64-bit
17
+ #define START_PACKED_ALIGNMENT __pragma(pack(push,1)) // exact fit - no padding
18
+ #define PACKED_ALIGNMENT __declspec(align(ACTIVITY_RECORD_ALIGNMENT))
19
+ #define END_PACKED_ALIGNMENT __pragma(pack(pop))
20
+ #elif defined(__GNUC__) // GCC
21
+ #define START_PACKED_ALIGNMENT
22
+ #define PACKED_ALIGNMENT __attribute__ ((__packed__)) __attribute__ ((aligned (ACTIVITY_RECORD_ALIGNMENT)))
23
+ #define END_PACKED_ALIGNMENT
24
+ #else // all other compilers
25
+ #define START_PACKED_ALIGNMENT
26
+ #define PACKED_ALIGNMENT
27
+ #define END_PACKED_ALIGNMENT
28
+ #endif
29
+
30
+ #ifndef CUPTI_UTIL_STRUCT_SIZE
31
+ #define CUPTI_UTIL_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
32
+ #endif
33
+
34
+ #ifndef CHECK_PC_SAMPLING_STRUCT_FIELD_EXISTS
35
+ #define CHECK_PC_SAMPLING_STRUCT_FIELD_EXISTS(type, member, structSize) \
36
+ (offsetof(type, member) < structSize)
37
+ #endif
38
+
39
+ #if defined(__cplusplus)
40
+ extern "C" {
41
+ #endif
42
+
43
+ #if defined(__GNUC__)
44
+ #pragma GCC visibility push(default)
45
+ #endif
46
+
47
+ namespace CUPTI { namespace PcSamplingUtil {
48
+
49
+ /**
50
+ * \defgroup CUPTI_PCSAMPLING_UTILITY CUPTI PC Sampling Utility API
51
+ * Functions, types, and enums that implement the CUPTI PC Sampling Utility API.
52
+ * @{
53
+ */
54
+
55
+ /**
56
+ * \brief Header info will be stored in file.
57
+ */
58
+ typedef struct PACKED_ALIGNMENT {
59
+ /**
60
+ * Version of file format.
61
+ */
62
+ uint32_t version;
63
+ /**
64
+ * Total number of buffers present in the file.
65
+ */
66
+ uint32_t totalBuffers;
67
+ } Header;
68
+
69
+ /**
70
+ * \brief BufferInfo will be stored in the file for every buffer
71
+ * i.e for every call of UtilDumpPcSamplingBufferInFile() API.
72
+ */
73
+ typedef struct PACKED_ALIGNMENT {
74
+ /**
75
+ * Total number of PC records.
76
+ */
77
+ uint64_t recordCount;
78
+ /**
79
+ * Count of all stall reasons supported on the GPU
80
+ */
81
+ size_t numStallReasons;
82
+ /**
83
+ * Total number of stall reasons in single record.
84
+ */
85
+ uint64_t numSelectedStallReasons;
86
+ /**
87
+ * Buffer size in Bytes.
88
+ */
89
+ uint64_t bufferByteSize;
90
+ } BufferInfo;
91
+
92
+ /**
93
+ * \brief All available stall reasons name and respective indexes
94
+ * will be stored in it.
95
+ */
96
+ typedef struct PACKED_ALIGNMENT {
97
+ /**
98
+ * Number of all available stall reasons
99
+ */
100
+ size_t numStallReasons;
101
+ /**
102
+ * Stall reasons names of all available stall reasons
103
+ */
104
+ char **stallReasons;
105
+ /**
106
+ * Stall reason index of all available stall reasons
107
+ */
108
+ uint32_t *stallReasonIndex;
109
+ } PcSamplingStallReasons;
110
+
111
+ typedef enum {
112
+ /**
113
+ * Invalid buffer type.
114
+ */
115
+ PC_SAMPLING_BUFFER_INVALID = 0,
116
+ /**
117
+ * Refers to CUpti_PCSamplingData buffer.
118
+ */
119
+ PC_SAMPLING_BUFFER_PC_TO_COUNTER_DATA = 1
120
+ } PcSamplingBufferType;
121
+
122
+ /**
123
+ * \brief CUPTI PC sampling utility API result codes.
124
+ *
125
+ * Error and result codes returned by CUPTI PC sampling utility API.
126
+ */
127
+ typedef enum {
128
+ /**
129
+ * No error
130
+ */
131
+ CUPTI_UTIL_SUCCESS = 0,
132
+ /**
133
+ * One or more of the parameters are invalid.
134
+ */
135
+ CUPTI_UTIL_ERROR_INVALID_PARAMETER = 1,
136
+ /**
137
+ * Unable to create a new file
138
+ */
139
+ CUPTI_UTIL_ERROR_UNABLE_TO_CREATE_FILE = 2,
140
+ /**
141
+ * Unable to open a file
142
+ */
143
+ CUPTI_UTIL_ERROR_UNABLE_TO_OPEN_FILE = 3,
144
+ /**
145
+ * Read or write operation failed
146
+ */
147
+ CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED = 4,
148
+ /**
149
+ * Provided file handle is corrupted.
150
+ */
151
+ CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED = 5,
152
+ /**
153
+ * seek operation failed.
154
+ */
155
+ CUPTI_UTIL_ERROR_SEEK_OPERATION_FAILED = 6,
156
+ /**
157
+ * Unable to allocate enough memory to perform the requested
158
+ * operation.
159
+ */
160
+ CUPTI_UTIL_ERROR_OUT_OF_MEMORY = 7,
161
+ /**
162
+ * An unknown internal error has occurred.
163
+ */
164
+ CUPTI_UTIL_ERROR_UNKNOWN = 999,
165
+ CUPTI_UTIL_ERROR_FORCE_INT = 0x7fffffff
166
+ } CUptiUtilResult;
167
+
168
+ /**
169
+ * \brief Params for \ref CuptiUtilPutPcSampData
170
+ */
171
+ typedef struct {
172
+ /**
173
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
174
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
175
+ * available in the structure. Used to preserve backward compatibility.
176
+ */
177
+ size_t size;
178
+ /**
179
+ * Type of buffer to store in file
180
+ */
181
+ PcSamplingBufferType bufferType;
182
+ /**
183
+ * PC sampling buffer.
184
+ */
185
+ void *pSamplingData;
186
+ /**
187
+ * Number of configured attributes
188
+ */
189
+ size_t numAttributes;
190
+ /**
191
+ * Refer \ref CUpti_PCSamplingConfigurationInfo
192
+ * It is expected to provide configuration details of at least
193
+ * CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_STALL_REASON attribute.
194
+ */
195
+ CUpti_PCSamplingConfigurationInfo *pPCSamplingConfigurationInfo;
196
+ /**
197
+ * Refer \ref PcSamplingStallReasons.
198
+ */
199
+ PcSamplingStallReasons *pPcSamplingStallReasons;
200
+ /**
201
+ * File name to store buffer into it.
202
+ */
203
+ const char* fileName;
204
+ } CUptiUtil_PutPcSampDataParams;
205
+ #define CUptiUtil_PutPcSampDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_PutPcSampDataParams, fileName)
206
+
207
+ /**
208
+ * \brief Dump PC sampling data into the file.
209
+ *
210
+ * This API can be called multiple times.
211
+ * It will append buffer in the file.
212
+ * For every buffer it will store BufferInfo
213
+ * so that before retrieving data it will help to allocate buffer
214
+ * to store retrieved data.
215
+ * This API creates file if file does not present.
216
+ * If stallReasonIndex or stallReasons pointer of \ref CUptiUtil_PutPcSampDataParams is NULL
217
+ * then stall reasons data will not be stored in file.
218
+ * It is expected to store all available stall reason data at least once to refer it during
219
+ * offline correlation.
220
+ *
221
+ * \retval CUPTI_UTIL_SUCCESS
222
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if buffer type is invalid
223
+ * or if either of pSamplingData, pParams pointer is NULL or stall reason configuration details not provided
224
+ * or filename is empty.
225
+ * \retval CUPTI_UTIL_ERROR_UNABLE_TO_CREATE_FILE
226
+ * \retval CUPTI_UTIL_ERROR_UNABLE_TO_OPEN_FILE
227
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED
228
+ */
229
+ CUptiUtilResult CUPTIUTILAPI CuptiUtilPutPcSampData(CUptiUtil_PutPcSampDataParams *pParams);
230
+
231
+ /**
232
+ * \brief Params for \ref CuptiUtilGetHeaderData
233
+ */
234
+ typedef struct {
235
+ /**
236
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
237
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
238
+ * available in the structure. Used to preserve backward compatibility.
239
+ */
240
+ size_t size;
241
+ /**
242
+ * File handle.
243
+ */
244
+ std::ifstream *fileHandler;
245
+ /**
246
+ * Header Info.
247
+ */
248
+ Header headerInfo;
249
+
250
+ } CUptiUtil_GetHeaderDataParams;
251
+ #define CUptiUtil_GetHeaderDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_GetHeaderDataParams, headerInfo)
252
+
253
+ /**
254
+ * \brief Get header data of file.
255
+ *
256
+ * This API must be called once initially while retrieving data from file.
257
+ * \ref Header structure, it gives info about total number
258
+ * of buffers present in the file.
259
+ *
260
+ * \retval CUPTI_UTIL_SUCCESS
261
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if either of pParam or fileHandle is NULL or param struct size is incorrect.
262
+ * \retval CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED file handle is not in good state to read data from file
263
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED failed to read data from file.
264
+ */
265
+ CUptiUtilResult CUPTIUTILAPI CuptiUtilGetHeaderData(CUptiUtil_GetHeaderDataParams *pParams);
266
+
267
+ /**
268
+ * \brief Params for \ref CuptiUtilGetBufferInfo
269
+ */
270
+ typedef struct {
271
+ /**
272
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
273
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
274
+ * available in the structure. Used to preserve backward compatibility.
275
+ */
276
+ size_t size;
277
+ /**
278
+ * File handle.
279
+ */
280
+ std::ifstream *fileHandler;
281
+ /**
282
+ * Buffer Info.
283
+ */
284
+ BufferInfo bufferInfoData;
285
+ } CUptiUtil_GetBufferInfoParams;
286
+ #define CUptiUtil_GetBufferInfoParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_GetBufferInfoParams, bufferInfoData)
287
+
288
+ /**
289
+ * \brief Get buffer info data of file.
290
+ *
291
+ * This API must be called every time before calling CuptiUtilGetPcSampData API.
292
+ * \ref BufferInfo structure, it gives info about recordCount and stallReasonCount
293
+ * of every record in the buffer. This will help to allocate exact buffer to retrieve data into it.
294
+ *
295
+ * \retval CUPTI_UTIL_SUCCESS
296
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if either of pParam or fileHandle is NULL or param struct size is incorrect.
297
+ * \retval CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED file handle is not in good state to read data from file.
298
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED failed to read data from file.
299
+ */
300
+ CUptiUtilResult CUPTIUTILAPI CuptiUtilGetBufferInfo(CUptiUtil_GetBufferInfoParams *pParams);
301
+
302
+ /**
303
+ * \brief Params for \ref CuptiUtilGetPcSampData
304
+ */
305
+ typedef struct {
306
+ /**
307
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
308
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
309
+ * available in the structure. Used to preserve backward compatibility.
310
+ */
311
+ size_t size;
312
+ /**
313
+ * File handle.
314
+ */
315
+ std::ifstream *fileHandler;
316
+ /**
317
+ * Type of buffer to store in file
318
+ */
319
+ PcSamplingBufferType bufferType;
320
+ /**
321
+ * Pointer to collected buffer info using \ref CuptiUtilGetBufferInfo
322
+ */
323
+ BufferInfo *pBufferInfoData;
324
+ /**
325
+ * Pointer to allocated memory to store retrieved data from file.
326
+ */
327
+ void *pSamplingData;
328
+ /**
329
+ * Number of configuration attributes
330
+ */
331
+ size_t numAttributes;
332
+ /**
333
+ * Refer \ref CUpti_PCSamplingConfigurationInfo
334
+ */
335
+ CUpti_PCSamplingConfigurationInfo *pPCSamplingConfigurationInfo;
336
+ /**
337
+ * Refer \ref PcSamplingStallReasons.
338
+ * For stallReasons field of \ref PcSamplingStallReasons it is expected to
339
+ * allocate memory for each string element of array.
340
+ */
341
+ PcSamplingStallReasons *pPcSamplingStallReasons;
342
+ } CUptiUtil_GetPcSampDataParams;
343
+ #define CUptiUtil_GetPcSampDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_GetPcSampDataParams, pPcSamplingStallReasons)
344
+
345
+ /**
346
+ * \brief Retrieve PC sampling data from file into allocated buffer.
347
+ *
348
+ * This API must be called after CuptiUtilGetBufferInfo API.
349
+ * It will retrieve data from file into allocated buffer.
350
+ *
351
+ * \retval CUPTI_UTIL_SUCCESS
352
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if buffer type is invalid
353
+ * or if either of pSampData, pParams is NULL. If pPcSamplingStallReasons is not NULL then
354
+ * error out if either of stallReasonIndex, stallReasons or stallReasons array element pointer is NULL.
355
+ * or filename is empty.
356
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED
357
+ * \retval CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED file handle is not in good state to read data from file.
358
+ */
359
+ CUptiUtilResult CUPTIUTILAPI CuptiUtilGetPcSampData(CUptiUtil_GetPcSampDataParams *pParams);
360
+
361
+ /**
362
+ * \brief Params for \ref CuptiUtilMergePcSampData
363
+ */
364
+ typedef struct
365
+ {
366
+ /**
367
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
368
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
369
+ * available in the structure. Used to preserve backward compatibility.
370
+ */
371
+ size_t size;
372
+ /**
373
+ * Number of buffers to merge.
374
+ */
375
+ size_t numberOfBuffers;
376
+ /**
377
+ * Pointer to array of buffers to merge
378
+ */
379
+ CUpti_PCSamplingData *PcSampDataBuffer;
380
+ /**
381
+ * Pointer to array of merged buffers as per the range id.
382
+ */
383
+ CUpti_PCSamplingData **MergedPcSampDataBuffers;
384
+ /**
385
+ * Number of merged buffers.
386
+ */
387
+ size_t *numMergedBuffer;
388
+ } CUptiUtil_MergePcSampDataParams;
389
+ #define CUptiUtil_MergePcSampDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_MergePcSampDataParams, numMergedBuffer)
390
+
391
+ /**
392
+ * \brief Merge PC sampling data range id wise.
393
+ *
394
+ * This API merge PC sampling data range id wise.
395
+ * It allocates memory for merged data and fill data in it
396
+ * and provide buffer pointer in MergedPcSampDataBuffers field.
397
+ * It is expected from user to free merge data buffers after use.
398
+ *
399
+ * \retval CUPTI_UTIL_SUCCESS
400
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if param struct size is invalid
401
+ * or count of buffers to merge is invalid i.e less than 1
402
+ * or either of PcSampDataBuffer, MergedPcSampDataBuffers, numMergedBuffer is NULL
403
+ * \retval CUPTI_UTIL_ERROR_OUT_OF_MEMORY Unable to allocate memory for merged buffer.
404
+ */
405
+ CUptiUtilResult CUPTIUTILAPI CuptiUtilMergePcSampData(CUptiUtil_MergePcSampDataParams *pParams);
406
+
407
+ /** @} */ /* END CUPTI_PCSAMPLING_UTILITY */
408
+
409
+ } }
410
+
411
+ #if defined(__GNUC__)
412
+ #pragma GCC visibility pop
413
+ #endif
414
+
415
+ #if defined(__cplusplus)
416
+ }
417
+ #endif
418
+
419
+ #endif
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_profiler_target.h ADDED
@@ -0,0 +1,589 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2011-2020 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 cuptiProfilerCounterDataImageCalculateSize(CUpti_Profiler_CounterDataImage_CalculateSize_Params* pParams);
220
+ CUptiResult 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 cuptiProfilerCounterDataImageCalculateScratchBufferSize(CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params* pParams);
257
+ CUptiResult 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 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 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 Params for cuptiProfilerDeviceSupported
554
+ */
555
+ typedef struct
556
+ {
557
+ size_t structSize; //!< [in] Must be CUpti_Profiler_DeviceSupported_Params_STRUCT_SIZE
558
+ void *pPriv; //!< [in] assign to NULL
559
+ CUdevice cuDevice; //!< [in] if NULL, the current CUcontext is used
560
+
561
+ 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.
562
+
563
+ CUpti_Profiler_Support_Level architecture; //!< [out] SUPPORTED if the device architecture level supports the Profiling API (Compute Capability >= 7.0), UNSUPPORTED otherwise
564
+ CUpti_Profiler_Support_Level sli; //!< [out] SUPPORTED if SLI is not enabled, UNSUPPORTED otherwise
565
+ 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
566
+ CUpti_Profiler_Support_Level confidentialCompute; //!< [out] SUPPORTED if confidential compute is not enabled, UNSUPPORTED otherwise
567
+ CUpti_Profiler_Support_Level cmp; //!< [out] SUPPORTED if not NVIDIA Crypto Mining Processors (CMP), UNSUPPORTED otherwise
568
+ CUpti_Profiler_Support_Level wsl; //!< [out] SUPPORTED if WSL supported, UNSUPPORTED otherwise
569
+ } CUpti_Profiler_DeviceSupported_Params;
570
+ #define CUpti_Profiler_DeviceSupported_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_DeviceSupported_Params, confidentialCompute)
571
+
572
+ /**
573
+ * \brief Query device compatibility with Profiling API
574
+ *
575
+ * Use this call to determine whether a compute device and configuration are compatible with the Profiling API.
576
+ * If the configuration does not support profiling, one of several flags will indicate why.
577
+ */
578
+ CUptiResult CUPTIAPI cuptiProfilerDeviceSupported(CUpti_Profiler_DeviceSupported_Params *pParams);
579
+
580
+ /** @} */ /* END CUPTI_METRIC_API */
581
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
582
+ #pragma GCC visibility pop
583
+ #endif
584
+
585
+ #ifdef __cplusplus
586
+ } /* extern "C" */
587
+ #endif
588
+
589
+ #endif /*_CUPTI_PROFILER_TARGET_H_*/
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_result.h ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2010-2021 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 API will be deprecated in a future CUDA release. These are replaced by
268
+ * Profiling API in the header cupti_profiler_target.h and Perfworks metrics API
269
+ * in the headers nvperf_host.h and nvperf_target.h.
270
+ */
271
+ CUPTI_ERROR_LEGACY_PROFILER_NOT_SUPPORTED = 38,
272
+ /**
273
+ * CUPTI doesn't allow multiple callback subscribers. Only a single subscriber
274
+ * can be registered at a time.
275
+ * Same error code is used when application is launched using NVIDIA tools
276
+ * like nvprof, Visual Profiler, Nsight Systems, Nsight Compute, cuda-gdb and
277
+ * cuda-memcheck.
278
+ */
279
+ CUPTI_ERROR_MULTIPLE_SUBSCRIBERS_NOT_SUPPORTED = 39,
280
+ /**
281
+ * Profiling on virtualized GPU is not allowed by hypervisor.
282
+ */
283
+ CUPTI_ERROR_VIRTUALIZED_DEVICE_INSUFFICIENT_PRIVILEGES = 40,
284
+ /**
285
+ * Profiling and tracing are not allowed when confidential computing mode
286
+ * is enabled.
287
+ */
288
+ CUPTI_ERROR_CONFIDENTIAL_COMPUTING_NOT_SUPPORTED = 41,
289
+ /**
290
+ * CUPTI does not support NVIDIA Crypto Mining Processors (CMP).
291
+ * For more information, please visit https://developer.nvidia.com/ERR_NVCMPGPU
292
+ */
293
+ CUPTI_ERROR_CMP_DEVICE_NOT_SUPPORTED = 42,
294
+ /**
295
+ * An unknown internal error has occurred.
296
+ */
297
+ CUPTI_ERROR_UNKNOWN = 999,
298
+ CUPTI_ERROR_FORCE_INT = 0x7fffffff
299
+ } CUptiResult;
300
+
301
+ /**
302
+ * \brief Get the descriptive string for a CUptiResult.
303
+ *
304
+ * Return the descriptive string for a CUptiResult in \p *str.
305
+ * \note \b Thread-safety: this function is thread safe.
306
+ *
307
+ * \param result The result to get the string for
308
+ * \param str Returns the string
309
+ *
310
+ * \retval CUPTI_SUCCESS on success
311
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p str is NULL or \p
312
+ * result is not a valid CUptiResult
313
+ */
314
+ CUptiResult CUPTIAPI cuptiGetResultString(CUptiResult result, const char **str);
315
+
316
+ /** @} */ /* END CUPTI_RESULT_API */
317
+
318
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
319
+ #pragma GCC visibility pop
320
+ #endif
321
+
322
+ #if defined(__cplusplus)
323
+ }
324
+ #endif
325
+
326
+ #endif /*_CUPTI_RESULT_H_*/
327
+
328
+
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_runtime_cbid.h ADDED
@@ -0,0 +1,458 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ typedef enum CUpti_runtime_api_trace_cbid_enum {
10
+ CUPTI_RUNTIME_TRACE_CBID_INVALID = 0,
11
+ CUPTI_RUNTIME_TRACE_CBID_cudaDriverGetVersion_v3020 = 1,
12
+ CUPTI_RUNTIME_TRACE_CBID_cudaRuntimeGetVersion_v3020 = 2,
13
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDeviceCount_v3020 = 3,
14
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDeviceProperties_v3020 = 4,
15
+ CUPTI_RUNTIME_TRACE_CBID_cudaChooseDevice_v3020 = 5,
16
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetChannelDesc_v3020 = 6,
17
+ CUPTI_RUNTIME_TRACE_CBID_cudaCreateChannelDesc_v3020 = 7,
18
+ CUPTI_RUNTIME_TRACE_CBID_cudaConfigureCall_v3020 = 8,
19
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetupArgument_v3020 = 9,
20
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetLastError_v3020 = 10,
21
+ CUPTI_RUNTIME_TRACE_CBID_cudaPeekAtLastError_v3020 = 11,
22
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetErrorString_v3020 = 12,
23
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunch_v3020 = 13,
24
+ CUPTI_RUNTIME_TRACE_CBID_cudaFuncSetCacheConfig_v3020 = 14,
25
+ CUPTI_RUNTIME_TRACE_CBID_cudaFuncGetAttributes_v3020 = 15,
26
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetDevice_v3020 = 16,
27
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDevice_v3020 = 17,
28
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetValidDevices_v3020 = 18,
29
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetDeviceFlags_v3020 = 19,
30
+ CUPTI_RUNTIME_TRACE_CBID_cudaMalloc_v3020 = 20,
31
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocPitch_v3020 = 21,
32
+ CUPTI_RUNTIME_TRACE_CBID_cudaFree_v3020 = 22,
33
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocArray_v3020 = 23,
34
+ CUPTI_RUNTIME_TRACE_CBID_cudaFreeArray_v3020 = 24,
35
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocHost_v3020 = 25,
36
+ CUPTI_RUNTIME_TRACE_CBID_cudaFreeHost_v3020 = 26,
37
+ CUPTI_RUNTIME_TRACE_CBID_cudaHostAlloc_v3020 = 27,
38
+ CUPTI_RUNTIME_TRACE_CBID_cudaHostGetDevicePointer_v3020 = 28,
39
+ CUPTI_RUNTIME_TRACE_CBID_cudaHostGetFlags_v3020 = 29,
40
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemGetInfo_v3020 = 30,
41
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy_v3020 = 31,
42
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2D_v3020 = 32,
43
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToArray_v3020 = 33,
44
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DToArray_v3020 = 34,
45
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromArray_v3020 = 35,
46
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DFromArray_v3020 = 36,
47
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyArrayToArray_v3020 = 37,
48
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DArrayToArray_v3020 = 38,
49
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToSymbol_v3020 = 39,
50
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromSymbol_v3020 = 40,
51
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyAsync_v3020 = 41,
52
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToArrayAsync_v3020 = 42,
53
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromArrayAsync_v3020 = 43,
54
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DAsync_v3020 = 44,
55
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DToArrayAsync_v3020 = 45,
56
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DFromArrayAsync_v3020 = 46,
57
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToSymbolAsync_v3020 = 47,
58
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromSymbolAsync_v3020 = 48,
59
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset_v3020 = 49,
60
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset2D_v3020 = 50,
61
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemsetAsync_v3020 = 51,
62
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset2DAsync_v3020 = 52,
63
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetSymbolAddress_v3020 = 53,
64
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetSymbolSize_v3020 = 54,
65
+ CUPTI_RUNTIME_TRACE_CBID_cudaBindTexture_v3020 = 55,
66
+ CUPTI_RUNTIME_TRACE_CBID_cudaBindTexture2D_v3020 = 56,
67
+ CUPTI_RUNTIME_TRACE_CBID_cudaBindTextureToArray_v3020 = 57,
68
+ CUPTI_RUNTIME_TRACE_CBID_cudaUnbindTexture_v3020 = 58,
69
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureAlignmentOffset_v3020 = 59,
70
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureReference_v3020 = 60,
71
+ CUPTI_RUNTIME_TRACE_CBID_cudaBindSurfaceToArray_v3020 = 61,
72
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetSurfaceReference_v3020 = 62,
73
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLSetGLDevice_v3020 = 63,
74
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLRegisterBufferObject_v3020 = 64,
75
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLMapBufferObject_v3020 = 65,
76
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLUnmapBufferObject_v3020 = 66,
77
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLUnregisterBufferObject_v3020 = 67,
78
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLSetBufferObjectMapFlags_v3020 = 68,
79
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLMapBufferObjectAsync_v3020 = 69,
80
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLUnmapBufferObjectAsync_v3020 = 70,
81
+ CUPTI_RUNTIME_TRACE_CBID_cudaWGLGetDevice_v3020 = 71,
82
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsGLRegisterImage_v3020 = 72,
83
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsGLRegisterBuffer_v3020 = 73,
84
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsUnregisterResource_v3020 = 74,
85
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsResourceSetMapFlags_v3020 = 75,
86
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsMapResources_v3020 = 76,
87
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsUnmapResources_v3020 = 77,
88
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsResourceGetMappedPointer_v3020 = 78,
89
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsSubResourceGetMappedArray_v3020 = 79,
90
+ CUPTI_RUNTIME_TRACE_CBID_cudaVDPAUGetDevice_v3020 = 80,
91
+ CUPTI_RUNTIME_TRACE_CBID_cudaVDPAUSetVDPAUDevice_v3020 = 81,
92
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsVDPAURegisterVideoSurface_v3020 = 82,
93
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsVDPAURegisterOutputSurface_v3020 = 83,
94
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D11GetDevice_v3020 = 84,
95
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D11GetDevices_v3020 = 85,
96
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D11SetDirect3DDevice_v3020 = 86,
97
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsD3D11RegisterResource_v3020 = 87,
98
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10GetDevice_v3020 = 88,
99
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10GetDevices_v3020 = 89,
100
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10SetDirect3DDevice_v3020 = 90,
101
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsD3D10RegisterResource_v3020 = 91,
102
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10RegisterResource_v3020 = 92,
103
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10UnregisterResource_v3020 = 93,
104
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10MapResources_v3020 = 94,
105
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10UnmapResources_v3020 = 95,
106
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceSetMapFlags_v3020 = 96,
107
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceGetSurfaceDimensions_v3020 = 97,
108
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceGetMappedArray_v3020 = 98,
109
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceGetMappedPointer_v3020 = 99,
110
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceGetMappedSize_v3020 = 100,
111
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceGetMappedPitch_v3020 = 101,
112
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9GetDevice_v3020 = 102,
113
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9GetDevices_v3020 = 103,
114
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9SetDirect3DDevice_v3020 = 104,
115
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9GetDirect3DDevice_v3020 = 105,
116
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsD3D9RegisterResource_v3020 = 106,
117
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9RegisterResource_v3020 = 107,
118
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9UnregisterResource_v3020 = 108,
119
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9MapResources_v3020 = 109,
120
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9UnmapResources_v3020 = 110,
121
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceSetMapFlags_v3020 = 111,
122
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceGetSurfaceDimensions_v3020 = 112,
123
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceGetMappedArray_v3020 = 113,
124
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceGetMappedPointer_v3020 = 114,
125
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceGetMappedSize_v3020 = 115,
126
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceGetMappedPitch_v3020 = 116,
127
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9Begin_v3020 = 117,
128
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9End_v3020 = 118,
129
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9RegisterVertexBuffer_v3020 = 119,
130
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9UnregisterVertexBuffer_v3020 = 120,
131
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9MapVertexBuffer_v3020 = 121,
132
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9UnmapVertexBuffer_v3020 = 122,
133
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadExit_v3020 = 123,
134
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetDoubleForDevice_v3020 = 124,
135
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetDoubleForHost_v3020 = 125,
136
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadSynchronize_v3020 = 126,
137
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadGetLimit_v3020 = 127,
138
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadSetLimit_v3020 = 128,
139
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamCreate_v3020 = 129,
140
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamDestroy_v3020 = 130,
141
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSynchronize_v3020 = 131,
142
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamQuery_v3020 = 132,
143
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventCreate_v3020 = 133,
144
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventCreateWithFlags_v3020 = 134,
145
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventRecord_v3020 = 135,
146
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventDestroy_v3020 = 136,
147
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventSynchronize_v3020 = 137,
148
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventQuery_v3020 = 138,
149
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventElapsedTime_v3020 = 139,
150
+ CUPTI_RUNTIME_TRACE_CBID_cudaMalloc3D_v3020 = 140,
151
+ CUPTI_RUNTIME_TRACE_CBID_cudaMalloc3DArray_v3020 = 141,
152
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset3D_v3020 = 142,
153
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset3DAsync_v3020 = 143,
154
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3D_v3020 = 144,
155
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DAsync_v3020 = 145,
156
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadSetCacheConfig_v3020 = 146,
157
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamWaitEvent_v3020 = 147,
158
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D11GetDirect3DDevice_v3020 = 148,
159
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10GetDirect3DDevice_v3020 = 149,
160
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadGetCacheConfig_v3020 = 150,
161
+ CUPTI_RUNTIME_TRACE_CBID_cudaPointerGetAttributes_v4000 = 151,
162
+ CUPTI_RUNTIME_TRACE_CBID_cudaHostRegister_v4000 = 152,
163
+ CUPTI_RUNTIME_TRACE_CBID_cudaHostUnregister_v4000 = 153,
164
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceCanAccessPeer_v4000 = 154,
165
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceEnablePeerAccess_v4000 = 155,
166
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceDisablePeerAccess_v4000 = 156,
167
+ CUPTI_RUNTIME_TRACE_CBID_cudaPeerRegister_v4000 = 157,
168
+ CUPTI_RUNTIME_TRACE_CBID_cudaPeerUnregister_v4000 = 158,
169
+ CUPTI_RUNTIME_TRACE_CBID_cudaPeerGetDevicePointer_v4000 = 159,
170
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyPeer_v4000 = 160,
171
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyPeerAsync_v4000 = 161,
172
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DPeer_v4000 = 162,
173
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DPeerAsync_v4000 = 163,
174
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceReset_v3020 = 164,
175
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSynchronize_v3020 = 165,
176
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetLimit_v3020 = 166,
177
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSetLimit_v3020 = 167,
178
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetCacheConfig_v3020 = 168,
179
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSetCacheConfig_v3020 = 169,
180
+ CUPTI_RUNTIME_TRACE_CBID_cudaProfilerInitialize_v4000 = 170,
181
+ CUPTI_RUNTIME_TRACE_CBID_cudaProfilerStart_v4000 = 171,
182
+ CUPTI_RUNTIME_TRACE_CBID_cudaProfilerStop_v4000 = 172,
183
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetByPCIBusId_v4010 = 173,
184
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetPCIBusId_v4010 = 174,
185
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLGetDevices_v4010 = 175,
186
+ CUPTI_RUNTIME_TRACE_CBID_cudaIpcGetEventHandle_v4010 = 176,
187
+ CUPTI_RUNTIME_TRACE_CBID_cudaIpcOpenEventHandle_v4010 = 177,
188
+ CUPTI_RUNTIME_TRACE_CBID_cudaIpcGetMemHandle_v4010 = 178,
189
+ CUPTI_RUNTIME_TRACE_CBID_cudaIpcOpenMemHandle_v4010 = 179,
190
+ CUPTI_RUNTIME_TRACE_CBID_cudaIpcCloseMemHandle_v4010 = 180,
191
+ CUPTI_RUNTIME_TRACE_CBID_cudaArrayGetInfo_v4010 = 181,
192
+ CUPTI_RUNTIME_TRACE_CBID_cudaFuncSetSharedMemConfig_v4020 = 182,
193
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetSharedMemConfig_v4020 = 183,
194
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSetSharedMemConfig_v4020 = 184,
195
+ CUPTI_RUNTIME_TRACE_CBID_cudaCreateTextureObject_v5000 = 185,
196
+ CUPTI_RUNTIME_TRACE_CBID_cudaDestroyTextureObject_v5000 = 186,
197
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureObjectResourceDesc_v5000 = 187,
198
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureObjectTextureDesc_v5000 = 188,
199
+ CUPTI_RUNTIME_TRACE_CBID_cudaCreateSurfaceObject_v5000 = 189,
200
+ CUPTI_RUNTIME_TRACE_CBID_cudaDestroySurfaceObject_v5000 = 190,
201
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetSurfaceObjectResourceDesc_v5000 = 191,
202
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocMipmappedArray_v5000 = 192,
203
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetMipmappedArrayLevel_v5000 = 193,
204
+ CUPTI_RUNTIME_TRACE_CBID_cudaFreeMipmappedArray_v5000 = 194,
205
+ CUPTI_RUNTIME_TRACE_CBID_cudaBindTextureToMipmappedArray_v5000 = 195,
206
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsResourceGetMappedMipmappedArray_v5000 = 196,
207
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamAddCallback_v5000 = 197,
208
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamCreateWithFlags_v5000 = 198,
209
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureObjectResourceViewDesc_v5000 = 199,
210
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetAttribute_v5000 = 200,
211
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamDestroy_v5050 = 201,
212
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamCreateWithPriority_v5050 = 202,
213
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetPriority_v5050 = 203,
214
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetFlags_v5050 = 204,
215
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetStreamPriorityRange_v5050 = 205,
216
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocManaged_v6000 = 206,
217
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyMaxActiveBlocksPerMultiprocessor_v6000 = 207,
218
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamAttachMemAsync_v6000 = 208,
219
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetErrorName_v6050 = 209,
220
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyMaxActiveBlocksPerMultiprocessor_v6050 = 210,
221
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchKernel_v7000 = 211,
222
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDeviceFlags_v7000 = 212,
223
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunch_ptsz_v7000 = 213,
224
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchKernel_ptsz_v7000 = 214,
225
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy_ptds_v7000 = 215,
226
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2D_ptds_v7000 = 216,
227
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToArray_ptds_v7000 = 217,
228
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DToArray_ptds_v7000 = 218,
229
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromArray_ptds_v7000 = 219,
230
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DFromArray_ptds_v7000 = 220,
231
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyArrayToArray_ptds_v7000 = 221,
232
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DArrayToArray_ptds_v7000 = 222,
233
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToSymbol_ptds_v7000 = 223,
234
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromSymbol_ptds_v7000 = 224,
235
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyAsync_ptsz_v7000 = 225,
236
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToArrayAsync_ptsz_v7000 = 226,
237
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromArrayAsync_ptsz_v7000 = 227,
238
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DAsync_ptsz_v7000 = 228,
239
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DToArrayAsync_ptsz_v7000 = 229,
240
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DFromArrayAsync_ptsz_v7000 = 230,
241
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToSymbolAsync_ptsz_v7000 = 231,
242
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromSymbolAsync_ptsz_v7000 = 232,
243
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset_ptds_v7000 = 233,
244
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset2D_ptds_v7000 = 234,
245
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemsetAsync_ptsz_v7000 = 235,
246
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset2DAsync_ptsz_v7000 = 236,
247
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetPriority_ptsz_v7000 = 237,
248
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetFlags_ptsz_v7000 = 238,
249
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSynchronize_ptsz_v7000 = 239,
250
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamQuery_ptsz_v7000 = 240,
251
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamAttachMemAsync_ptsz_v7000 = 241,
252
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventRecord_ptsz_v7000 = 242,
253
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset3D_ptds_v7000 = 243,
254
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset3DAsync_ptsz_v7000 = 244,
255
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3D_ptds_v7000 = 245,
256
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DAsync_ptsz_v7000 = 246,
257
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamWaitEvent_ptsz_v7000 = 247,
258
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamAddCallback_ptsz_v7000 = 248,
259
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DPeer_ptds_v7000 = 249,
260
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DPeerAsync_ptsz_v7000 = 250,
261
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_v7000 = 251,
262
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPrefetchAsync_v8000 = 252,
263
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPrefetchAsync_ptsz_v8000 = 253,
264
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemAdvise_v8000 = 254,
265
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetP2PAttribute_v8000 = 255,
266
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsEGLRegisterImage_v7000 = 256,
267
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamConsumerConnect_v7000 = 257,
268
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamConsumerDisconnect_v7000 = 258,
269
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamConsumerAcquireFrame_v7000 = 259,
270
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamConsumerReleaseFrame_v7000 = 260,
271
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamProducerConnect_v7000 = 261,
272
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamProducerDisconnect_v7000 = 262,
273
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamProducerPresentFrame_v7000 = 263,
274
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamProducerReturnFrame_v7000 = 264,
275
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsResourceGetMappedEglFrame_v7000 = 265,
276
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemRangeGetAttribute_v8000 = 266,
277
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemRangeGetAttributes_v8000 = 267,
278
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamConsumerConnectWithFlags_v7000 = 268,
279
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchCooperativeKernel_v9000 = 269,
280
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchCooperativeKernel_ptsz_v9000 = 270,
281
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventCreateFromEGLSync_v9000 = 271,
282
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchCooperativeKernelMultiDevice_v9000 = 272,
283
+ CUPTI_RUNTIME_TRACE_CBID_cudaFuncSetAttribute_v9000 = 273,
284
+ CUPTI_RUNTIME_TRACE_CBID_cudaImportExternalMemory_v10000 = 274,
285
+ CUPTI_RUNTIME_TRACE_CBID_cudaExternalMemoryGetMappedBuffer_v10000 = 275,
286
+ CUPTI_RUNTIME_TRACE_CBID_cudaExternalMemoryGetMappedMipmappedArray_v10000 = 276,
287
+ CUPTI_RUNTIME_TRACE_CBID_cudaDestroyExternalMemory_v10000 = 277,
288
+ CUPTI_RUNTIME_TRACE_CBID_cudaImportExternalSemaphore_v10000 = 278,
289
+ CUPTI_RUNTIME_TRACE_CBID_cudaSignalExternalSemaphoresAsync_v10000 = 279,
290
+ CUPTI_RUNTIME_TRACE_CBID_cudaSignalExternalSemaphoresAsync_ptsz_v10000 = 280,
291
+ CUPTI_RUNTIME_TRACE_CBID_cudaWaitExternalSemaphoresAsync_v10000 = 281,
292
+ CUPTI_RUNTIME_TRACE_CBID_cudaWaitExternalSemaphoresAsync_ptsz_v10000 = 282,
293
+ CUPTI_RUNTIME_TRACE_CBID_cudaDestroyExternalSemaphore_v10000 = 283,
294
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchHostFunc_v10000 = 284,
295
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchHostFunc_ptsz_v10000 = 285,
296
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphCreate_v10000 = 286,
297
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphKernelNodeGetParams_v10000 = 287,
298
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphKernelNodeSetParams_v10000 = 288,
299
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddKernelNode_v10000 = 289,
300
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemcpyNode_v10000 = 290,
301
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemcpyNodeGetParams_v10000 = 291,
302
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemcpyNodeSetParams_v10000 = 292,
303
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemsetNode_v10000 = 293,
304
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemsetNodeGetParams_v10000 = 294,
305
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemsetNodeSetParams_v10000 = 295,
306
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddHostNode_v10000 = 296,
307
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphHostNodeGetParams_v10000 = 297,
308
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddChildGraphNode_v10000 = 298,
309
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphChildGraphNodeGetGraph_v10000 = 299,
310
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddEmptyNode_v10000 = 300,
311
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphClone_v10000 = 301,
312
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeFindInClone_v10000 = 302,
313
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeGetType_v10000 = 303,
314
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphGetRootNodes_v10000 = 304,
315
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeGetDependencies_v10000 = 305,
316
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeGetDependentNodes_v10000 = 306,
317
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddDependencies_v10000 = 307,
318
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphRemoveDependencies_v10000 = 308,
319
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphDestroyNode_v10000 = 309,
320
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphInstantiate_v10000 = 310,
321
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphLaunch_v10000 = 311,
322
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphLaunch_ptsz_v10000 = 312,
323
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecDestroy_v10000 = 313,
324
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphDestroy_v10000 = 314,
325
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamBeginCapture_v10000 = 315,
326
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamBeginCapture_ptsz_v10000 = 316,
327
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamIsCapturing_v10000 = 317,
328
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamIsCapturing_ptsz_v10000 = 318,
329
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamEndCapture_v10000 = 319,
330
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamEndCapture_ptsz_v10000 = 320,
331
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphHostNodeSetParams_v10000 = 321,
332
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphGetNodes_v10000 = 322,
333
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphGetEdges_v10000 = 323,
334
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetCaptureInfo_v10010 = 324,
335
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetCaptureInfo_ptsz_v10010 = 325,
336
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecKernelNodeSetParams_v10010 = 326,
337
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadExchangeStreamCaptureMode_v10010 = 327,
338
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetNvSciSyncAttributes_v10020 = 328,
339
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyAvailableDynamicSMemPerBlock_v10200 = 329,
340
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSetFlags_v10200 = 330,
341
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSetFlags_ptsz_v10200 = 331,
342
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecMemcpyNodeSetParams_v10020 = 332,
343
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecMemsetNodeSetParams_v10020 = 333,
344
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecHostNodeSetParams_v10020 = 334,
345
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecUpdate_v10020 = 335,
346
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetFuncBySymbol_v11000 = 336,
347
+ CUPTI_RUNTIME_TRACE_CBID_cudaCtxResetPersistingL2Cache_v11000 = 337,
348
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphKernelNodeCopyAttributes_v11000 = 338,
349
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphKernelNodeGetAttribute_v11000 = 339,
350
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphKernelNodeSetAttribute_v11000 = 340,
351
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamCopyAttributes_v11000 = 341,
352
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamCopyAttributes_ptsz_v11000 = 342,
353
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetAttribute_v11000 = 343,
354
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetAttribute_ptsz_v11000 = 344,
355
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSetAttribute_v11000 = 345,
356
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSetAttribute_ptsz_v11000 = 346,
357
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetTexture1DLinearMaxWidth_v11010 = 347,
358
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphUpload_v10000 = 348,
359
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphUpload_ptsz_v10000 = 349,
360
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemcpyNodeToSymbol_v11010 = 350,
361
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemcpyNodeFromSymbol_v11010 = 351,
362
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemcpyNode1D_v11010 = 352,
363
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemcpyNodeSetParamsToSymbol_v11010 = 353,
364
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemcpyNodeSetParamsFromSymbol_v11010 = 354,
365
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemcpyNodeSetParams1D_v11010 = 355,
366
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecMemcpyNodeSetParamsToSymbol_v11010 = 356,
367
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecMemcpyNodeSetParamsFromSymbol_v11010 = 357,
368
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecMemcpyNodeSetParams1D_v11010 = 358,
369
+ CUPTI_RUNTIME_TRACE_CBID_cudaArrayGetSparseProperties_v11010 = 359,
370
+ CUPTI_RUNTIME_TRACE_CBID_cudaMipmappedArrayGetSparseProperties_v11010 = 360,
371
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecChildGraphNodeSetParams_v11010 = 361,
372
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddEventRecordNode_v11010 = 362,
373
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphEventRecordNodeGetEvent_v11010 = 363,
374
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphEventRecordNodeSetEvent_v11010 = 364,
375
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddEventWaitNode_v11010 = 365,
376
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphEventWaitNodeGetEvent_v11010 = 366,
377
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphEventWaitNodeSetEvent_v11010 = 367,
378
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecEventRecordNodeSetEvent_v11010 = 368,
379
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecEventWaitNodeSetEvent_v11010 = 369,
380
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventRecordWithFlags_v11010 = 370,
381
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventRecordWithFlags_ptsz_v11010 = 371,
382
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetDefaultMemPool_v11020 = 372,
383
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocAsync_v11020 = 373,
384
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocAsync_ptsz_v11020 = 374,
385
+ CUPTI_RUNTIME_TRACE_CBID_cudaFreeAsync_v11020 = 375,
386
+ CUPTI_RUNTIME_TRACE_CBID_cudaFreeAsync_ptsz_v11020 = 376,
387
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolTrimTo_v11020 = 377,
388
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolSetAttribute_v11020 = 378,
389
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolGetAttribute_v11020 = 379,
390
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolSetAccess_v11020 = 380,
391
+ CUPTI_RUNTIME_TRACE_CBID_cudaArrayGetPlane_v11020 = 381,
392
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolGetAccess_v11020 = 382,
393
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolCreate_v11020 = 383,
394
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolDestroy_v11020 = 384,
395
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSetMemPool_v11020 = 385,
396
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetMemPool_v11020 = 386,
397
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolExportToShareableHandle_v11020 = 387,
398
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolImportFromShareableHandle_v11020 = 388,
399
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolExportPointer_v11020 = 389,
400
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolImportPointer_v11020 = 390,
401
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocFromPoolAsync_v11020 = 391,
402
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocFromPoolAsync_ptsz_v11020 = 392,
403
+ CUPTI_RUNTIME_TRACE_CBID_cudaSignalExternalSemaphoresAsync_v2_v11020 = 393,
404
+ CUPTI_RUNTIME_TRACE_CBID_cudaSignalExternalSemaphoresAsync_v2_ptsz_v11020 = 394,
405
+ CUPTI_RUNTIME_TRACE_CBID_cudaWaitExternalSemaphoresAsync_v2_v11020 = 395,
406
+ CUPTI_RUNTIME_TRACE_CBID_cudaWaitExternalSemaphoresAsync_v2_ptsz_v11020 = 396,
407
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddExternalSemaphoresSignalNode_v11020 = 397,
408
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExternalSemaphoresSignalNodeGetParams_v11020 = 398,
409
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExternalSemaphoresSignalNodeSetParams_v11020 = 399,
410
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddExternalSemaphoresWaitNode_v11020 = 400,
411
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExternalSemaphoresWaitNodeGetParams_v11020 = 401,
412
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExternalSemaphoresWaitNodeSetParams_v11020 = 402,
413
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecExternalSemaphoresSignalNodeSetParams_v11020 = 403,
414
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecExternalSemaphoresWaitNodeSetParams_v11020 = 404,
415
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceFlushGPUDirectRDMAWrites_v11030 = 405,
416
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDriverEntryPoint_v11030 = 406,
417
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDriverEntryPoint_ptsz_v11030 = 407,
418
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphDebugDotPrint_v11030 = 408,
419
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetCaptureInfo_v2_v11030 = 409,
420
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetCaptureInfo_v2_ptsz_v11030 = 410,
421
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamUpdateCaptureDependencies_v11030 = 411,
422
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamUpdateCaptureDependencies_ptsz_v11030 = 412,
423
+ CUPTI_RUNTIME_TRACE_CBID_cudaUserObjectCreate_v11030 = 413,
424
+ CUPTI_RUNTIME_TRACE_CBID_cudaUserObjectRetain_v11030 = 414,
425
+ CUPTI_RUNTIME_TRACE_CBID_cudaUserObjectRelease_v11030 = 415,
426
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphRetainUserObject_v11030 = 416,
427
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphReleaseUserObject_v11030 = 417,
428
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphInstantiateWithFlags_v11040 = 418,
429
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemAllocNode_v11040 = 419,
430
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemAllocNodeGetParams_v11040 = 420,
431
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemFreeNode_v11040 = 421,
432
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemFreeNodeGetParams_v11040 = 422,
433
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGraphMemTrim_v11040 = 423,
434
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetGraphMemAttribute_v11040 = 424,
435
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSetGraphMemAttribute_v11040 = 425,
436
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeSetEnabled_v11060 = 426,
437
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeGetEnabled_v11060 = 427,
438
+ CUPTI_RUNTIME_TRACE_CBID_cudaArrayGetMemoryRequirements_v11060 = 428,
439
+ CUPTI_RUNTIME_TRACE_CBID_cudaMipmappedArrayGetMemoryRequirements_v11060 = 429,
440
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchKernelExC_v11060 = 430,
441
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchKernelExC_ptsz_v11060 = 431,
442
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyMaxPotentialClusterSize_v11070 = 432,
443
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyMaxActiveClusters_v11070 = 433,
444
+ CUPTI_RUNTIME_TRACE_CBID_cudaCreateTextureObject_v2_v11080 = 434,
445
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureObjectTextureDesc_v2_v11080 = 435,
446
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphInstantiateWithParams_v12000 = 436,
447
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphInstantiateWithParams_ptsz_v12000 = 437,
448
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecGetFlags_v12000 = 438,
449
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetKernel_v12000 = 439,
450
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDeviceProperties_v2_v12000 = 440,
451
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetId_v12000 = 441,
452
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetId_ptsz_v12000 = 442,
453
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphInstantiate_v12000 = 443,
454
+ CUPTI_RUNTIME_TRACE_CBID_cudaInitDevice_v12000 = 444,
455
+ CUPTI_RUNTIME_TRACE_CBID_SIZE = 445,
456
+ CUPTI_RUNTIME_TRACE_CBID_FORCE_INT = 0x7fffffff
457
+ } CUpti_runtime_api_trace_cbid;
458
+
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_target.h ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #if !defined(_CUPTI_TARGET_H_)
2
+ #define _CUPTI_TARGET_H_
3
+
4
+ /*
5
+ CUPTI profiler target API's
6
+ This file contains the CUPTI profiling API's.
7
+ */
8
+ #include <cupti_result.h>
9
+ #include <stddef.h>
10
+ #include <stdint.h>
11
+
12
+ #ifdef __cplusplus
13
+ extern "C" {
14
+ #endif
15
+
16
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
17
+ #pragma GCC visibility push(default)
18
+ #endif
19
+
20
+ #ifndef CUPTI_PROFILER_STRUCT_SIZE
21
+ #define CUPTI_PROFILER_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
22
+ #endif
23
+
24
+ typedef struct CUpti_Device_GetChipName_Params
25
+ {
26
+ size_t structSize; //!< [in]
27
+ void* pPriv; //!< [in] assign to NULL
28
+
29
+ size_t deviceIndex; //!< [in]
30
+ const char* pChipName; //!< [out]
31
+ } CUpti_Device_GetChipName_Params;
32
+
33
+ #define CUpti_Device_GetChipName_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Device_GetChipName_Params, pChipName)
34
+ CUptiResult CUPTIAPI cuptiDeviceGetChipName(CUpti_Device_GetChipName_Params *pParams);
35
+
36
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
37
+ #pragma GCC visibility pop
38
+ #endif
39
+
40
+ #ifdef __cplusplus
41
+ } /* extern "C" */
42
+ #endif
43
+ #endif
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_version.h ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2010-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
+ #if !defined(_CUPTI_VERSION_H_)
51
+ #define _CUPTI_VERSION_H_
52
+
53
+ #include <cuda_stdint.h>
54
+ #include <cupti_result.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(__cplusplus)
65
+ extern "C" {
66
+ #endif
67
+
68
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
69
+ #pragma GCC visibility push(default)
70
+ #endif
71
+
72
+ /**
73
+ * \defgroup CUPTI_VERSION_API CUPTI Version
74
+ * Function and macro to determine the CUPTI version.
75
+ * @{
76
+ */
77
+
78
+ /**
79
+ * \brief The API version for this implementation of CUPTI.
80
+ *
81
+ * The API version for this implementation of CUPTI. This define along
82
+ * with \ref cuptiGetVersion can be used to dynamically detect if the
83
+ * version of CUPTI compiled against matches the version of the loaded
84
+ * CUPTI library.
85
+ *
86
+ * v1 : CUDAToolsSDK 4.0
87
+ * v2 : CUDAToolsSDK 4.1
88
+ * v3 : CUDA Toolkit 5.0
89
+ * v4 : CUDA Toolkit 5.5
90
+ * v5 : CUDA Toolkit 6.0
91
+ * v6 : CUDA Toolkit 6.5
92
+ * v7 : CUDA Toolkit 6.5(with sm_52 support)
93
+ * v8 : CUDA Toolkit 7.0
94
+ * v9 : CUDA Toolkit 8.0
95
+ * v10 : CUDA Toolkit 9.0
96
+ * v11 : CUDA Toolkit 9.1
97
+ * v12 : CUDA Toolkit 10.0, 10.1 and 10.2
98
+ * v13 : CUDA Toolkit 11.0
99
+ * v14 : CUDA Toolkit 11.1
100
+ * v15 : CUDA Toolkit 11.2, 11.3 and 11.4
101
+ * v16 : CUDA Toolkit 11.5
102
+ * v17 : CUDA Toolkit 11.6
103
+ * v18 : CUDA Toolkit 11.8
104
+ * v19 : CUDA Toolkit 12.0
105
+ */
106
+ #define CUPTI_API_VERSION 18
107
+
108
+ /**
109
+ * \brief Get the CUPTI API version.
110
+ *
111
+ * Return the API version in \p *version.
112
+ *
113
+ * \param version Returns the version
114
+ *
115
+ * \retval CUPTI_SUCCESS on success
116
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p version is NULL
117
+ * \sa CUPTI_API_VERSION
118
+ */
119
+ CUptiResult CUPTIAPI cuptiGetVersion(uint32_t *version);
120
+
121
+ /** @} */ /* END CUPTI_VERSION_API */
122
+
123
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
124
+ #pragma GCC visibility pop
125
+ #endif
126
+
127
+ #if defined(__cplusplus)
128
+ }
129
+ #endif
130
+
131
+ #endif /*_CUPTI_VERSION_H_*/
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudaGL_meta.h ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is generated. Any changes you make will be lost during the next clean build.
2
+
3
+ // Dependent includes
4
+ #ifdef __APPLE__
5
+ #include <OpenGL/gl.h>
6
+ #else
7
+ #include <GL/gl.h>
8
+ #endif
9
+
10
+ // CUDA public interface, for type definitions and cu* function prototypes
11
+ #include "cudaGL.h"
12
+
13
+
14
+ // *************************************************************************
15
+ // Definitions of structs to hold parameters for each function
16
+ // *************************************************************************
17
+
18
+ typedef struct cuGraphicsGLRegisterBuffer_params_st {
19
+ CUgraphicsResource *pCudaResource;
20
+ GLuint buffer;
21
+ unsigned int Flags;
22
+ } cuGraphicsGLRegisterBuffer_params;
23
+
24
+ typedef struct cuGraphicsGLRegisterImage_params_st {
25
+ CUgraphicsResource *pCudaResource;
26
+ GLuint image;
27
+ GLenum target;
28
+ unsigned int Flags;
29
+ } cuGraphicsGLRegisterImage_params;
30
+
31
+ typedef struct cuGLGetDevices_v2_params_st {
32
+ unsigned int *pCudaDeviceCount;
33
+ CUdevice *pCudaDevices;
34
+ unsigned int cudaDeviceCount;
35
+ CUGLDeviceList deviceList;
36
+ } cuGLGetDevices_v2_params;
37
+
38
+ typedef struct cuGLCtxCreate_v2_params_st {
39
+ CUcontext *pCtx;
40
+ unsigned int Flags;
41
+ CUdevice device;
42
+ } cuGLCtxCreate_v2_params;
43
+
44
+ typedef struct cuGLRegisterBufferObject_params_st {
45
+ GLuint buffer;
46
+ } cuGLRegisterBufferObject_params;
47
+
48
+ typedef struct cuGLMapBufferObject_v2_ptds_params_st {
49
+ CUdeviceptr *dptr;
50
+ size_t *size;
51
+ GLuint buffer;
52
+ } cuGLMapBufferObject_v2_ptds_params;
53
+
54
+ typedef struct cuGLUnmapBufferObject_params_st {
55
+ GLuint buffer;
56
+ } cuGLUnmapBufferObject_params;
57
+
58
+ typedef struct cuGLUnregisterBufferObject_params_st {
59
+ GLuint buffer;
60
+ } cuGLUnregisterBufferObject_params;
61
+
62
+ typedef struct cuGLSetBufferObjectMapFlags_params_st {
63
+ GLuint buffer;
64
+ unsigned int Flags;
65
+ } cuGLSetBufferObjectMapFlags_params;
66
+
67
+ typedef struct cuGLMapBufferObjectAsync_v2_ptsz_params_st {
68
+ CUdeviceptr *dptr;
69
+ size_t *size;
70
+ GLuint buffer;
71
+ CUstream hStream;
72
+ } cuGLMapBufferObjectAsync_v2_ptsz_params;
73
+
74
+ typedef struct cuGLUnmapBufferObjectAsync_params_st {
75
+ GLuint buffer;
76
+ CUstream hStream;
77
+ } cuGLUnmapBufferObjectAsync_params;
78
+
79
+ typedef struct cuGLGetDevices_params_st {
80
+ unsigned int *pCudaDeviceCount;
81
+ CUdevice *pCudaDevices;
82
+ unsigned int cudaDeviceCount;
83
+ CUGLDeviceList deviceList;
84
+ } cuGLGetDevices_params;
85
+
86
+ typedef struct cuGLMapBufferObject_v2_params_st {
87
+ CUdeviceptr *dptr;
88
+ size_t *size;
89
+ GLuint buffer;
90
+ } cuGLMapBufferObject_v2_params;
91
+
92
+ typedef struct cuGLMapBufferObjectAsync_v2_params_st {
93
+ CUdeviceptr *dptr;
94
+ size_t *size;
95
+ GLuint buffer;
96
+ CUstream hStream;
97
+ } cuGLMapBufferObjectAsync_v2_params;
98
+
99
+ typedef struct cuGLCtxCreate_params_st {
100
+ CUcontext *pCtx;
101
+ unsigned int Flags;
102
+ CUdevice device;
103
+ } cuGLCtxCreate_params;
104
+
105
+ typedef struct cuGLMapBufferObject_params_st {
106
+ CUdeviceptr_v1 *dptr;
107
+ unsigned int *size;
108
+ GLuint buffer;
109
+ } cuGLMapBufferObject_params;
110
+
111
+ typedef struct cuGLMapBufferObjectAsync_params_st {
112
+ CUdeviceptr_v1 *dptr;
113
+ unsigned int *size;
114
+ GLuint buffer;
115
+ CUstream hStream;
116
+ } cuGLMapBufferObjectAsync_params;
llmeval-env/lib/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudaVDPAU_meta.h ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is generated. Any changes you make will be lost during the next clean build.
2
+
3
+ // Dependent includes
4
+ #include <vdpau/vdpau.h>
5
+
6
+ // CUDA public interface, for type definitions and cu* function prototypes
7
+ #include "cudaVDPAU.h"
8
+
9
+
10
+ // *************************************************************************
11
+ // Definitions of structs to hold parameters for each function
12
+ // *************************************************************************
13
+
14
+ typedef struct cuVDPAUGetDevice_params_st {
15
+ CUdevice *pDevice;
16
+ VdpDevice vdpDevice;
17
+ VdpGetProcAddress *vdpGetProcAddress;
18
+ } cuVDPAUGetDevice_params;
19
+
20
+ typedef struct cuVDPAUCtxCreate_v2_params_st {
21
+ CUcontext *pCtx;
22
+ unsigned int flags;
23
+ CUdevice device;
24
+ VdpDevice vdpDevice;
25
+ VdpGetProcAddress *vdpGetProcAddress;
26
+ } cuVDPAUCtxCreate_v2_params;
27
+
28
+ typedef struct cuGraphicsVDPAURegisterVideoSurface_params_st {
29
+ CUgraphicsResource *pCudaResource;
30
+ VdpVideoSurface vdpSurface;
31
+ unsigned int flags;
32
+ } cuGraphicsVDPAURegisterVideoSurface_params;
33
+
34
+ typedef struct cuGraphicsVDPAURegisterOutputSurface_params_st {
35
+ CUgraphicsResource *pCudaResource;
36
+ VdpOutputSurface vdpSurface;
37
+ unsigned int flags;
38
+ } cuGraphicsVDPAURegisterOutputSurface_params;
39
+
40
+ typedef struct cuVDPAUCtxCreate_params_st {
41
+ CUcontext *pCtx;
42
+ unsigned int flags;
43
+ CUdevice device;
44
+ VdpDevice vdpDevice;
45
+ VdpGetProcAddress *vdpGetProcAddress;
46
+ } cuVDPAUCtxCreate_params;