ZTWHHH commited on
Commit
f2016c3
·
verified ·
1 Parent(s): 3494290

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. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/discard_block_engine.inl +215 -0
  2. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/linear_congruential_engine.inl +172 -0
  3. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/linear_congruential_engine_discard.h +108 -0
  4. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/linear_feedback_shift_engine.inl +168 -0
  5. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/linear_feedback_shift_engine_wordmask.h +48 -0
  6. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/mod.h +98 -0
  7. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/normal_distribution.inl +257 -0
  8. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/normal_distribution_base.h +148 -0
  9. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/random_core_access.h +58 -0
  10. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/subtract_with_carry_engine.inl +213 -0
  11. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/uniform_int_distribution.inl +249 -0
  12. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/uniform_real_distribution.inl +234 -0
  13. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/xor_combine_engine.inl +218 -0
  14. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/xor_combine_engine_max.h +325 -0
  15. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/linear_congruential_engine.h +294 -0
  16. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/normal_distribution.h +274 -0
  17. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/uniform_real_distribution.h +273 -0
  18. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/builtin_types.h +64 -0
  19. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/channel_descriptor.h +588 -0
  20. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cudaEGL.h +659 -0
  21. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cudaTypedefs.h +0 -0
  22. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_bf16.h +0 -0
  23. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_bf16.hpp +0 -0
  24. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_device_runtime_api.h +744 -0
  25. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_fp16.h +0 -0
  26. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_fp8.h +367 -0
  27. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_pipeline_primitives.h +148 -0
  28. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_runtime.h +2363 -0
  29. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cupti_driver_cbid.h +746 -0
  30. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cupti_events.h +1350 -0
  31. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cupti_nvtx_cbid.h +111 -0
  32. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cupti_pcsampling.h +950 -0
  33. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cupti_profiler_target.h +601 -0
  34. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cupti_sass_metrics.h +409 -0
  35. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cupti_target.h +43 -0
  36. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/curand_discrete.h +87 -0
  37. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/curand_mrg32k3a.h +0 -0
  38. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/curand_mtgp32.h +210 -0
  39. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/curand_mtgp32dc_p_11213.h +0 -0
  40. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/curand_normal_static.h +134 -0
  41. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cusolverDn.h +0 -0
  42. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cusolverMg.h +318 -0
  43. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/device_double_functions.h +65 -0
  44. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/driver_types.h +0 -0
  45. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/generated_cuda_vdpau_interop_meta.h +38 -0
  46. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/generated_cudart_removed_meta.h +162 -0
  47. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/host_config.h +65 -0
  48. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/library_types.h +103 -0
  49. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/math_constants.h +152 -0
  50. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/nppi.h +106 -0
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/discard_block_engine.inl ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2021 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/random/discard_block_engine.h>
22
+
23
+ THRUST_NAMESPACE_BEGIN
24
+
25
+ namespace random
26
+ {
27
+
28
+
29
+ template<typename Engine, size_t p, size_t r>
30
+ __host__ __device__
31
+ discard_block_engine<Engine,p,r>
32
+ ::discard_block_engine()
33
+ : m_e(), m_n(0)
34
+ {}
35
+
36
+
37
+ template<typename Engine, size_t p, size_t r>
38
+ __host__ __device__
39
+ discard_block_engine<Engine,p,r>
40
+ ::discard_block_engine(result_type s)
41
+ : m_e(s), m_n(0)
42
+ {}
43
+
44
+
45
+ template<typename Engine, size_t p, size_t r>
46
+ __host__ __device__
47
+ discard_block_engine<Engine,p,r>
48
+ ::discard_block_engine(const base_type &urng)
49
+ : m_e(urng), m_n(0)
50
+ {}
51
+
52
+
53
+ template<typename Engine, size_t p, size_t r>
54
+ __host__ __device__
55
+ void discard_block_engine<Engine,p,r>
56
+ ::seed(void)
57
+ {
58
+ m_e.seed();
59
+ m_n = 0;
60
+ }
61
+
62
+
63
+ template<typename Engine, size_t p, size_t r>
64
+ __host__ __device__
65
+ void discard_block_engine<Engine,p,r>
66
+ ::seed(result_type s)
67
+ {
68
+ m_e.seed(s);
69
+ m_n = 0;
70
+ }
71
+
72
+
73
+ template<typename Engine, size_t p, size_t r>
74
+ __host__ __device__
75
+ typename discard_block_engine<Engine,p,r>::result_type
76
+ discard_block_engine<Engine,p,r>
77
+ ::operator()(void)
78
+ {
79
+ if(m_n >= used_block)
80
+ {
81
+ m_e.discard(block_size - m_n);
82
+ // for(; m_n < block_size; ++m_n)
83
+ // m_e();
84
+ m_n = 0;
85
+ }
86
+
87
+ ++m_n;
88
+
89
+ return m_e();
90
+ }
91
+
92
+
93
+ template<typename Engine, size_t p, size_t r>
94
+ __host__ __device__
95
+ void discard_block_engine<Engine,p,r>
96
+ ::discard(unsigned long long z)
97
+ {
98
+ // XXX this should be accelerated
99
+ for(; z > 0; --z)
100
+ {
101
+ this->operator()();
102
+ } // end for
103
+ }
104
+
105
+
106
+ template<typename Engine, size_t p, size_t r>
107
+ __host__ __device__
108
+ const typename discard_block_engine<Engine,p,r>::base_type &
109
+ discard_block_engine<Engine,p,r>
110
+ ::base(void) const
111
+ {
112
+ return m_e;
113
+ }
114
+
115
+
116
+ template<typename Engine, size_t p, size_t r>
117
+ template<typename CharT, typename Traits>
118
+ std::basic_ostream<CharT,Traits>& discard_block_engine<Engine,p,r>
119
+ ::stream_out(std::basic_ostream<CharT,Traits> &os) const
120
+ {
121
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
122
+ typedef typename ostream_type::ios_base ios_base;
123
+
124
+ // save old flags & fill character
125
+ const typename ios_base::fmtflags flags = os.flags();
126
+ const CharT fill = os.fill();
127
+
128
+ const CharT space = os.widen(' ');
129
+ os.flags(ios_base::dec | ios_base::fixed | ios_base::left);
130
+ os.fill(space);
131
+
132
+ // output the base engine followed by n
133
+ os << m_e << space << m_n;
134
+
135
+ // restore flags & fill character
136
+ os.flags(flags);
137
+ os.fill(fill);
138
+
139
+ return os;
140
+ }
141
+
142
+
143
+ template<typename Engine, size_t p, size_t r>
144
+ template<typename CharT, typename Traits>
145
+ std::basic_istream<CharT,Traits>& discard_block_engine<Engine,p,r>
146
+ ::stream_in(std::basic_istream<CharT,Traits> &is)
147
+ {
148
+ typedef std::basic_istream<CharT,Traits> istream_type;
149
+ typedef typename istream_type::ios_base ios_base;
150
+
151
+ // save old flags
152
+ const typename ios_base::fmtflags flags = is.flags();
153
+
154
+ is.flags(ios_base::skipws);
155
+
156
+ // input the base engine and then n
157
+ is >> m_e >> m_n;
158
+
159
+ // restore old flags
160
+ is.flags(flags);
161
+ return is;
162
+ }
163
+
164
+
165
+ template<typename Engine, size_t p, size_t r>
166
+ __host__ __device__
167
+ bool discard_block_engine<Engine,p,r>
168
+ ::equal(const discard_block_engine<Engine,p,r> &rhs) const
169
+ {
170
+ return (m_e == rhs.m_e) && (m_n == rhs.m_n);
171
+ }
172
+
173
+
174
+ template<typename Engine, size_t p, size_t r,
175
+ typename CharT, typename Traits>
176
+ std::basic_ostream<CharT,Traits>&
177
+ operator<<(std::basic_ostream<CharT,Traits> &os,
178
+ const discard_block_engine<Engine,p,r> &e)
179
+ {
180
+ return thrust::random::detail::random_core_access::stream_out(os,e);
181
+ }
182
+
183
+
184
+ template<typename Engine, size_t p, size_t r,
185
+ typename CharT, typename Traits>
186
+ std::basic_istream<CharT,Traits>&
187
+ operator>>(std::basic_istream<CharT,Traits> &is,
188
+ discard_block_engine<Engine,p,r> &e)
189
+ {
190
+ return thrust::random::detail::random_core_access::stream_in(is,e);
191
+ }
192
+
193
+
194
+ template<typename Engine, size_t p, size_t r>
195
+ __host__ __device__
196
+ bool operator==(const discard_block_engine<Engine,p,r> &lhs,
197
+ const discard_block_engine<Engine,p,r> &rhs)
198
+ {
199
+ return thrust::random::detail::random_core_access::equal(lhs,rhs);
200
+ }
201
+
202
+
203
+ template<typename Engine, size_t p, size_t r>
204
+ __host__ __device__
205
+ bool operator!=(const discard_block_engine<Engine,p,r> &lhs,
206
+ const discard_block_engine<Engine,p,r> &rhs)
207
+ {
208
+ return !(lhs == rhs);
209
+ }
210
+
211
+
212
+ } // end random
213
+
214
+ THRUST_NAMESPACE_END
215
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/linear_congruential_engine.inl ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2021 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/random/linear_congruential_engine.h>
22
+ #include <thrust/random/detail/mod.h>
23
+ #include <thrust/random/detail/random_core_access.h>
24
+
25
+ THRUST_NAMESPACE_BEGIN
26
+
27
+ namespace random
28
+ {
29
+
30
+
31
+ template<typename UIntType, UIntType a, UIntType c, UIntType m>
32
+ __host__ __device__
33
+ linear_congruential_engine<UIntType,a,c,m>
34
+ ::linear_congruential_engine(result_type s)
35
+ {
36
+ seed(s);
37
+ } // end linear_congruential_engine::linear_congruential_engine()
38
+
39
+
40
+ template<typename UIntType, UIntType a, UIntType c, UIntType m>
41
+ __host__ __device__
42
+ void linear_congruential_engine<UIntType,a,c,m>
43
+ ::seed(result_type s)
44
+ {
45
+ if((detail::mod<UIntType, 1, 0, m>(c) == 0) &&
46
+ (detail::mod<UIntType, 1, 0, m>(s) == 0))
47
+ m_x = detail::mod<UIntType, 1, 0, m>(1);
48
+ else
49
+ m_x = detail::mod<UIntType, 1, 0, m>(s);
50
+ } // end linear_congruential_engine::seed()
51
+
52
+
53
+ template<typename UIntType, UIntType a, UIntType c, UIntType m>
54
+ __host__ __device__
55
+ typename linear_congruential_engine<UIntType,a,c,m>::result_type
56
+ linear_congruential_engine<UIntType,a,c,m>
57
+ ::operator()(void)
58
+ {
59
+ m_x = detail::mod<UIntType,a,c,m>(m_x);
60
+ return m_x;
61
+ } // end linear_congruential_engine::operator()()
62
+
63
+
64
+ template<typename UIntType, UIntType a, UIntType c, UIntType m>
65
+ __host__ __device__
66
+ void linear_congruential_engine<UIntType,a,c,m>
67
+ ::discard(unsigned long long z)
68
+ {
69
+ thrust::random::detail::linear_congruential_engine_discard::discard(*this,z);
70
+ } // end linear_congruential_engine::discard()
71
+
72
+
73
+ template<typename UIntType, UIntType a, UIntType c, UIntType m>
74
+ template<typename CharT, typename Traits>
75
+ std::basic_ostream<CharT,Traits>& linear_congruential_engine<UIntType,a,c,m>
76
+ ::stream_out(std::basic_ostream<CharT,Traits> &os) const
77
+ {
78
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
79
+ typedef typename ostream_type::ios_base ios_base;
80
+
81
+ // save old flags & fill character
82
+ const typename ios_base::fmtflags flags = os.flags();
83
+ const CharT fill = os.fill();
84
+
85
+ os.flags(ios_base::dec | ios_base::fixed | ios_base::left);
86
+ os.fill(os.widen(' '));
87
+
88
+ // output one word of state
89
+ os << m_x;
90
+
91
+ // restore flags & fill character
92
+ os.flags(flags);
93
+ os.fill(fill);
94
+
95
+ return os;
96
+ }
97
+
98
+
99
+ template<typename UIntType, UIntType a, UIntType c, UIntType m>
100
+ template<typename CharT, typename Traits>
101
+ std::basic_istream<CharT,Traits>& linear_congruential_engine<UIntType,a,c,m>
102
+ ::stream_in(std::basic_istream<CharT,Traits> &is)
103
+ {
104
+ typedef std::basic_istream<CharT,Traits> istream_type;
105
+ typedef typename istream_type::ios_base ios_base;
106
+
107
+ // save old flags
108
+ const typename ios_base::fmtflags flags = is.flags();
109
+
110
+ is.flags(ios_base::dec);
111
+
112
+ // input one word of state
113
+ is >> m_x;
114
+
115
+ // restore flags
116
+ is.flags(flags);
117
+
118
+ return is;
119
+ }
120
+
121
+
122
+ template<typename UIntType, UIntType a, UIntType c, UIntType m>
123
+ __host__ __device__
124
+ bool linear_congruential_engine<UIntType,a,c,m>
125
+ ::equal(const linear_congruential_engine<UIntType,a,c,m> &rhs) const
126
+ {
127
+ return m_x == rhs.m_x;
128
+ }
129
+
130
+
131
+ template<typename UIntType_, UIntType_ a_, UIntType_ c_, UIntType_ m_>
132
+ __host__ __device__
133
+ bool operator==(const linear_congruential_engine<UIntType_,a_,c_,m_> &lhs,
134
+ const linear_congruential_engine<UIntType_,a_,c_,m_> &rhs)
135
+ {
136
+ return detail::random_core_access::equal(lhs,rhs);
137
+ }
138
+
139
+
140
+ template<typename UIntType, UIntType a, UIntType c, UIntType m>
141
+ __host__ __device__
142
+ bool operator!=(const linear_congruential_engine<UIntType,a,c,m> &lhs,
143
+ const linear_congruential_engine<UIntType,a,c,m> &rhs)
144
+ {
145
+ return !(lhs == rhs);
146
+ }
147
+
148
+
149
+ template<typename UIntType_, UIntType_ a_, UIntType_ c_, UIntType_ m_,
150
+ typename CharT, typename Traits>
151
+ std::basic_ostream<CharT,Traits>&
152
+ operator<<(std::basic_ostream<CharT,Traits> &os,
153
+ const linear_congruential_engine<UIntType_,a_,c_,m_> &e)
154
+ {
155
+ return detail::random_core_access::stream_out(os,e);
156
+ }
157
+
158
+
159
+ template<typename UIntType_, UIntType_ a_, UIntType_ c_, UIntType_ m_,
160
+ typename CharT, typename Traits>
161
+ std::basic_istream<CharT,Traits>&
162
+ operator>>(std::basic_istream<CharT,Traits> &is,
163
+ linear_congruential_engine<UIntType_,a_,c_,m_> &e)
164
+ {
165
+ return detail::random_core_access::stream_in(is,e);
166
+ }
167
+
168
+
169
+ } // end random
170
+
171
+ THRUST_NAMESPACE_END
172
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/linear_congruential_engine_discard.h ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/detail/cstdint.h>
22
+ #include <thrust/random/detail/mod.h>
23
+
24
+ THRUST_NAMESPACE_BEGIN
25
+
26
+ namespace random
27
+ {
28
+
29
+ namespace detail
30
+ {
31
+
32
+
33
+ template<typename UIntType, UIntType a, unsigned long long c, UIntType m>
34
+ struct linear_congruential_engine_discard_implementation
35
+ {
36
+ __host__ __device__
37
+ static void discard(UIntType &state, unsigned long long z)
38
+ {
39
+ for(; z > 0; --z)
40
+ {
41
+ state = detail::mod<UIntType,a,c,m>(state);
42
+ }
43
+ }
44
+ }; // end linear_congruential_engine_discard
45
+
46
+
47
+ // specialize for small integers and c == 0
48
+ // XXX figure out a robust implemenation of this for any unsigned integer type later
49
+ template<thrust::detail::uint32_t a, thrust::detail::uint32_t m>
50
+ struct linear_congruential_engine_discard_implementation<thrust::detail::uint32_t,a,0,m>
51
+ {
52
+ __host__ __device__
53
+ static void discard(thrust::detail::uint32_t &state, unsigned long long z)
54
+ {
55
+ const thrust::detail::uint32_t modulus = m;
56
+
57
+ // XXX we need to use unsigned long long here or we will encounter overflow in the
58
+ // multiplies below
59
+ // figure out a robust implementation of this later
60
+ unsigned long long multiplier = a;
61
+ unsigned long long multiplier_to_z = 1;
62
+
63
+ // see http://en.wikipedia.org/wiki/Modular_exponentiation
64
+ while(z > 0)
65
+ {
66
+ if(z & 1)
67
+ {
68
+ // multiply in this bit's contribution while using modulus to keep result small
69
+ multiplier_to_z = (multiplier_to_z * multiplier) % modulus;
70
+ }
71
+
72
+ // move to the next bit of the exponent, square (and mod) the base accordingly
73
+ z >>= 1;
74
+ multiplier = (multiplier * multiplier) % modulus;
75
+ }
76
+
77
+ state = static_cast<thrust::detail::uint32_t>((multiplier_to_z * state) % modulus);
78
+ }
79
+ }; // end linear_congruential_engine_discard
80
+
81
+
82
+ struct linear_congruential_engine_discard
83
+ {
84
+ template<typename LinearCongruentialEngine>
85
+ __host__ __device__
86
+ static void discard(LinearCongruentialEngine &lcg, unsigned long long z)
87
+ {
88
+ typedef typename LinearCongruentialEngine::result_type result_type;
89
+ const result_type c = LinearCongruentialEngine::increment;
90
+ const result_type a = LinearCongruentialEngine::multiplier;
91
+ const result_type m = LinearCongruentialEngine::modulus;
92
+
93
+ // XXX WAR unused variable warnings
94
+ (void) c;
95
+ (void) a;
96
+ (void) m;
97
+
98
+ linear_congruential_engine_discard_implementation<result_type,a,c,m>::discard(lcg.m_x, z);
99
+ }
100
+ }; // end linear_congruential_engine_discard
101
+
102
+
103
+ } // end detail
104
+
105
+ } // end random
106
+
107
+ THRUST_NAMESPACE_END
108
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/linear_feedback_shift_engine.inl ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2021 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/random/linear_feedback_shift_engine.h>
22
+
23
+ THRUST_NAMESPACE_BEGIN
24
+
25
+ namespace random
26
+ {
27
+
28
+ template<typename UIntType, size_t w, size_t k, size_t q, size_t s>
29
+ __host__ __device__
30
+ linear_feedback_shift_engine<UIntType,w,k,q,s>
31
+ ::linear_feedback_shift_engine(result_type value)
32
+ {
33
+ seed(value);
34
+ } // end linear_feedback_shift_engine::linear_feedback_shift_engine()
35
+
36
+ template<typename UIntType, size_t w, size_t k, size_t q, size_t s>
37
+ __host__ __device__
38
+ void linear_feedback_shift_engine<UIntType,w,k,q,s>
39
+ ::seed(result_type value)
40
+ {
41
+ m_value = value;
42
+ } // end linear_feedback_shift_engine::seed()
43
+
44
+ template<typename UIntType, size_t w, size_t k, size_t q, size_t s>
45
+ __host__ __device__
46
+ typename linear_feedback_shift_engine<UIntType,w,k,q,s>::result_type
47
+ linear_feedback_shift_engine<UIntType,w,k,q,s>
48
+ ::operator()(void)
49
+ {
50
+ const UIntType b = (((m_value << q) ^ m_value) & wordmask) >> (k-s);
51
+ const UIntType mask = ( (~static_cast<UIntType>(0)) << (w-k) ) & wordmask;
52
+ m_value = ((m_value & mask) << s) ^ b;
53
+ return m_value;
54
+ } // end linear_feedback_shift_engine::operator()()
55
+
56
+
57
+ template<typename UIntType, size_t w, size_t k, size_t q, size_t s>
58
+ __host__ __device__
59
+ void linear_feedback_shift_engine<UIntType,w,k,q,s>
60
+ ::discard(unsigned long long z)
61
+ {
62
+ for(; z > 0; --z)
63
+ {
64
+ this->operator()();
65
+ } // end for
66
+ } // end linear_feedback_shift_engine::discard()
67
+
68
+
69
+ template<typename UIntType, size_t w, size_t k, size_t q, size_t s>
70
+ template<typename CharT, typename Traits>
71
+ std::basic_ostream<CharT,Traits>& linear_feedback_shift_engine<UIntType,w,k,q,s>
72
+ ::stream_out(std::basic_ostream<CharT,Traits> &os) const
73
+ {
74
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
75
+ typedef typename ostream_type::ios_base ios_base;
76
+
77
+ // save old flags & fill character
78
+ const typename ios_base::fmtflags flags = os.flags();
79
+ const CharT fill = os.fill();
80
+
81
+ os.flags(ios_base::dec | ios_base::fixed | ios_base::left);
82
+ os.fill(os.widen(' '));
83
+
84
+ // output one word of state
85
+ os << m_value;
86
+
87
+ // restore flags & fill character
88
+ os.flags(flags);
89
+ os.fill(fill);
90
+
91
+ return os;
92
+ }
93
+
94
+
95
+ template<typename UIntType, size_t w, size_t k, size_t q, size_t s>
96
+ template<typename CharT, typename Traits>
97
+ std::basic_istream<CharT,Traits>& linear_feedback_shift_engine<UIntType,w,k,q,s>
98
+ ::stream_in(std::basic_istream<CharT,Traits> &is)
99
+ {
100
+ typedef std::basic_istream<CharT,Traits> istream_type;
101
+ typedef typename istream_type::ios_base ios_base;
102
+
103
+ // save old flags
104
+ const typename ios_base::fmtflags flags = is.flags();
105
+
106
+ is.flags(ios_base::skipws);
107
+
108
+ // input one word of state
109
+ is >> m_value;
110
+
111
+ // restore flags
112
+ is.flags(flags);
113
+
114
+ return is;
115
+ }
116
+
117
+
118
+ template<typename UIntType, size_t w, size_t k, size_t q, size_t s>
119
+ __host__ __device__
120
+ bool linear_feedback_shift_engine<UIntType,w,k,q,s>
121
+ ::equal(const linear_feedback_shift_engine<UIntType,w,k,q,s> &rhs) const
122
+ {
123
+ return m_value == rhs.m_value;
124
+ }
125
+
126
+
127
+ template<typename UIntType, size_t w, size_t k, size_t q, size_t s>
128
+ __host__ __device__
129
+ bool operator==(const linear_feedback_shift_engine<UIntType,w,k,q,s> &lhs,
130
+ const linear_feedback_shift_engine<UIntType,w,k,q,s> &rhs)
131
+ {
132
+ return thrust::random::detail::random_core_access::equal(lhs,rhs);
133
+ }
134
+
135
+
136
+ template<typename UIntType, size_t w, size_t k, size_t q, size_t s>
137
+ __host__ __device__
138
+ bool operator!=(const linear_feedback_shift_engine<UIntType,w,k,q,s> &lhs,
139
+ const linear_feedback_shift_engine<UIntType,w,k,q,s> &rhs)
140
+ {
141
+ return !(lhs == rhs);
142
+ }
143
+
144
+
145
+ template<typename UIntType_, size_t w_, size_t k_, size_t q_, size_t s_,
146
+ typename CharT, typename Traits>
147
+ std::basic_ostream<CharT,Traits>&
148
+ operator<<(std::basic_ostream<CharT,Traits> &os,
149
+ const linear_feedback_shift_engine<UIntType_,w_,k_,q_,s_> &e)
150
+ {
151
+ return thrust::random::detail::random_core_access::stream_out(os,e);
152
+ }
153
+
154
+
155
+ template<typename UIntType_, size_t w_, size_t k_, size_t q_, size_t s_,
156
+ typename CharT, typename Traits>
157
+ std::basic_istream<CharT,Traits>&
158
+ operator>>(std::basic_istream<CharT,Traits> &is,
159
+ linear_feedback_shift_engine<UIntType_,w_,k_,q_,s_> &e)
160
+ {
161
+ return thrust::random::detail::random_core_access::stream_in(is,e);
162
+ }
163
+
164
+
165
+ } // end random
166
+
167
+ THRUST_NAMESPACE_END
168
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/linear_feedback_shift_engine_wordmask.h ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ THRUST_NAMESPACE_BEGIN
22
+
23
+ namespace random
24
+ {
25
+
26
+ namespace detail
27
+ {
28
+
29
+ template<typename T, int w, int i = w-1>
30
+ struct linear_feedback_shift_engine_wordmask
31
+ {
32
+ static const T value =
33
+ (T(1u) << i) |
34
+ linear_feedback_shift_engine_wordmask<T, w, i-1>::value;
35
+ }; // end linear_feedback_shift_engine_wordmask
36
+
37
+ template<typename T, int w>
38
+ struct linear_feedback_shift_engine_wordmask<T, w, 0>
39
+ {
40
+ static const T value = 0;
41
+ }; // end linear_feedback_shift_engine_wordmask
42
+
43
+ } // end detail
44
+
45
+ } // end random
46
+
47
+ THRUST_NAMESPACE_END
48
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/mod.h ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ THRUST_NAMESPACE_BEGIN
22
+
23
+ namespace random
24
+ {
25
+
26
+ namespace detail
27
+ {
28
+
29
+ template<typename T, T a, T c, T m, bool = (m == 0)>
30
+ struct static_mod
31
+ {
32
+ static const T q = m / a;
33
+ static const T r = m % a;
34
+
35
+ __host__ __device__
36
+ T operator()(T x) const
37
+ {
38
+ THRUST_IF_CONSTEXPR(a == 1)
39
+ {
40
+ x %= m;
41
+ }
42
+ else
43
+ {
44
+ T t1 = a * (x % q);
45
+ T t2 = r * (x / q);
46
+ if(t1 >= t2)
47
+ {
48
+ x = t1 - t2;
49
+ }
50
+ else
51
+ {
52
+ x = m - t2 + t1;
53
+ }
54
+ }
55
+
56
+ THRUST_IF_CONSTEXPR(c != 0)
57
+ {
58
+ const T d = m - x;
59
+ if(d > c)
60
+ {
61
+ x += c;
62
+ }
63
+ else
64
+ {
65
+ x = c - d;
66
+ }
67
+ }
68
+
69
+ return x;
70
+ }
71
+ }; // end static_mod
72
+
73
+
74
+ // Rely on machine overflow handling
75
+ template<typename T, T a, T c, T m>
76
+ struct static_mod<T,a,c,m,true>
77
+ {
78
+ __host__ __device__
79
+ T operator()(T x) const
80
+ {
81
+ return a * x + c;
82
+ }
83
+ }; // end static_mod
84
+
85
+ template<typename T, T a, T c, T m>
86
+ __host__ __device__
87
+ T mod(T x)
88
+ {
89
+ static_mod<T,a,c,m> f;
90
+ return f(x);
91
+ } // end static_mod
92
+
93
+ } // end detail
94
+
95
+ } // end random
96
+
97
+ THRUST_NAMESPACE_END
98
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/normal_distribution.inl ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2021 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/random/normal_distribution.h>
22
+ #include <thrust/random/uniform_real_distribution.h>
23
+ #include <thrust/detail/cstdint.h>
24
+ #include <thrust/detail/integer_traits.h>
25
+
26
+ // for floating point infinity
27
+ #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC
28
+ #include <math_constants.h>
29
+ #else
30
+ #include <limits>
31
+ #endif
32
+
33
+ THRUST_NAMESPACE_BEGIN
34
+
35
+ namespace random
36
+ {
37
+
38
+
39
+ template<typename RealType>
40
+ __host__ __device__
41
+ normal_distribution<RealType>
42
+ ::normal_distribution(RealType a, RealType b)
43
+ :super_t(),m_param(a,b)
44
+ {
45
+ } // end normal_distribution::normal_distribution()
46
+
47
+
48
+ template<typename RealType>
49
+ __host__ __device__
50
+ normal_distribution<RealType>
51
+ ::normal_distribution(const param_type &parm)
52
+ :super_t(),m_param(parm)
53
+ {
54
+ } // end normal_distribution::normal_distribution()
55
+
56
+
57
+ template<typename RealType>
58
+ __host__ __device__
59
+ void normal_distribution<RealType>
60
+ ::reset(void)
61
+ {
62
+ super_t::reset();
63
+ } // end normal_distribution::reset()
64
+
65
+
66
+ template<typename RealType>
67
+ template<typename UniformRandomNumberGenerator>
68
+ __host__ __device__
69
+ typename normal_distribution<RealType>::result_type
70
+ normal_distribution<RealType>
71
+ ::operator()(UniformRandomNumberGenerator &urng)
72
+ {
73
+ return operator()(urng, m_param);
74
+ } // end normal_distribution::operator()()
75
+
76
+
77
+ template<typename RealType>
78
+ template<typename UniformRandomNumberGenerator>
79
+ __host__ __device__
80
+ typename normal_distribution<RealType>::result_type
81
+ normal_distribution<RealType>
82
+ ::operator()(UniformRandomNumberGenerator &urng,
83
+ const param_type &parm)
84
+ {
85
+ return super_t::sample(urng, parm.first, parm.second);
86
+ } // end normal_distribution::operator()()
87
+
88
+
89
+ template<typename RealType>
90
+ __host__ __device__
91
+ typename normal_distribution<RealType>::param_type
92
+ normal_distribution<RealType>
93
+ ::param(void) const
94
+ {
95
+ return m_param;
96
+ } // end normal_distribution::param()
97
+
98
+
99
+ template<typename RealType>
100
+ __host__ __device__
101
+ void normal_distribution<RealType>
102
+ ::param(const param_type &parm)
103
+ {
104
+ m_param = parm;
105
+ } // end normal_distribution::param()
106
+
107
+
108
+ template<typename RealType>
109
+ __host__ __device__
110
+ typename normal_distribution<RealType>::result_type
111
+ normal_distribution<RealType>
112
+ ::min THRUST_PREVENT_MACRO_SUBSTITUTION (void) const
113
+ {
114
+ return -this->max THRUST_PREVENT_MACRO_SUBSTITUTION ();
115
+ } // end normal_distribution::min()
116
+
117
+
118
+ template<typename RealType>
119
+ __host__ __device__
120
+ typename normal_distribution<RealType>::result_type
121
+ normal_distribution<RealType>
122
+ ::max THRUST_PREVENT_MACRO_SUBSTITUTION (void) const
123
+ {
124
+ // XXX this solution is pretty terrible
125
+ // we can't use numeric_traits<RealType>::max because nvcc will
126
+ // complain that it is a __host__ function
127
+ union
128
+ {
129
+ thrust::detail::uint32_t inf_as_int;
130
+ float result;
131
+ } hack;
132
+
133
+ hack.inf_as_int = 0x7f800000u;
134
+
135
+ return hack.result;
136
+ } // end normal_distribution::max()
137
+
138
+
139
+ template<typename RealType>
140
+ __host__ __device__
141
+ typename normal_distribution<RealType>::result_type
142
+ normal_distribution<RealType>
143
+ ::mean(void) const
144
+ {
145
+ return m_param.first;
146
+ } // end normal_distribution::mean()
147
+
148
+
149
+ template<typename RealType>
150
+ __host__ __device__
151
+ typename normal_distribution<RealType>::result_type
152
+ normal_distribution<RealType>
153
+ ::stddev(void) const
154
+ {
155
+ return m_param.second;
156
+ } // end normal_distribution::stddev()
157
+
158
+
159
+ template<typename RealType>
160
+ __host__ __device__
161
+ bool normal_distribution<RealType>
162
+ ::equal(const normal_distribution &rhs) const
163
+ {
164
+ return m_param == rhs.param();
165
+ }
166
+
167
+
168
+ template<typename RealType>
169
+ template<typename CharT, typename Traits>
170
+ std::basic_ostream<CharT,Traits>&
171
+ normal_distribution<RealType>
172
+ ::stream_out(std::basic_ostream<CharT,Traits> &os) const
173
+ {
174
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
175
+ typedef typename ostream_type::ios_base ios_base;
176
+
177
+ // save old flags and fill character
178
+ const typename ios_base::fmtflags flags = os.flags();
179
+ const CharT fill = os.fill();
180
+
181
+ const CharT space = os.widen(' ');
182
+ os.flags(ios_base::dec | ios_base::fixed | ios_base::left);
183
+ os.fill(space);
184
+
185
+ os << mean() << space << stddev();
186
+
187
+ // restore old flags and fill character
188
+ os.flags(flags);
189
+ os.fill(fill);
190
+ return os;
191
+ }
192
+
193
+
194
+ template<typename RealType>
195
+ template<typename CharT, typename Traits>
196
+ std::basic_istream<CharT,Traits>&
197
+ normal_distribution<RealType>
198
+ ::stream_in(std::basic_istream<CharT,Traits> &is)
199
+ {
200
+ typedef std::basic_istream<CharT,Traits> istream_type;
201
+ typedef typename istream_type::ios_base ios_base;
202
+
203
+ // save old flags
204
+ const typename ios_base::fmtflags flags = is.flags();
205
+
206
+ is.flags(ios_base::skipws);
207
+
208
+ is >> m_param.first >> m_param.second;
209
+
210
+ // restore old flags
211
+ is.flags(flags);
212
+ return is;
213
+ }
214
+
215
+
216
+ template<typename RealType>
217
+ __host__ __device__
218
+ bool operator==(const normal_distribution<RealType> &lhs,
219
+ const normal_distribution<RealType> &rhs)
220
+ {
221
+ return thrust::random::detail::random_core_access::equal(lhs,rhs);
222
+ }
223
+
224
+
225
+ template<typename RealType>
226
+ __host__ __device__
227
+ bool operator!=(const normal_distribution<RealType> &lhs,
228
+ const normal_distribution<RealType> &rhs)
229
+ {
230
+ return !(lhs == rhs);
231
+ }
232
+
233
+
234
+ template<typename RealType,
235
+ typename CharT, typename Traits>
236
+ std::basic_ostream<CharT,Traits>&
237
+ operator<<(std::basic_ostream<CharT,Traits> &os,
238
+ const normal_distribution<RealType> &d)
239
+ {
240
+ return thrust::random::detail::random_core_access::stream_out(os,d);
241
+ }
242
+
243
+
244
+ template<typename RealType,
245
+ typename CharT, typename Traits>
246
+ std::basic_istream<CharT,Traits>&
247
+ operator>>(std::basic_istream<CharT,Traits> &is,
248
+ normal_distribution<RealType> &d)
249
+ {
250
+ return thrust::random::detail::random_core_access::stream_in(is,d);
251
+ }
252
+
253
+
254
+ } // end random
255
+
256
+ THRUST_NAMESPACE_END
257
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/normal_distribution_base.h ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /*
18
+ * Copyright Jens Maurer 2000-2001
19
+ * Distributed under the Boost Software License, Version 1.0. (See
20
+ * accompanying file LICENSE_1_0.txt or copy at
21
+ * http://www.boost.org/LICENSE_1_0.txt)
22
+ */
23
+
24
+ #pragma once
25
+
26
+ #include <thrust/detail/config.h>
27
+ #include <thrust/pair.h>
28
+ #include <thrust/random/uniform_real_distribution.h>
29
+ #include <limits>
30
+ #include <cmath>
31
+
32
+ THRUST_NAMESPACE_BEGIN
33
+ namespace random
34
+ {
35
+ namespace detail
36
+ {
37
+
38
+ // this version samples the normal distribution directly
39
+ // and uses the non-standard math function erfcinv
40
+ template<typename RealType>
41
+ class normal_distribution_nvcc
42
+ {
43
+ protected:
44
+ template<typename UniformRandomNumberGenerator>
45
+ __host__ __device__
46
+ RealType sample(UniformRandomNumberGenerator &urng, const RealType mean, const RealType stddev)
47
+ {
48
+ using uint_type = typename UniformRandomNumberGenerator::result_type;
49
+ constexpr uint_type urng_range = UniformRandomNumberGenerator::max - UniformRandomNumberGenerator::min;
50
+
51
+ // Constants for conversion
52
+ constexpr RealType S1 = static_cast<RealType>(1. / static_cast<double>(urng_range));
53
+ constexpr RealType S2 = S1 / 2;
54
+
55
+ RealType S3 = static_cast<RealType>(-1.4142135623730950488016887242097); // -sqrt(2)
56
+
57
+ // Get the integer value
58
+ uint_type u = urng() - UniformRandomNumberGenerator::min;
59
+
60
+ // Ensure the conversion to float will give a value in the range [0,0.5)
61
+ if(u > (urng_range / 2))
62
+ {
63
+ u = urng_range - u;
64
+ S3 = -S3;
65
+ }
66
+
67
+ // Convert to floating point in [0,0.5)
68
+ RealType p = u*S1 + S2;
69
+
70
+ // Apply inverse error function
71
+ return mean + stddev * S3 * erfcinv(2 * p);
72
+ }
73
+
74
+ // no-op
75
+ __host__ __device__
76
+ void reset() {}
77
+ };
78
+
79
+ // this version samples the normal distribution using
80
+ // Marsaglia's "polar method"
81
+ template<typename RealType>
82
+ class normal_distribution_portable
83
+ {
84
+ protected:
85
+ normal_distribution_portable()
86
+ : m_r1(), m_r2(), m_cached_rho(), m_valid(false)
87
+ {}
88
+
89
+ normal_distribution_portable(const normal_distribution_portable &other)
90
+ : m_r1(other.m_r1), m_r2(other.m_r2), m_cached_rho(other.m_cached_rho), m_valid(other.m_valid)
91
+ {}
92
+
93
+ void reset()
94
+ {
95
+ m_valid = false;
96
+ }
97
+
98
+ // note that we promise to call this member function with the same mean and stddev
99
+ template<typename UniformRandomNumberGenerator>
100
+ __host__ __device__
101
+ RealType sample(UniformRandomNumberGenerator &urng, const RealType mean, const RealType stddev)
102
+ {
103
+ // implementation from Boost
104
+ // allow for Koenig lookup
105
+ using std::sqrt; using std::log; using std::sin; using std::cos;
106
+
107
+ if(!m_valid)
108
+ {
109
+ uniform_real_distribution<RealType> u01;
110
+ m_r1 = u01(urng);
111
+ m_r2 = u01(urng);
112
+ m_cached_rho = sqrt(-RealType(2) * log(RealType(1)-m_r2));
113
+
114
+ m_valid = true;
115
+ }
116
+ else
117
+ {
118
+ m_valid = false;
119
+ }
120
+
121
+ const RealType pi = RealType(3.14159265358979323846);
122
+
123
+ RealType result = m_cached_rho * (m_valid ?
124
+ cos(RealType(2)*pi*m_r1) :
125
+ sin(RealType(2)*pi*m_r1));
126
+
127
+ return mean + stddev * result;
128
+ }
129
+
130
+ private:
131
+ RealType m_r1, m_r2, m_cached_rho;
132
+ bool m_valid;
133
+ };
134
+
135
+ template<typename RealType>
136
+ struct normal_distribution_base
137
+ {
138
+ #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC && !defined(_NVHPC_CUDA)
139
+ typedef normal_distribution_nvcc<RealType> type;
140
+ #else
141
+ typedef normal_distribution_portable<RealType> type;
142
+ #endif
143
+ };
144
+
145
+ } // end detail
146
+ } // end random
147
+ THRUST_NAMESPACE_END
148
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/random_core_access.h ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ THRUST_NAMESPACE_BEGIN
22
+
23
+ namespace random
24
+ {
25
+
26
+ namespace detail
27
+ {
28
+
29
+ struct random_core_access
30
+ {
31
+
32
+ template<typename OStream, typename EngineOrDistribution>
33
+ static OStream &stream_out(OStream &os, const EngineOrDistribution &x)
34
+ {
35
+ return x.stream_out(os);
36
+ }
37
+
38
+ template<typename IStream, typename EngineOrDistribution>
39
+ static IStream &stream_in(IStream &is, EngineOrDistribution &x)
40
+ {
41
+ return x.stream_in(is);
42
+ }
43
+
44
+ template<typename EngineOrDistribution>
45
+ __host__ __device__
46
+ static bool equal(const EngineOrDistribution &lhs, const EngineOrDistribution &rhs)
47
+ {
48
+ return lhs.equal(rhs);
49
+ }
50
+
51
+ }; // end random_core_access
52
+
53
+ } // end detail
54
+
55
+ } // end random
56
+
57
+ THRUST_NAMESPACE_END
58
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/subtract_with_carry_engine.inl ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2021 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/random/linear_congruential_engine.h>
22
+ #include <thrust/random/subtract_with_carry_engine.h>
23
+ #include <thrust/random/detail/mod.h>
24
+ #include <thrust/random/detail/random_core_access.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ namespace random
29
+ {
30
+
31
+
32
+ template<typename UIntType, size_t w, size_t s, size_t r>
33
+ __host__ __device__
34
+ subtract_with_carry_engine<UIntType,w,s,r>
35
+ ::subtract_with_carry_engine(result_type value)
36
+ {
37
+ seed(value);
38
+ } // end subtract_with_carry_engine::subtract_with_carry_engine()
39
+
40
+
41
+ template<typename UIntType, size_t w, size_t s, size_t r>
42
+ __host__ __device__
43
+ void subtract_with_carry_engine<UIntType,w,s,r>
44
+ ::seed(result_type value)
45
+ {
46
+ thrust::random::linear_congruential_engine<result_type,
47
+ 40014u, 0u, 2147483563u> e(value == 0u ? default_seed : value);
48
+
49
+ // initialize state
50
+ for(size_t i = 0; i < long_lag; ++i)
51
+ {
52
+ m_x[i] = detail::mod<UIntType, 1, 0, modulus>(e());
53
+ } // end for i
54
+
55
+ m_carry = (m_x[long_lag-1] == 0);
56
+ m_k = 0;
57
+ } // end subtract_with_carry_engine::seed()
58
+
59
+
60
+ template<typename UIntType, size_t w, size_t s, size_t r>
61
+ __host__ __device__
62
+ typename subtract_with_carry_engine<UIntType,w,s,r>::result_type
63
+ subtract_with_carry_engine<UIntType,w,s,r>
64
+ ::operator()(void)
65
+ {
66
+ // XXX we probably need to cache these m_x[m_k] in a register
67
+ // maybe we need to cache the use of all member variables
68
+ int short_index = m_k - short_lag;
69
+ if(short_index < 0)
70
+ short_index += long_lag;
71
+ result_type xi;
72
+ if (m_x[short_index] >= m_x[m_k] + m_carry)
73
+ {
74
+ // x(n) >= 0
75
+ xi = m_x[short_index] - m_x[m_k] - m_carry;
76
+ m_carry = 0;
77
+ }
78
+ else
79
+ {
80
+ // x(n) < 0
81
+ xi = modulus - m_x[m_k] - m_carry + m_x[short_index];
82
+ m_carry = 1;
83
+ }
84
+ m_x[m_k] = xi;
85
+ ++m_k;
86
+ if(m_k >= long_lag)
87
+ m_k = 0;
88
+ return xi;
89
+ } // end subtract_with_carry_engine::operator()()
90
+
91
+
92
+ template<typename UIntType, size_t w, size_t s, size_t r>
93
+ __host__ __device__
94
+ void subtract_with_carry_engine<UIntType,w,s,r>
95
+ ::discard(unsigned long long z)
96
+ {
97
+ for(; z > 0; --z)
98
+ {
99
+ this->operator()();
100
+ } // end for
101
+ } // end subtract_with_carry_engine::discard()
102
+
103
+
104
+ template<typename UIntType, size_t w, size_t s, size_t r>
105
+ template<typename CharT, typename Traits>
106
+ std::basic_ostream<CharT,Traits>& subtract_with_carry_engine<UIntType,w,s,r>
107
+ ::stream_out(std::basic_ostream<CharT,Traits> &os) const
108
+ {
109
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
110
+ typedef typename ostream_type::ios_base ios_base;
111
+
112
+ const typename ios_base::fmtflags flags = os.flags();
113
+ const CharT fill = os.fill();
114
+ const CharT space = os.widen(' ');
115
+ os.flags(ios_base::dec | ios_base::fixed | ios_base::left);
116
+ os.fill(space);
117
+
118
+ const UIntType long_lag_ = r;
119
+
120
+ for(size_t i = 0; i < r; ++i)
121
+ os << m_x[(i + m_k) % long_lag_] << space;
122
+ os << m_carry;
123
+
124
+ os.flags(flags);
125
+ os.fill(fill);
126
+ return os;
127
+ }
128
+
129
+
130
+ template<typename UIntType, size_t w, size_t s, size_t r>
131
+ template<typename CharType, typename Traits>
132
+ std::basic_istream<CharType,Traits>& subtract_with_carry_engine<UIntType,w,s,r>
133
+ ::stream_in(std::basic_istream<CharType,Traits> &is)
134
+ {
135
+ typedef std::basic_istream<CharType,Traits> istream_type;
136
+ typedef typename istream_type::ios_base ios_base;
137
+
138
+ const typename ios_base::fmtflags flags = is.flags();
139
+ is.flags(ios_base::dec | ios_base::skipws);
140
+
141
+ for(size_t i = 0; i < r; ++i)
142
+ is >> m_x[i];
143
+ is >> m_carry;
144
+
145
+ m_k = 0;
146
+
147
+ is.flags(flags);
148
+ return is;
149
+ }
150
+
151
+
152
+ template<typename UIntType, size_t w, size_t s, size_t r>
153
+ __host__ __device__
154
+ bool subtract_with_carry_engine<UIntType,w,s,r>
155
+ ::equal(const subtract_with_carry_engine<UIntType,w,s,r> &rhs) const
156
+ {
157
+ const UIntType long_lag_ = r;
158
+
159
+ bool result = true;
160
+ for(size_t i = 0; i < r; ++i)
161
+ {
162
+ result &= (m_x[(i + m_k) % long_lag_] == rhs.m_x[(i + rhs.m_k) % long_lag_]);
163
+ }
164
+
165
+ // XXX not sure if this last check is necessary
166
+ result &= (m_carry == rhs.m_carry);
167
+
168
+ return result;
169
+ }
170
+
171
+
172
+ template<typename UIntType, size_t w, size_t s, size_t r,
173
+ typename CharT, typename Traits>
174
+ std::basic_ostream<CharT,Traits>&
175
+ operator<<(std::basic_ostream<CharT,Traits> &os,
176
+ const subtract_with_carry_engine<UIntType,w,s,r> &e)
177
+ {
178
+ return thrust::random::detail::random_core_access::stream_out(os,e);
179
+ }
180
+
181
+
182
+ template<typename UIntType, size_t w, size_t s, size_t r,
183
+ typename CharType, typename Traits>
184
+ std::basic_istream<CharType,Traits>&
185
+ operator>>(std::basic_istream<CharType,Traits> &is,
186
+ subtract_with_carry_engine<UIntType,w,s,r> &e)
187
+ {
188
+ return thrust::random::detail::random_core_access::stream_in(is,e);
189
+ }
190
+
191
+
192
+ template<typename UIntType, size_t w, size_t s, size_t r>
193
+ __host__ __device__
194
+ bool operator==(const subtract_with_carry_engine<UIntType,w,s,r> &lhs,
195
+ const subtract_with_carry_engine<UIntType,w,s,r> &rhs)
196
+ {
197
+ return thrust::random::detail::random_core_access::equal(lhs,rhs);
198
+ }
199
+
200
+
201
+ template<typename UIntType, size_t w, size_t s, size_t r>
202
+ __host__ __device__
203
+ bool operator!=(const subtract_with_carry_engine<UIntType,w,s,r> &lhs,
204
+ const subtract_with_carry_engine<UIntType,w,s,r> &rhs)
205
+ {
206
+ return !(lhs == rhs);
207
+ }
208
+
209
+
210
+ } // end random
211
+
212
+ THRUST_NAMESPACE_END
213
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/uniform_int_distribution.inl ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2021 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/random/uniform_int_distribution.h>
22
+ #include <thrust/random/uniform_real_distribution.h>
23
+ #include <thrust/detail/type_traits.h>
24
+
25
+ THRUST_NAMESPACE_BEGIN
26
+
27
+ namespace random
28
+ {
29
+
30
+
31
+ template<typename IntType>
32
+ __host__ __device__
33
+ uniform_int_distribution<IntType>
34
+ ::uniform_int_distribution(IntType a, IntType b)
35
+ :m_param(a,b)
36
+ {
37
+ } // end uniform_int_distribution::uniform_int_distribution()
38
+
39
+
40
+ template<typename IntType>
41
+ __host__ __device__
42
+ uniform_int_distribution<IntType>
43
+ ::uniform_int_distribution(const param_type &parm)
44
+ :m_param(parm)
45
+ {
46
+ } // end uniform_int_distribution::uniform_int_distribution()
47
+
48
+
49
+ template<typename IntType>
50
+ __host__ __device__
51
+ void uniform_int_distribution<IntType>
52
+ ::reset(void)
53
+ {
54
+ } // end uniform_int_distribution::reset()
55
+
56
+
57
+ template<typename IntType>
58
+ template<typename UniformRandomNumberGenerator>
59
+ __host__ __device__
60
+ typename uniform_int_distribution<IntType>::result_type
61
+ uniform_int_distribution<IntType>
62
+ ::operator()(UniformRandomNumberGenerator &urng)
63
+ {
64
+ return operator()(urng, m_param);
65
+ } // end uniform_int_distribution::operator()()
66
+
67
+
68
+ template<typename IntType>
69
+ template<typename UniformRandomNumberGenerator>
70
+ __host__ __device__
71
+ typename uniform_int_distribution<IntType>::result_type
72
+ uniform_int_distribution<IntType>
73
+ ::operator()(UniformRandomNumberGenerator &urng, const param_type &parm)
74
+ {
75
+ // XXX this implementation is somewhat hacky and will skip
76
+ // values if the range of the RNG is smaller than the range of the distribution
77
+ // we should improve this implementation in a later version
78
+
79
+ typedef typename thrust::detail::largest_available_float::type float_type;
80
+
81
+ const float_type real_min(static_cast<float_type>(parm.first));
82
+ const float_type real_max(static_cast<float_type>(parm.second));
83
+
84
+ // add one to the right end of the interval because it is half-open
85
+ // XXX adding 1.0 to a potentially large floating point number seems like a bad idea
86
+ uniform_real_distribution<float_type> real_dist(real_min, real_max + float_type(1));
87
+
88
+ return static_cast<result_type>(real_dist(urng));
89
+ } // end uniform_int_distribution::operator()()
90
+
91
+
92
+ template<typename IntType>
93
+ __host__ __device__
94
+ typename uniform_int_distribution<IntType>::result_type
95
+ uniform_int_distribution<IntType>
96
+ ::a(void) const
97
+ {
98
+ return m_param.first;
99
+ } // end uniform_int_distribution<IntType>::a()
100
+
101
+
102
+ template<typename IntType>
103
+ __host__ __device__
104
+ typename uniform_int_distribution<IntType>::result_type
105
+ uniform_int_distribution<IntType>
106
+ ::b(void) const
107
+ {
108
+ return m_param.second;
109
+ } // end uniform_int_distribution::b()
110
+
111
+
112
+ template<typename IntType>
113
+ __host__ __device__
114
+ typename uniform_int_distribution<IntType>::param_type
115
+ uniform_int_distribution<IntType>
116
+ ::param(void) const
117
+ {
118
+ return m_param;
119
+ } // end uniform_int_distribution::param()
120
+
121
+
122
+ template<typename IntType>
123
+ __host__ __device__
124
+ void uniform_int_distribution<IntType>
125
+ ::param(const param_type &parm)
126
+ {
127
+ m_param = parm;
128
+ } // end uniform_int_distribution::param()
129
+
130
+
131
+ template<typename IntType>
132
+ __host__ __device__
133
+ typename uniform_int_distribution<IntType>::result_type
134
+ uniform_int_distribution<IntType>
135
+ ::min THRUST_PREVENT_MACRO_SUBSTITUTION (void) const
136
+ {
137
+ return a();
138
+ } // end uniform_int_distribution::min()
139
+
140
+
141
+ template<typename IntType>
142
+ __host__ __device__
143
+ typename uniform_int_distribution<IntType>::result_type
144
+ uniform_int_distribution<IntType>
145
+ ::max THRUST_PREVENT_MACRO_SUBSTITUTION (void) const
146
+ {
147
+ return b();
148
+ } // end uniform_int_distribution::max()
149
+
150
+
151
+ template<typename IntType>
152
+ __host__ __device__
153
+ bool uniform_int_distribution<IntType>
154
+ ::equal(const uniform_int_distribution &rhs) const
155
+ {
156
+ return param() == rhs.param();
157
+ }
158
+
159
+
160
+ template<typename IntType>
161
+ template<typename CharT, typename Traits>
162
+ std::basic_ostream<CharT,Traits>&
163
+ uniform_int_distribution<IntType>
164
+ ::stream_out(std::basic_ostream<CharT,Traits> &os) const
165
+ {
166
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
167
+ typedef typename ostream_type::ios_base ios_base;
168
+
169
+ // save old flags and fill character
170
+ const typename ios_base::fmtflags flags = os.flags();
171
+ const CharT fill = os.fill();
172
+
173
+ const CharT space = os.widen(' ');
174
+ os.flags(ios_base::dec | ios_base::fixed | ios_base::left);
175
+ os.fill(space);
176
+
177
+ os << a() << space << b();
178
+
179
+ // restore old flags and fill character
180
+ os.flags(flags);
181
+ os.fill(fill);
182
+ return os;
183
+ }
184
+
185
+
186
+ template<typename IntType>
187
+ template<typename CharT, typename Traits>
188
+ std::basic_istream<CharT,Traits>&
189
+ uniform_int_distribution<IntType>
190
+ ::stream_in(std::basic_istream<CharT,Traits> &is)
191
+ {
192
+ typedef std::basic_istream<CharT,Traits> istream_type;
193
+ typedef typename istream_type::ios_base ios_base;
194
+
195
+ // save old flags
196
+ const typename ios_base::fmtflags flags = is.flags();
197
+
198
+ is.flags(ios_base::skipws);
199
+
200
+ is >> m_param.first >> m_param.second;
201
+
202
+ // restore old flags
203
+ is.flags(flags);
204
+ return is;
205
+ }
206
+
207
+
208
+ template<typename IntType>
209
+ __host__ __device__
210
+ bool operator==(const uniform_int_distribution<IntType> &lhs,
211
+ const uniform_int_distribution<IntType> &rhs)
212
+ {
213
+ return thrust::random::detail::random_core_access::equal(lhs,rhs);
214
+ }
215
+
216
+
217
+ template<typename IntType>
218
+ __host__ __device__
219
+ bool operator!=(const uniform_int_distribution<IntType> &lhs,
220
+ const uniform_int_distribution<IntType> &rhs)
221
+ {
222
+ return !(lhs == rhs);
223
+ }
224
+
225
+
226
+ template<typename IntType,
227
+ typename CharT, typename Traits>
228
+ std::basic_ostream<CharT,Traits>&
229
+ operator<<(std::basic_ostream<CharT,Traits> &os,
230
+ const uniform_int_distribution<IntType> &d)
231
+ {
232
+ return thrust::random::detail::random_core_access::stream_out(os,d);
233
+ }
234
+
235
+
236
+ template<typename IntType,
237
+ typename CharT, typename Traits>
238
+ std::basic_istream<CharT,Traits>&
239
+ operator>>(std::basic_istream<CharT,Traits> &is,
240
+ uniform_int_distribution<IntType> &d)
241
+ {
242
+ return thrust::random::detail::random_core_access::stream_in(is,d);
243
+ }
244
+
245
+
246
+ } // end random
247
+
248
+ THRUST_NAMESPACE_END
249
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/uniform_real_distribution.inl ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2021 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/random/uniform_real_distribution.h>
22
+
23
+ THRUST_NAMESPACE_BEGIN
24
+
25
+ namespace random
26
+ {
27
+
28
+
29
+ template<typename RealType>
30
+ __host__ __device__
31
+ uniform_real_distribution<RealType>
32
+ ::uniform_real_distribution(RealType a, RealType b)
33
+ :m_param(a,b)
34
+ {
35
+ } // end uniform_real_distribution::uniform_real_distribution()
36
+
37
+ template<typename RealType>
38
+ __host__ __device__
39
+ uniform_real_distribution<RealType>
40
+ ::uniform_real_distribution(const param_type &parm)
41
+ :m_param(parm)
42
+ {
43
+ } // end uniform_real_distribution::uniform_real_distribution()
44
+
45
+ template<typename RealType>
46
+ __host__ __device__
47
+ void uniform_real_distribution<RealType>
48
+ ::reset(void)
49
+ {
50
+ } // end uniform_real_distribution::reset()
51
+
52
+ template<typename RealType>
53
+ template<typename UniformRandomNumberGenerator>
54
+ __host__ __device__
55
+ typename uniform_real_distribution<RealType>::result_type
56
+ uniform_real_distribution<RealType>
57
+ ::operator()(UniformRandomNumberGenerator &urng)
58
+ {
59
+ return operator()(urng, m_param);
60
+ } // end uniform_real::operator()()
61
+
62
+ template<typename RealType>
63
+ template<typename UniformRandomNumberGenerator>
64
+ __host__ __device__
65
+ typename uniform_real_distribution<RealType>::result_type
66
+ uniform_real_distribution<RealType>
67
+ ::operator()(UniformRandomNumberGenerator &urng,
68
+ const param_type &parm)
69
+ {
70
+ // call the urng & map its result to [0,1)
71
+ result_type result = static_cast<result_type>(urng() - UniformRandomNumberGenerator::min);
72
+
73
+ // adding one to the denominator ensures that the interval is half-open at 1.0
74
+ // XXX adding 1.0 to a potentially large floating point number seems like a bad idea
75
+ // XXX OTOH adding 1 to what is potentially UINT_MAX also seems like a bad idea
76
+ // XXX we could statically check if 1u + (max - min) is representable and do that, otherwise use the current implementation
77
+ result /= (result_type(1) + static_cast<result_type>(UniformRandomNumberGenerator::max - UniformRandomNumberGenerator::min));
78
+
79
+ return (result * (parm.second - parm.first)) + parm.first;
80
+ } // end uniform_real::operator()()
81
+
82
+ template<typename RealType>
83
+ __host__ __device__
84
+ typename uniform_real_distribution<RealType>::result_type
85
+ uniform_real_distribution<RealType>
86
+ ::a(void) const
87
+ {
88
+ return m_param.first;
89
+ } // end uniform_real::a()
90
+
91
+ template<typename RealType>
92
+ __host__ __device__
93
+ typename uniform_real_distribution<RealType>::result_type
94
+ uniform_real_distribution<RealType>
95
+ ::b(void) const
96
+ {
97
+ return m_param.second;
98
+ } // end uniform_real_distribution::b()
99
+
100
+ template<typename RealType>
101
+ __host__ __device__
102
+ typename uniform_real_distribution<RealType>::param_type
103
+ uniform_real_distribution<RealType>
104
+ ::param(void) const
105
+ {
106
+ return m_param;;
107
+ } // end uniform_real_distribution::param()
108
+
109
+ template<typename RealType>
110
+ __host__ __device__
111
+ void uniform_real_distribution<RealType>
112
+ ::param(const param_type &parm)
113
+ {
114
+ m_param = parm;
115
+ } // end uniform_real_distribution::param()
116
+
117
+ template<typename RealType>
118
+ __host__ __device__
119
+ typename uniform_real_distribution<RealType>::result_type
120
+ uniform_real_distribution<RealType>
121
+ ::min THRUST_PREVENT_MACRO_SUBSTITUTION (void) const
122
+ {
123
+ return a();
124
+ } // end uniform_real_distribution::min()
125
+
126
+ template<typename RealType>
127
+ __host__ __device__
128
+ typename uniform_real_distribution<RealType>::result_type
129
+ uniform_real_distribution<RealType>
130
+ ::max THRUST_PREVENT_MACRO_SUBSTITUTION (void) const
131
+ {
132
+ return b();
133
+ } // end uniform_real_distribution::max()
134
+
135
+
136
+ template<typename RealType>
137
+ __host__ __device__
138
+ bool uniform_real_distribution<RealType>
139
+ ::equal(const uniform_real_distribution &rhs) const
140
+ {
141
+ return m_param == rhs.param();
142
+ }
143
+
144
+
145
+ template<typename RealType>
146
+ template<typename CharT, typename Traits>
147
+ std::basic_ostream<CharT,Traits>&
148
+ uniform_real_distribution<RealType>
149
+ ::stream_out(std::basic_ostream<CharT,Traits> &os) const
150
+ {
151
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
152
+ typedef typename ostream_type::ios_base ios_base;
153
+
154
+ // save old flags and fill character
155
+ const typename ios_base::fmtflags flags = os.flags();
156
+ const CharT fill = os.fill();
157
+
158
+ const CharT space = os.widen(' ');
159
+ os.flags(ios_base::dec | ios_base::fixed | ios_base::left);
160
+ os.fill(space);
161
+
162
+ os << a() << space << b();
163
+
164
+ // restore old flags and fill character
165
+ os.flags(flags);
166
+ os.fill(fill);
167
+ return os;
168
+ }
169
+
170
+
171
+ template<typename RealType>
172
+ template<typename CharT, typename Traits>
173
+ std::basic_istream<CharT,Traits>&
174
+ uniform_real_distribution<RealType>
175
+ ::stream_in(std::basic_istream<CharT,Traits> &is)
176
+ {
177
+ typedef std::basic_istream<CharT,Traits> istream_type;
178
+ typedef typename istream_type::ios_base ios_base;
179
+
180
+ // save old flags
181
+ const typename ios_base::fmtflags flags = is.flags();
182
+
183
+ is.flags(ios_base::skipws);
184
+
185
+ is >> m_param.first >> m_param.second;
186
+
187
+ // restore old flags
188
+ is.flags(flags);
189
+ return is;
190
+ }
191
+
192
+
193
+ template<typename RealType>
194
+ __host__ __device__
195
+ bool operator==(const uniform_real_distribution<RealType> &lhs,
196
+ const uniform_real_distribution<RealType> &rhs)
197
+ {
198
+ return thrust::random::detail::random_core_access::equal(lhs,rhs);
199
+ }
200
+
201
+
202
+ template<typename RealType>
203
+ __host__ __device__
204
+ bool operator!=(const uniform_real_distribution<RealType> &lhs,
205
+ const uniform_real_distribution<RealType> &rhs)
206
+ {
207
+ return !(lhs == rhs);
208
+ }
209
+
210
+
211
+ template<typename RealType,
212
+ typename CharT, typename Traits>
213
+ std::basic_ostream<CharT,Traits>&
214
+ operator<<(std::basic_ostream<CharT,Traits> &os,
215
+ const uniform_real_distribution<RealType> &d)
216
+ {
217
+ return thrust::random::detail::random_core_access::stream_out(os,d);
218
+ }
219
+
220
+
221
+ template<typename RealType,
222
+ typename CharT, typename Traits>
223
+ std::basic_istream<CharT,Traits>&
224
+ operator>>(std::basic_istream<CharT,Traits> &is,
225
+ uniform_real_distribution<RealType> &d)
226
+ {
227
+ return thrust::random::detail::random_core_access::stream_in(is,d);
228
+ }
229
+
230
+
231
+ } // end random
232
+
233
+ THRUST_NAMESPACE_END
234
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/xor_combine_engine.inl ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2021 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/random/xor_combine_engine.h>
22
+ #include <thrust/random/detail/random_core_access.h>
23
+
24
+ THRUST_NAMESPACE_BEGIN
25
+
26
+ namespace random
27
+ {
28
+
29
+ template<typename Engine1, size_t s1,
30
+ typename Engine2, size_t s2>
31
+ __host__ __device__
32
+ xor_combine_engine<Engine1,s1,Engine2,s2>
33
+ ::xor_combine_engine(void)
34
+ :m_b1(),m_b2()
35
+ {
36
+ } // end xor_combine_engine::xor_combine_engine()
37
+
38
+ template<typename Engine1, size_t s1,
39
+ typename Engine2, size_t s2>
40
+ __host__ __device__
41
+ xor_combine_engine<Engine1,s1,Engine2,s2>
42
+ ::xor_combine_engine(const base1_type &urng1, const base2_type &urng2)
43
+ :m_b1(urng1),m_b2(urng2)
44
+ {
45
+ } // end xor_combine_engine::xor_combine_engine()
46
+
47
+ template<typename Engine1, size_t s1,
48
+ typename Engine2, size_t s2>
49
+ __host__ __device__
50
+ xor_combine_engine<Engine1,s1,Engine2,s2>
51
+ ::xor_combine_engine(result_type s)
52
+ :m_b1(s),m_b2(s)
53
+ {
54
+ } // end xor_combine_engine::xor_combine_engine()
55
+
56
+ template<typename Engine1, size_t s1,
57
+ typename Engine2, size_t s2>
58
+ __host__ __device__
59
+ void xor_combine_engine<Engine1,s1,Engine2,s2>
60
+ ::seed(void)
61
+ {
62
+ m_b1.seed();
63
+ m_b2.seed();
64
+ } // end xor_combine_engine::seed()
65
+
66
+ template<typename Engine1, size_t s1,
67
+ typename Engine2, size_t s2>
68
+ __host__ __device__
69
+ void xor_combine_engine<Engine1,s1,Engine2,s2>
70
+ ::seed(result_type s)
71
+ {
72
+ m_b1.seed(s);
73
+ m_b2.seed(s);
74
+ } // end xor_combine_engine::seed()
75
+
76
+ template<typename Engine1, size_t s1,
77
+ typename Engine2, size_t s2>
78
+ __host__ __device__
79
+ const typename xor_combine_engine<Engine1,s1,Engine2,s2>::base1_type &
80
+ xor_combine_engine<Engine1,s1,Engine2,s2>
81
+ ::base1(void) const
82
+ {
83
+ return m_b1;
84
+ } // end xor_combine_engine::base1()
85
+
86
+ template<typename Engine1, size_t s1,
87
+ typename Engine2, size_t s2>
88
+ __host__ __device__
89
+ const typename xor_combine_engine<Engine1,s1,Engine2,s2>::base2_type &
90
+ xor_combine_engine<Engine1,s1,Engine2,s2>
91
+ ::base2(void) const
92
+ {
93
+ return m_b2;
94
+ } // end xor_combine_engine::base2()
95
+
96
+ template<typename Engine1, size_t s1,
97
+ typename Engine2, size_t s2>
98
+ __host__ __device__
99
+ typename xor_combine_engine<Engine1,s1,Engine2,s2>::result_type
100
+ xor_combine_engine<Engine1,s1,Engine2,s2>
101
+ ::operator()(void)
102
+ {
103
+ return (result_type(m_b1() - base1_type::min) << shift1) ^
104
+ (result_type(m_b2() - base2_type::min) << shift2);
105
+ } // end xor_combine_engine::operator()()
106
+
107
+ template<typename Engine1, size_t s1,
108
+ typename Engine2, size_t s2>
109
+ __host__ __device__
110
+ void xor_combine_engine<Engine1, s1, Engine2, s2>
111
+ ::discard(unsigned long long z)
112
+ {
113
+ for(; z > 0; --z)
114
+ {
115
+ this->operator()();
116
+ } // end for
117
+ } // end xor_combine_engine::discard()
118
+
119
+
120
+ template<typename Engine1, size_t s1, typename Engine2, size_t s2>
121
+ template<typename CharT, typename Traits>
122
+ std::basic_ostream<CharT,Traits>& xor_combine_engine<Engine1,s1,Engine2,s2>
123
+ ::stream_out(std::basic_ostream<CharT,Traits> &os) const
124
+ {
125
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
126
+ typedef typename ostream_type::ios_base ios_base;
127
+
128
+ // save old flags and fill character
129
+ const typename ios_base::fmtflags flags = os.flags();
130
+ const CharT fill = os.fill();
131
+
132
+ const CharT space = os.widen(' ');
133
+ os.flags(ios_base::dec | ios_base::fixed | ios_base::left);
134
+ os.fill(space);
135
+
136
+ // output each base engine in turn
137
+ os << base1() << space << base2();
138
+
139
+ // restore old flags and fill character
140
+ os.flags(flags);
141
+ os.fill(fill);
142
+ return os;
143
+ }
144
+
145
+
146
+ template<typename Engine1, size_t s1, typename Engine2, size_t s2>
147
+ template<typename CharT, typename Traits>
148
+ std::basic_istream<CharT,Traits>& xor_combine_engine<Engine1,s1,Engine2,s2>
149
+ ::stream_in(std::basic_istream<CharT,Traits> &is)
150
+ {
151
+ typedef std::basic_istream<CharT,Traits> istream_type;
152
+ typedef typename istream_type::ios_base ios_base;
153
+
154
+ // save old flags
155
+ const typename ios_base::fmtflags flags = is.flags();
156
+
157
+ is.flags(ios_base::skipws);
158
+
159
+ // input each base engine in turn
160
+ is >> m_b1 >> m_b2;
161
+
162
+ // restore old flags
163
+ is.flags(flags);
164
+ return is;
165
+ }
166
+
167
+
168
+ template<typename Engine1, size_t s1, typename Engine2, size_t s2>
169
+ __host__ __device__
170
+ bool xor_combine_engine<Engine1,s1,Engine2,s2>
171
+ ::equal(const xor_combine_engine<Engine1,s1,Engine2,s2> &rhs) const
172
+ {
173
+ return (m_b1 == rhs.m_b1) && (m_b2 == rhs.m_b2);
174
+ }
175
+
176
+
177
+ template<typename Engine1, size_t s1, typename Engine2, size_t s2,
178
+ typename CharT, typename Traits>
179
+ std::basic_ostream<CharT,Traits>&
180
+ operator<<(std::basic_ostream<CharT,Traits> &os,
181
+ const xor_combine_engine<Engine1,s1,Engine2,s2> &e)
182
+ {
183
+ return thrust::random::detail::random_core_access::stream_out(os,e);
184
+ }
185
+
186
+
187
+ template<typename Engine1, size_t s1, typename Engine2, size_t s2,
188
+ typename CharT, typename Traits>
189
+ std::basic_istream<CharT,Traits>&
190
+ operator>>(std::basic_istream<CharT,Traits> &is,
191
+ xor_combine_engine<Engine1,s1,Engine2,s2> &e)
192
+ {
193
+ return thrust::random::detail::random_core_access::stream_in(is,e);
194
+ }
195
+
196
+
197
+ template<typename Engine1, size_t s1, typename Engine2, size_t s2>
198
+ __host__ __device__
199
+ bool operator==(const xor_combine_engine<Engine1,s1,Engine2,s2> &lhs,
200
+ const xor_combine_engine<Engine1,s1,Engine2,s2> &rhs)
201
+ {
202
+ return thrust::random::detail::random_core_access::equal(lhs,rhs);
203
+ }
204
+
205
+
206
+ template<typename Engine1, size_t s1, typename Engine2, size_t s2>
207
+ __host__ __device__
208
+ bool operator!=(const xor_combine_engine<Engine1,s1,Engine2,s2> &lhs,
209
+ const xor_combine_engine<Engine1,s1,Engine2,s2> &rhs)
210
+ {
211
+ return !(lhs == rhs);
212
+ }
213
+
214
+
215
+ } // end random
216
+
217
+ THRUST_NAMESPACE_END
218
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/detail/xor_combine_engine_max.h ADDED
@@ -0,0 +1,325 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/detail/type_traits.h>
22
+ #include <thrust/detail/mpl/math.h>
23
+ #include <limits>
24
+ #include <cstddef>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ namespace random
29
+ {
30
+
31
+ namespace detail
32
+ {
33
+
34
+
35
+ namespace math = thrust::detail::mpl::math;
36
+
37
+
38
+ namespace detail
39
+ {
40
+
41
+ // two cases for this function avoids compile-time warnings of overflow
42
+ template<typename UIntType, UIntType w,
43
+ UIntType lhs, UIntType rhs,
44
+ bool shift_will_overflow>
45
+ struct lshift_w
46
+ {
47
+ static const UIntType value = 0;
48
+ };
49
+
50
+
51
+ template<typename UIntType, UIntType w,
52
+ UIntType lhs, UIntType rhs>
53
+ struct lshift_w<UIntType,w,lhs,rhs,false>
54
+ {
55
+ static const UIntType value = lhs << rhs;
56
+ };
57
+
58
+ } // end detail
59
+
60
+
61
+ template<typename UIntType, UIntType w,
62
+ UIntType lhs, UIntType rhs>
63
+ struct lshift_w
64
+ {
65
+ static const bool shift_will_overflow = rhs >= w;
66
+
67
+ static const UIntType value = detail::lshift_w<UIntType, w, lhs, rhs, shift_will_overflow>::value;
68
+ };
69
+
70
+
71
+ template<typename UIntType, UIntType lhs, UIntType rhs>
72
+ struct lshift
73
+ : lshift_w<UIntType, std::numeric_limits<UIntType>::digits, lhs, rhs>
74
+ {};
75
+
76
+
77
+ template<typename UIntType, int p>
78
+ struct two_to_the_power
79
+ : lshift<UIntType, 1, p>
80
+ {};
81
+
82
+
83
+ template<typename result_type, result_type a, result_type b, int d>
84
+ class xor_combine_engine_max_aux_constants
85
+ {
86
+ public:
87
+ static const result_type two_to_the_d = two_to_the_power<result_type, d>::value;
88
+ static const result_type c = lshift<result_type, a, d>::value;
89
+
90
+ static const result_type t =
91
+ math::max<
92
+ result_type,
93
+ c,
94
+ b
95
+ >::value;
96
+
97
+ static const result_type u =
98
+ math::min<
99
+ result_type,
100
+ c,
101
+ b
102
+ >::value;
103
+
104
+ static const result_type p = math::log2<u>::value;
105
+ static const result_type two_to_the_p = two_to_the_power<result_type, p>::value;
106
+
107
+ static const result_type k = math::div<result_type, t, two_to_the_p>::value;
108
+ };
109
+
110
+
111
+ template<typename result_type, result_type, result_type, int> struct xor_combine_engine_max_aux;
112
+
113
+
114
+ template<typename result_type, result_type a, result_type b, int d>
115
+ struct xor_combine_engine_max_aux_case4
116
+ {
117
+ typedef xor_combine_engine_max_aux_constants<result_type,a,b,d> constants;
118
+
119
+ static const result_type k_plus_1_times_two_to_the_p =
120
+ lshift<
121
+ result_type,
122
+ math::plus<result_type,constants::k,1>::value,
123
+ constants::p
124
+ >::value;
125
+
126
+ static const result_type M =
127
+ xor_combine_engine_max_aux<
128
+ result_type,
129
+ math::div<
130
+ result_type,
131
+ math::mod<
132
+ result_type,
133
+ constants::u,
134
+ constants::two_to_the_p
135
+ >::value,
136
+ constants::two_to_the_p
137
+ >::value,
138
+ math::mod<
139
+ result_type,
140
+ constants::t,
141
+ constants::two_to_the_p
142
+ >::value,
143
+ d
144
+ >::value;
145
+
146
+ static const result_type value = math::plus<result_type, k_plus_1_times_two_to_the_p, M>::value;
147
+ };
148
+
149
+
150
+ template<typename result_type, result_type a, result_type b, int d>
151
+ struct xor_combine_engine_max_aux_case3
152
+ {
153
+ typedef xor_combine_engine_max_aux_constants<result_type,a,b,d> constants;
154
+
155
+ static const result_type k_plus_1_times_two_to_the_p =
156
+ lshift<
157
+ result_type,
158
+ math::plus<result_type,constants::k,1>::value,
159
+ constants::p
160
+ >::value;
161
+
162
+ static const result_type M =
163
+ xor_combine_engine_max_aux<
164
+ result_type,
165
+ math::div<
166
+ result_type,
167
+ math::mod<
168
+ result_type,
169
+ constants::t,
170
+ constants::two_to_the_p
171
+ >::value,
172
+ constants::two_to_the_p
173
+ >::value,
174
+ math::mod<
175
+ result_type,
176
+ constants::u,
177
+ constants::two_to_the_p
178
+ >::value,
179
+ d
180
+ >::value;
181
+
182
+ static const result_type value = math::plus<result_type, k_plus_1_times_two_to_the_p, M>::value;
183
+ };
184
+
185
+
186
+
187
+ template<typename result_type, result_type a, result_type b, int d>
188
+ struct xor_combine_engine_max_aux_case2
189
+ {
190
+ typedef xor_combine_engine_max_aux_constants<result_type,a,b,d> constants;
191
+
192
+ static const result_type k_plus_1_times_two_to_the_p =
193
+ lshift<
194
+ result_type,
195
+ math::plus<result_type,constants::k,1>::value,
196
+ constants::p
197
+ >::value;
198
+
199
+ static const result_type value =
200
+ math::minus<
201
+ result_type,
202
+ k_plus_1_times_two_to_the_p,
203
+ 1
204
+ >::value;
205
+ };
206
+
207
+
208
+ template<typename result_type, result_type a, result_type b, int d>
209
+ struct xor_combine_engine_max_aux_case1
210
+ {
211
+ static const result_type c = lshift<result_type, a, d>::value;
212
+
213
+ static const result_type value = math::plus<result_type,c,b>::value;
214
+ };
215
+
216
+
217
+ template<typename result_type, result_type a, result_type b, int d>
218
+ struct xor_combine_engine_max_aux_2
219
+ {
220
+ typedef xor_combine_engine_max_aux_constants<result_type,a,b,d> constants;
221
+
222
+ static const result_type value =
223
+ thrust::detail::eval_if<
224
+ // if k is odd...
225
+ math::is_odd<result_type, constants::k>::value,
226
+ thrust::detail::identity_<
227
+ thrust::detail::integral_constant<
228
+ result_type,
229
+ xor_combine_engine_max_aux_case2<result_type,a,b,d>::value
230
+ >
231
+ >,
232
+ thrust::detail::eval_if<
233
+ // otherwise if a * 2^3 >= b, then case 3
234
+ a * constants::two_to_the_d >= b,
235
+ thrust::detail::identity_<
236
+ thrust::detail::integral_constant<
237
+ result_type,
238
+ xor_combine_engine_max_aux_case3<result_type,a,b,d>::value
239
+ >
240
+ >,
241
+ // otherwise, case 4
242
+ thrust::detail::identity_<
243
+ thrust::detail::integral_constant<
244
+ result_type,
245
+ xor_combine_engine_max_aux_case4<result_type,a,b,d>::value
246
+ >
247
+ >
248
+ >
249
+ >::type::value;
250
+ };
251
+
252
+
253
+ template<typename result_type,
254
+ result_type a,
255
+ result_type b,
256
+ int d,
257
+ bool use_case1 = (a == 0) || (b < two_to_the_power<result_type,d>::value)>
258
+ struct xor_combine_engine_max_aux_1
259
+ : xor_combine_engine_max_aux_case1<result_type,a,b,d>
260
+ {};
261
+
262
+
263
+ template<typename result_type,
264
+ result_type a,
265
+ result_type b,
266
+ int d>
267
+ struct xor_combine_engine_max_aux_1<result_type,a,b,d,false>
268
+ : xor_combine_engine_max_aux_2<result_type,a,b,d>
269
+ {};
270
+
271
+
272
+ template<typename result_type,
273
+ result_type a,
274
+ result_type b,
275
+ int d>
276
+ struct xor_combine_engine_max_aux
277
+ : xor_combine_engine_max_aux_1<result_type,a,b,d>
278
+ {};
279
+
280
+
281
+ template<typename Engine1, size_t s1, typename Engine2, size_t s2, typename result_type>
282
+ struct xor_combine_engine_max
283
+ {
284
+ static const size_t w = std::numeric_limits<result_type>::digits;
285
+
286
+ static const result_type m1 =
287
+ math::min<
288
+ result_type,
289
+ result_type(Engine1::max - Engine1::min),
290
+ two_to_the_power<result_type, w-s1>::value - 1
291
+ >::value;
292
+
293
+ static const result_type m2 =
294
+ math::min<
295
+ result_type,
296
+ result_type(Engine2::max - Engine2::min),
297
+ two_to_the_power<result_type, w-s2>::value - 1
298
+ >::value;
299
+
300
+ static const result_type s = s1 - s2;
301
+
302
+ static const result_type M =
303
+ xor_combine_engine_max_aux<
304
+ result_type,
305
+ m1,
306
+ m2,
307
+ s
308
+ >::value;
309
+
310
+ // the value is M(m1,m2,s) lshift_w s2
311
+ static const result_type value =
312
+ lshift_w<
313
+ result_type,
314
+ w,
315
+ M,
316
+ s2
317
+ >::value;
318
+ }; // end xor_combine_engine_max
319
+
320
+ } // end detail
321
+
322
+ } // end random
323
+
324
+ THRUST_NAMESPACE_END
325
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/linear_congruential_engine.h ADDED
@@ -0,0 +1,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+
18
+ /*! \file linear_congruential_engine.h
19
+ * \brief A linear congruential pseudorandom number engine.
20
+ */
21
+
22
+ #pragma once
23
+
24
+ #include <thrust/detail/config.h>
25
+ #include <iostream>
26
+ #include <thrust/detail/cstdint.h>
27
+ #include <thrust/random/detail/random_core_access.h>
28
+ #include <thrust/random/detail/linear_congruential_engine_discard.h>
29
+
30
+ THRUST_NAMESPACE_BEGIN
31
+
32
+ namespace random
33
+ {
34
+
35
+ /*! \addtogroup random_number_engine_templates Random Number Engine Class Templates
36
+ * \ingroup random
37
+ * \{
38
+ */
39
+
40
+ /*! \class linear_congruential_engine
41
+ * \brief A \p linear_congruential_engine random number engine produces unsigned integer
42
+ * random numbers using a linear congruential random number generation algorithm.
43
+ *
44
+ * The generation algorithm has the form <tt>x_i = (a * x_{i-1} + c) mod m</tt>.
45
+ *
46
+ * \tparam UIntType The type of unsigned integer to produce.
47
+ * \tparam a The multiplier used in the generation algorithm.
48
+ * \tparam c The increment used in the generation algorithm.
49
+ * \tparam m The modulus used in the generation algorithm.
50
+ *
51
+ * \note Inexperienced users should not use this class template directly. Instead, use
52
+ * \p minstd_rand or \p minstd_rand0.
53
+ *
54
+ * The following code snippet shows examples of use of a \p linear_congruential_engine instance:
55
+ *
56
+ * \code
57
+ * #include <thrust/random/linear_congruential_engine.h>
58
+ * #include <iostream>
59
+ *
60
+ * int main(void)
61
+ * {
62
+ * // create a minstd_rand object, which is an instance of linear_congruential_engine
63
+ * thrust::minstd_rand rng1;
64
+ *
65
+ * // output some random values to cout
66
+ * std::cout << rng1() << std::endl;
67
+ *
68
+ * // a random value is printed
69
+ *
70
+ * // create a new minstd_rand from a seed
71
+ * thrust::minstd_rand rng2(13);
72
+ *
73
+ * // discard some random values
74
+ * rng2.discard(13);
75
+ *
76
+ * // stream the object to an iostream
77
+ * std::cout << rng2 << std::endl;
78
+ *
79
+ * // rng2's current state is printed
80
+ *
81
+ * // print the minimum and maximum values that minstd_rand can produce
82
+ * std::cout << thrust::minstd_rand::min << std::endl;
83
+ * std::cout << thrust::minstd_rand::max << std::endl;
84
+ *
85
+ * // the range of minstd_rand is printed
86
+ *
87
+ * // save the state of rng2 to a different object
88
+ * thrust::minstd_rand rng3 = rng2;
89
+ *
90
+ * // compare rng2 and rng3
91
+ * std::cout << (rng2 == rng3) << std::endl;
92
+ *
93
+ * // 1 is printed
94
+ *
95
+ * // re-seed rng2 with a different seed
96
+ * rng2.seed(7);
97
+ *
98
+ * // compare rng2 and rng3
99
+ * std::cout << (rng2 == rng3) << std::endl;
100
+ *
101
+ * // 0 is printed
102
+ *
103
+ * return 0;
104
+ * }
105
+ *
106
+ * \endcode
107
+ *
108
+ * \see thrust::random::minstd_rand
109
+ * \see thrust::random::minstd_rand0
110
+ */
111
+ template<typename UIntType, UIntType a, UIntType c, UIntType m>
112
+ class linear_congruential_engine
113
+ {
114
+ public:
115
+ // types
116
+
117
+ /*! \typedef result_type
118
+ * \brief The type of the unsigned integer produced by this \p linear_congruential_engine.
119
+ */
120
+ typedef UIntType result_type;
121
+
122
+ // engine characteristics
123
+
124
+ /*! The multiplier used in the generation algorithm.
125
+ */
126
+ static const result_type multiplier = a;
127
+
128
+ /*! The increment used in the generation algorithm.
129
+ */
130
+ static const result_type increment = c;
131
+
132
+ /*! The modulus used in the generation algorithm.
133
+ */
134
+ static const result_type modulus = m;
135
+
136
+ /*! The smallest value this \p linear_congruential_engine may potentially produce.
137
+ */
138
+ static const result_type min = c == 0u ? 1u : 0u;
139
+
140
+ /*! The largest value this \p linear_congruential_engine may potentially produce.
141
+ */
142
+ static const result_type max = m - 1u;
143
+
144
+ /*! The default seed of this \p linear_congruential_engine.
145
+ */
146
+ static const result_type default_seed = 1u;
147
+
148
+ // constructors and seeding functions
149
+
150
+ /*! This constructor, which optionally accepts a seed, initializes a new
151
+ * \p linear_congruential_engine.
152
+ *
153
+ * \param s The seed used to intialize this \p linear_congruential_engine's state.
154
+ */
155
+ __host__ __device__
156
+ explicit linear_congruential_engine(result_type s = default_seed);
157
+
158
+ /*! This method initializes this \p linear_congruential_engine's state, and optionally accepts
159
+ * a seed value.
160
+ *
161
+ * \param s The seed used to initializes this \p linear_congruential_engine's state.
162
+ */
163
+ __host__ __device__
164
+ void seed(result_type s = default_seed);
165
+
166
+ // generating functions
167
+
168
+ /*! This member function produces a new random value and updates this \p linear_congruential_engine's state.
169
+ * \return A new random number.
170
+ */
171
+ __host__ __device__
172
+ result_type operator()(void);
173
+
174
+ /*! This member function advances this \p linear_congruential_engine's state a given number of times
175
+ * and discards the results.
176
+ *
177
+ * \param z The number of random values to discard.
178
+ * \note This function is provided because an implementation may be able to accelerate it.
179
+ */
180
+ __host__ __device__
181
+ void discard(unsigned long long z);
182
+
183
+ /*! \cond
184
+ */
185
+ private:
186
+ result_type m_x;
187
+
188
+ static void transition(result_type &state);
189
+
190
+ friend struct thrust::random::detail::random_core_access;
191
+
192
+ friend struct thrust::random::detail::linear_congruential_engine_discard;
193
+
194
+ __host__ __device__
195
+ bool equal(const linear_congruential_engine &rhs) const;
196
+
197
+ template<typename CharT, typename Traits>
198
+ std::basic_ostream<CharT,Traits>& stream_out(std::basic_ostream<CharT,Traits> &os) const;
199
+
200
+ template<typename CharT, typename Traits>
201
+ std::basic_istream<CharT,Traits>& stream_in(std::basic_istream<CharT,Traits> &is);
202
+
203
+ /*! \endcond
204
+ */
205
+ }; // end linear_congruential_engine
206
+
207
+
208
+ /*! This function checks two \p linear_congruential_engines for equality.
209
+ * \param lhs The first \p linear_congruential_engine to test.
210
+ * \param rhs The second \p linear_congruential_engine to test.
211
+ * \return \c true if \p lhs is equal to \p rhs; \c false, otherwise.
212
+ */
213
+ template<typename UIntType_, UIntType_ a_, UIntType_ c_, UIntType_ m_>
214
+ __host__ __device__
215
+ bool operator==(const linear_congruential_engine<UIntType_,a_,c_,m_> &lhs,
216
+ const linear_congruential_engine<UIntType_,a_,c_,m_> &rhs);
217
+
218
+
219
+ /*! This function checks two \p linear_congruential_engines for inequality.
220
+ * \param lhs The first \p linear_congruential_engine to test.
221
+ * \param rhs The second \p linear_congruential_engine to test.
222
+ * \return \c true if \p lhs is not equal to \p rhs; \c false, otherwise.
223
+ */
224
+ template<typename UIntType_, UIntType_ a_, UIntType_ c_, UIntType_ m_>
225
+ __host__ __device__
226
+ bool operator!=(const linear_congruential_engine<UIntType_,a_,c_,m_> &lhs,
227
+ const linear_congruential_engine<UIntType_,a_,c_,m_> &rhs);
228
+
229
+
230
+ /*! This function streams a linear_congruential_engine to a \p std::basic_ostream.
231
+ * \param os The \p basic_ostream to stream out to.
232
+ * \param e The \p linear_congruential_engine to stream out.
233
+ * \return \p os
234
+ */
235
+ template<typename UIntType_, UIntType_ a_, UIntType_ c_, UIntType_ m_,
236
+ typename CharT, typename Traits>
237
+ std::basic_ostream<CharT,Traits>&
238
+ operator<<(std::basic_ostream<CharT,Traits> &os,
239
+ const linear_congruential_engine<UIntType_,a_,c_,m_> &e);
240
+
241
+
242
+ /*! This function streams a linear_congruential_engine in from a std::basic_istream.
243
+ * \param is The \p basic_istream to stream from.
244
+ * \param e The \p linear_congruential_engine to stream in.
245
+ * \return \p is
246
+ */
247
+ template<typename UIntType_, UIntType_ a_, UIntType_ c_, UIntType_ m_,
248
+ typename CharT, typename Traits>
249
+ std::basic_istream<CharT,Traits>&
250
+ operator>>(std::basic_istream<CharT,Traits> &is,
251
+ linear_congruential_engine<UIntType_,a_,c_,m_> &e);
252
+
253
+
254
+ /*! \} // random_number_engine_templates
255
+ */
256
+
257
+
258
+ /*! \addtogroup predefined_random
259
+ * \{
260
+ */
261
+
262
+ // XXX the type N2111 used here was uint_fast32_t
263
+
264
+ /*! \typedef minstd_rand0
265
+ * \brief A random number engine with predefined parameters which implements a version of
266
+ * the Minimal Standard random number generation algorithm.
267
+ * \note The 10000th consecutive invocation of a default-constructed object of type \p minstd_rand0
268
+ * shall produce the value \c 1043618065 .
269
+ */
270
+ typedef linear_congruential_engine<thrust::detail::uint32_t, 16807, 0, 2147483647> minstd_rand0;
271
+
272
+
273
+ /*! \typedef minstd_rand
274
+ * \brief A random number engine with predefined parameters which implements a version of
275
+ * the Minimal Standard random number generation algorithm.
276
+ * \note The 10000th consecutive invocation of a default-constructed object of type \p minstd_rand
277
+ * shall produce the value \c 399268537 .
278
+ */
279
+ typedef linear_congruential_engine<thrust::detail::uint32_t, 48271, 0, 2147483647> minstd_rand;
280
+
281
+ /*! \} // predefined_random
282
+ */
283
+
284
+ } // end random
285
+
286
+ // import names into thrust::
287
+ using random::linear_congruential_engine;
288
+ using random::minstd_rand;
289
+ using random::minstd_rand0;
290
+
291
+ THRUST_NAMESPACE_END
292
+
293
+ #include <thrust/random/detail/linear_congruential_engine.inl>
294
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/normal_distribution.h ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+
18
+ /*! \file normal_distribution.h
19
+ * \brief A normal (Gaussian) distribution of real-valued numbers.
20
+ */
21
+
22
+ #pragma once
23
+
24
+ #include <thrust/detail/config.h>
25
+ #include <thrust/pair.h>
26
+ #include <thrust/random/detail/random_core_access.h>
27
+ #include <thrust/random/detail/normal_distribution_base.h>
28
+ #include <iostream>
29
+
30
+ THRUST_NAMESPACE_BEGIN
31
+
32
+ namespace random
33
+ {
34
+
35
+
36
+ /*! \addtogroup random_number_distributions
37
+ * \{
38
+ */
39
+
40
+ /*! \class normal_distribution
41
+ * \brief A \p normal_distribution random number distribution produces floating point
42
+ * Normally distributed random numbers.
43
+ *
44
+ * \tparam RealType The type of floating point number to produce.
45
+ *
46
+ * The following code snippet demonstrates examples of using a \p normal_distribution with a
47
+ * random number engine to produce random values drawn from the Normal distribution with a given
48
+ * mean and variance:
49
+ *
50
+ * \code
51
+ * #include <thrust/random/linear_congruential_engine.h>
52
+ * #include <thrust/random/normal_distribution.h>
53
+ *
54
+ * int main(void)
55
+ * {
56
+ * // create a minstd_rand object to act as our source of randomness
57
+ * thrust::minstd_rand rng;
58
+ *
59
+ * // create a normal_distribution to produce floats from the Normal distribution
60
+ * // with mean 2.0 and standard deviation 3.5
61
+ * thrust::random::normal_distribution<float> dist(2.0f, 3.5f);
62
+ *
63
+ * // write a random number to standard output
64
+ * std::cout << dist(rng) << std::endl;
65
+ *
66
+ * // write the mean of the distribution, just in case we forgot
67
+ * std::cout << dist.mean() << std::endl;
68
+ *
69
+ * // 2.0 is printed
70
+ *
71
+ * // and the standard deviation
72
+ * std::cout << dist.stddev() << std::endl;
73
+ *
74
+ * // 3.5 is printed
75
+ *
76
+ * return 0;
77
+ * }
78
+ * \endcode
79
+ */
80
+ template<typename RealType = double>
81
+ class normal_distribution
82
+ : public detail::normal_distribution_base<RealType>::type
83
+ {
84
+ private:
85
+ typedef typename detail::normal_distribution_base<RealType>::type super_t;
86
+
87
+ public:
88
+ // types
89
+
90
+ /*! \typedef result_type
91
+ * \brief The type of the floating point number produced by this \p normal_distribution.
92
+ */
93
+ typedef RealType result_type;
94
+
95
+ /*! \typedef param_type
96
+ * \brief The type of the object encapsulating this \p normal_distribution's parameters.
97
+ */
98
+ typedef thrust::pair<RealType,RealType> param_type;
99
+
100
+ // constructors and reset functions
101
+
102
+ /*! This constructor creates a new \p normal_distribution from two values defining the
103
+ * half-open interval of the distribution.
104
+ *
105
+ * \param mean The mean (expected value) of the distribution. Defaults to \c 0.0.
106
+ * \param stddev The standard deviation of the distribution. Defaults to \c 1.0.
107
+ */
108
+ __host__ __device__
109
+ explicit normal_distribution(RealType mean = 0.0, RealType stddev = 1.0);
110
+
111
+ /*! This constructor creates a new \p normal_distribution from a \p param_type object
112
+ * encapsulating the range of the distribution.
113
+ *
114
+ * \param parm A \p param_type object encapsulating the parameters (i.e., the mean and standard deviation) of the distribution.
115
+ */
116
+ __host__ __device__
117
+ explicit normal_distribution(const param_type &parm);
118
+
119
+ /*! Calling this member function guarantees that subsequent uses of this
120
+ * \p normal_distribution do not depend on values produced by any random
121
+ * number generator prior to invoking this function.
122
+ */
123
+ __host__ __device__
124
+ void reset(void);
125
+
126
+ // generating functions
127
+
128
+ /*! This method produces a new Normal random integer drawn from this \p normal_distribution's
129
+ * range using a \p UniformRandomNumberGenerator as a source of randomness.
130
+ *
131
+ * \param urng The \p UniformRandomNumberGenerator to use as a source of randomness.
132
+ */
133
+ template<typename UniformRandomNumberGenerator>
134
+ __host__ __device__
135
+ result_type operator()(UniformRandomNumberGenerator &urng);
136
+
137
+ /*! This method produces a new Normal random integer as if by creating a new \p normal_distribution
138
+ * from the given \p param_type object, and calling its <tt>operator()</tt> method with the given
139
+ * \p UniformRandomNumberGenerator as a source of randomness.
140
+ *
141
+ * \param urng The \p UniformRandomNumberGenerator to use as a source of randomness.
142
+ * \param parm A \p param_type object encapsulating the parameters of the \p normal_distribution
143
+ * to draw from.
144
+ */
145
+ template<typename UniformRandomNumberGenerator>
146
+ __host__ __device__
147
+ result_type operator()(UniformRandomNumberGenerator &urng, const param_type &parm);
148
+
149
+ // property functions
150
+
151
+ /*! This method returns the value of the parameter with which this \p normal_distribution
152
+ * was constructed.
153
+ *
154
+ * \return The mean (expected value) of this \p normal_distribution's output.
155
+ */
156
+ __host__ __device__
157
+ result_type mean(void) const;
158
+
159
+ /*! This method returns the value of the parameter with which this \p normal_distribution
160
+ * was constructed.
161
+ *
162
+ * \return The standard deviation of this \p uniform_real_distribution's output.
163
+ */
164
+ __host__ __device__
165
+ result_type stddev(void) const;
166
+
167
+ /*! This method returns a \p param_type object encapsulating the parameters with which this
168
+ * \p normal_distribution was constructed.
169
+ *
170
+ * \return A \p param_type object encapsulating the parameters (i.e., the mean and standard deviation) of this \p normal_distribution.
171
+ */
172
+ __host__ __device__
173
+ param_type param(void) const;
174
+
175
+ /*! This method changes the parameters of this \p normal_distribution using the values encapsulated
176
+ * in a given \p param_type object.
177
+ *
178
+ * \param parm A \p param_type object encapsulating the new parameters (i.e., the mean and variance) of this \p normal_distribution.
179
+ */
180
+ __host__ __device__
181
+ void param(const param_type &parm);
182
+
183
+ /*! This method returns the smallest floating point number this \p normal_distribution can potentially produce.
184
+ *
185
+ * \return The lower bound of this \p normal_distribution's half-open interval.
186
+ */
187
+ __host__ __device__
188
+ result_type min THRUST_PREVENT_MACRO_SUBSTITUTION (void) const;
189
+
190
+ /*! This method returns the smallest number larger than largest floating point number this \p uniform_real_distribution can potentially produce.
191
+ *
192
+ * \return The upper bound of this \p normal_distribution's half-open interval.
193
+ */
194
+ __host__ __device__
195
+ result_type max THRUST_PREVENT_MACRO_SUBSTITUTION (void) const;
196
+
197
+ /*! \cond
198
+ */
199
+ private:
200
+ param_type m_param;
201
+
202
+ friend struct thrust::random::detail::random_core_access;
203
+
204
+ __host__ __device__
205
+ bool equal(const normal_distribution &rhs) const;
206
+
207
+ template<typename CharT, typename Traits>
208
+ std::basic_ostream<CharT,Traits>& stream_out(std::basic_ostream<CharT,Traits> &os) const;
209
+
210
+ template<typename CharT, typename Traits>
211
+ std::basic_istream<CharT,Traits>& stream_in(std::basic_istream<CharT,Traits> &is);
212
+ /*! \endcond
213
+ */
214
+ }; // end normal_distribution
215
+
216
+
217
+ /*! This function checks two \p normal_distributions for equality.
218
+ * \param lhs The first \p normal_distribution to test.
219
+ * \param rhs The second \p normal_distribution to test.
220
+ * \return \c true if \p lhs is equal to \p rhs; \c false, otherwise.
221
+ */
222
+ template<typename RealType>
223
+ __host__ __device__
224
+ bool operator==(const normal_distribution<RealType> &lhs,
225
+ const normal_distribution<RealType> &rhs);
226
+
227
+
228
+ /*! This function checks two \p normal_distributions for inequality.
229
+ * \param lhs The first \p normal_distribution to test.
230
+ * \param rhs The second \p normal_distribution to test.
231
+ * \return \c true if \p lhs is not equal to \p rhs; \c false, otherwise.
232
+ */
233
+ template<typename RealType>
234
+ __host__ __device__
235
+ bool operator!=(const normal_distribution<RealType> &lhs,
236
+ const normal_distribution<RealType> &rhs);
237
+
238
+
239
+ /*! This function streams a normal_distribution to a \p std::basic_ostream.
240
+ * \param os The \p basic_ostream to stream out to.
241
+ * \param d The \p normal_distribution to stream out.
242
+ * \return \p os
243
+ */
244
+ template<typename RealType,
245
+ typename CharT, typename Traits>
246
+ std::basic_ostream<CharT,Traits>&
247
+ operator<<(std::basic_ostream<CharT,Traits> &os,
248
+ const normal_distribution<RealType> &d);
249
+
250
+
251
+ /*! This function streams a normal_distribution in from a std::basic_istream.
252
+ * \param is The \p basic_istream to stream from.
253
+ * \param d The \p normal_distribution to stream in.
254
+ * \return \p is
255
+ */
256
+ template<typename RealType,
257
+ typename CharT, typename Traits>
258
+ std::basic_istream<CharT,Traits>&
259
+ operator>>(std::basic_istream<CharT,Traits> &is,
260
+ normal_distribution<RealType> &d);
261
+
262
+
263
+ /*! \} // end random_number_distributions
264
+ */
265
+
266
+
267
+ } // end random
268
+
269
+ using random::normal_distribution;
270
+
271
+ THRUST_NAMESPACE_END
272
+
273
+ #include <thrust/random/detail/normal_distribution.inl>
274
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/random/uniform_real_distribution.h ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+
18
+ /*! \file uniform_real_distribution.h
19
+ * \brief A uniform distribution of real-valued numbers
20
+ */
21
+
22
+ #pragma once
23
+
24
+ #include <thrust/detail/config.h>
25
+ #include <thrust/pair.h>
26
+ #include <thrust/random/detail/random_core_access.h>
27
+ #include <iostream>
28
+
29
+ THRUST_NAMESPACE_BEGIN
30
+
31
+ namespace random
32
+ {
33
+
34
+
35
+ /*! \addtogroup random_number_distributions
36
+ * \{
37
+ */
38
+
39
+ /*! \class uniform_real_distribution
40
+ * \brief A \p uniform_real_distribution random number distribution produces floating point
41
+ * uniform random numbers from a half-open interval.
42
+ *
43
+ * \tparam RealType The type of floating point number to produce.
44
+ *
45
+ * The following code snippet demonstrates examples of using a \p uniform_real_distribution with a
46
+ * random number engine to produce random integers drawn from a given range:
47
+ *
48
+ * \code
49
+ * #include <thrust/random/linear_congruential_engine.h>
50
+ * #include <thrust/random/uniform_real_distribution.h>
51
+ *
52
+ * int main(void)
53
+ * {
54
+ * // create a minstd_rand object to act as our source of randomness
55
+ * thrust::minstd_rand rng;
56
+ *
57
+ * // create a uniform_real_distribution to produce floats from [-7,13)
58
+ * thrust::uniform_real_distribution<float> dist(-7,13);
59
+ *
60
+ * // write a random number from the range [-7,13) to standard output
61
+ * std::cout << dist(rng) << std::endl;
62
+ *
63
+ * // write the range of the distribution, just in case we forgot
64
+ * std::cout << dist.min() << std::endl;
65
+ *
66
+ * // -7.0 is printed
67
+ *
68
+ * std::cout << dist.max() << std::endl;
69
+ *
70
+ * // 13.0 is printed
71
+ *
72
+ * // write the parameters of the distribution (which happen to be the bounds) to standard output
73
+ * std::cout << dist.a() << std::endl;
74
+ *
75
+ * // -7.0 is printed
76
+ *
77
+ * std::cout << dist.b() << std::endl;
78
+ *
79
+ * // 13.0 is printed
80
+ *
81
+ * return 0;
82
+ * }
83
+ * \endcode
84
+ */
85
+ template<typename RealType = double>
86
+ class uniform_real_distribution
87
+ {
88
+ public:
89
+ // types
90
+
91
+ /*! \typedef result_type
92
+ * \brief The type of the floating point number produced by this \p uniform_real_distribution.
93
+ */
94
+ typedef RealType result_type;
95
+
96
+ /*! \typedef param_type
97
+ * \brief The type of the object encapsulating this \p uniform_real_distribution's parameters.
98
+ */
99
+ typedef thrust::pair<RealType,RealType> param_type;
100
+
101
+ // constructors and reset functions
102
+
103
+ /*! This constructor creates a new \p uniform_real_distribution from two values defining the
104
+ * half-open interval of the distribution.
105
+ *
106
+ * \param a The smallest floating point number to potentially produce. Defaults to \c 0.0.
107
+ * \param b The smallest number larger than the largest floating point number to potentially produce. Defaults to \c 1.0.
108
+ */
109
+ __host__ __device__
110
+ explicit uniform_real_distribution(RealType a = 0.0, RealType b = 1.0);
111
+
112
+ /*! This constructor creates a new \p uniform_real_distribution from a \p param_type object
113
+ * encapsulating the range of the distribution.
114
+ *
115
+ * \param parm A \p param_type object encapsulating the parameters (i.e., the range) of the distribution.
116
+ */
117
+ __host__ __device__
118
+ explicit uniform_real_distribution(const param_type &parm);
119
+
120
+ /*! This does nothing. It is included to conform to the requirements of the RandomDistribution concept.
121
+ */
122
+ __host__ __device__
123
+ void reset(void);
124
+
125
+ // generating functions
126
+
127
+ /*! This method produces a new uniform random integer drawn from this \p uniform_real_distribution's
128
+ * range using a \p UniformRandomNumberGenerator as a source of randomness.
129
+ *
130
+ * \param urng The \p UniformRandomNumberGenerator to use as a source of randomness.
131
+ */
132
+ template<typename UniformRandomNumberGenerator>
133
+ __host__ __device__
134
+ result_type operator()(UniformRandomNumberGenerator &urng);
135
+
136
+ /*! This method produces a new uniform random integer as if by creating a new \p uniform_real_distribution
137
+ * from the given \p param_type object, and calling its <tt>operator()</tt> method with the given
138
+ * \p UniformRandomNumberGenerator as a source of randomness.
139
+ *
140
+ * \param urng The \p UniformRandomNumberGenerator to use as a source of randomness.
141
+ * \param parm A \p param_type object encapsulating the parameters of the \p uniform_real_distribution
142
+ * to draw from.
143
+ */
144
+ template<typename UniformRandomNumberGenerator>
145
+ __host__ __device__
146
+ result_type operator()(UniformRandomNumberGenerator &urng, const param_type &parm);
147
+
148
+ // property functions
149
+
150
+ /*! This method returns the value of the parameter with which this \p uniform_real_distribution
151
+ * was constructed.
152
+ *
153
+ * \return The lower bound of this \p uniform_real_distribution's half-open interval.
154
+ */
155
+ __host__ __device__
156
+ result_type a(void) const;
157
+
158
+ /*! This method returns the value of the parameter with which this \p uniform_real_distribution
159
+ * was constructed.
160
+ *
161
+ * \return The upper bound of this \p uniform_real_distribution's half-open interval.
162
+ */
163
+ __host__ __device__
164
+ result_type b(void) const;
165
+
166
+ /*! This method returns a \p param_type object encapsulating the parameters with which this
167
+ * \p uniform_real_distribution was constructed.
168
+ *
169
+ * \return A \p param_type object enapsulating the half-open interval of this \p uniform_real_distribution.
170
+ */
171
+ __host__ __device__
172
+ param_type param(void) const;
173
+
174
+ /*! This method changes the parameters of this \p uniform_real_distribution using the values encapsulated
175
+ * in a given \p param_type object.
176
+ *
177
+ * \param parm A \p param_type object encapsulating the new half-open interval of this \p uniform_real_distribution.
178
+ */
179
+ __host__ __device__
180
+ void param(const param_type &parm);
181
+
182
+ /*! This method returns the smallest floating point number this \p uniform_real_distribution can potentially produce.
183
+ *
184
+ * \return The lower bound of this \p uniform_real_distribution's half-open interval.
185
+ */
186
+ __host__ __device__
187
+ result_type min THRUST_PREVENT_MACRO_SUBSTITUTION (void) const;
188
+
189
+ /*! This method returns the smallest number larger than largest floating point number this \p uniform_real_distribution can potentially produce.
190
+ *
191
+ * \return The upper bound of this \p uniform_real_distribution's half-open interval.
192
+ */
193
+ __host__ __device__
194
+ result_type max THRUST_PREVENT_MACRO_SUBSTITUTION (void) const;
195
+
196
+ /*! \cond
197
+ */
198
+ private:
199
+ param_type m_param;
200
+
201
+ friend struct thrust::random::detail::random_core_access;
202
+
203
+ __host__ __device__
204
+ bool equal(const uniform_real_distribution &rhs) const;
205
+
206
+ template<typename CharT, typename Traits>
207
+ std::basic_ostream<CharT,Traits>& stream_out(std::basic_ostream<CharT,Traits> &os) const;
208
+
209
+ template<typename CharT, typename Traits>
210
+ std::basic_istream<CharT,Traits>& stream_in(std::basic_istream<CharT,Traits> &is);
211
+ /*! \endcond
212
+ */
213
+ }; // end uniform_real_distribution
214
+
215
+
216
+ /*! This function checks two \p uniform_real_distributions for equality.
217
+ * \param lhs The first \p uniform_real_distribution to test.
218
+ * \param rhs The second \p uniform_real_distribution to test.
219
+ * \return \c true if \p lhs is equal to \p rhs; \c false, otherwise.
220
+ */
221
+ template<typename RealType>
222
+ __host__ __device__
223
+ bool operator==(const uniform_real_distribution<RealType> &lhs,
224
+ const uniform_real_distribution<RealType> &rhs);
225
+
226
+
227
+ /*! This function checks two \p uniform_real_distributions for inequality.
228
+ * \param lhs The first \p uniform_real_distribution to test.
229
+ * \param rhs The second \p uniform_real_distribution to test.
230
+ * \return \c true if \p lhs is not equal to \p rhs; \c false, otherwise.
231
+ */
232
+ template<typename RealType>
233
+ __host__ __device__
234
+ bool operator!=(const uniform_real_distribution<RealType> &lhs,
235
+ const uniform_real_distribution<RealType> &rhs);
236
+
237
+
238
+ /*! This function streams a uniform_real_distribution to a \p std::basic_ostream.
239
+ * \param os The \p basic_ostream to stream out to.
240
+ * \param d The \p uniform_real_distribution to stream out.
241
+ * \return \p os
242
+ */
243
+ template<typename RealType,
244
+ typename CharT, typename Traits>
245
+ std::basic_ostream<CharT,Traits>&
246
+ operator<<(std::basic_ostream<CharT,Traits> &os,
247
+ const uniform_real_distribution<RealType> &d);
248
+
249
+
250
+ /*! This function streams a uniform_real_distribution in from a std::basic_istream.
251
+ * \param is The \p basic_istream to stream from.
252
+ * \param d The \p uniform_real_distribution to stream in.
253
+ * \return \p is
254
+ */
255
+ template<typename RealType,
256
+ typename CharT, typename Traits>
257
+ std::basic_istream<CharT,Traits>&
258
+ operator>>(std::basic_istream<CharT,Traits> &is,
259
+ uniform_real_distribution<RealType> &d);
260
+
261
+
262
+ /*! \} // end random_number_distributions
263
+ */
264
+
265
+
266
+ } // end random
267
+
268
+ using random::uniform_real_distribution;
269
+
270
+ THRUST_NAMESPACE_END
271
+
272
+ #include <thrust/random/detail/uniform_real_distribution.inl>
273
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/builtin_types.h ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 1993-2014 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
+ /*******************************************************************************
51
+ * *
52
+ * *
53
+ * *
54
+ *******************************************************************************/
55
+
56
+ #include "device_types.h"
57
+ #if !defined(__CUDACC_RTC__)
58
+ #define EXCLUDE_FROM_RTC
59
+ #include "driver_types.h"
60
+ #undef EXCLUDE_FROM_RTC
61
+ #endif /* !__CUDACC_RTC__ */
62
+ #include "surface_types.h"
63
+ #include "texture_types.h"
64
+ #include "vector_types.h"
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/channel_descriptor.h ADDED
@@ -0,0 +1,588 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 1993-2012 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(__CHANNEL_DESCRIPTOR_H__)
51
+ #define __CHANNEL_DESCRIPTOR_H__
52
+
53
+ #if defined(__cplusplus)
54
+
55
+ /*******************************************************************************
56
+ * *
57
+ * *
58
+ * *
59
+ *******************************************************************************/
60
+
61
+ #include "cuda_runtime_api.h"
62
+
63
+ /*******************************************************************************
64
+ * *
65
+ * *
66
+ * *
67
+ *******************************************************************************/
68
+
69
+ /**
70
+ * \addtogroup CUDART_HIGHLEVEL
71
+ *
72
+ * @{
73
+ */
74
+
75
+ /**
76
+ * \brief \hl Returns a channel descriptor using the specified format
77
+ *
78
+ * Returns a channel descriptor with format \p f and number of bits of each
79
+ * component \p x, \p y, \p z, and \p w. The ::cudaChannelFormatDesc is
80
+ * defined as:
81
+ * \code
82
+ struct cudaChannelFormatDesc {
83
+ int x, y, z, w;
84
+ enum cudaChannelFormatKind f;
85
+ };
86
+ * \endcode
87
+ *
88
+ * where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,
89
+ * ::cudaChannelFormatKindUnsigned, cudaChannelFormatKindFloat,
90
+ * ::cudaChannelFormatKindSignedNormalized8X1, ::cudaChannelFormatKindSignedNormalized8X2,
91
+ * ::cudaChannelFormatKindSignedNormalized8X4,
92
+ * ::cudaChannelFormatKindUnsignedNormalized8X1, ::cudaChannelFormatKindUnsignedNormalized8X2,
93
+ * ::cudaChannelFormatKindUnsignedNormalized8X4,
94
+ * ::cudaChannelFormatKindSignedNormalized16X1, ::cudaChannelFormatKindSignedNormalized16X2,
95
+ * ::cudaChannelFormatKindSignedNormalized16X4,
96
+ * ::cudaChannelFormatKindUnsignedNormalized16X1, ::cudaChannelFormatKindUnsignedNormalized16X2,
97
+ * ::cudaChannelFormatKindUnsignedNormalized16X4
98
+ * or ::cudaChannelFormatKindNV12.
99
+ *
100
+ * The format is specified by the template specialization.
101
+ *
102
+ * The template function specializes for the following scalar types:
103
+ * char, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, and float.
104
+ * The template function specializes for the following vector types:
105
+ * char{1|2|4}, uchar{1|2|4}, short{1|2|4}, ushort{1|2|4}, int{1|2|4}, uint{1|2|4}, long{1|2|4}, ulong{1|2|4}, float{1|2|4}.
106
+ * The template function specializes for following cudaChannelFormatKind enum values:
107
+ * ::cudaChannelFormatKind{Uns|S}ignedNormalized{8|16}X{1|2|4}, and ::cudaChannelFormatKindNV12.
108
+ *
109
+ * Invoking the function on a type without a specialization defaults to creating a channel format of kind ::cudaChannelFormatKindNone
110
+ *
111
+ * \return
112
+ * Channel descriptor with format \p f
113
+ *
114
+ * \sa \ref ::cudaCreateChannelDesc(int,int,int,int,cudaChannelFormatKind) "cudaCreateChannelDesc (Low level)",
115
+ * ::cudaGetChannelDesc,
116
+ */
117
+ template<class T> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
118
+ {
119
+ return cudaCreateChannelDesc(0, 0, 0, 0, cudaChannelFormatKindNone);
120
+ }
121
+
122
+ static __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDescHalf(void)
123
+ {
124
+ int e = (int)sizeof(unsigned short) * 8;
125
+
126
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
127
+ }
128
+
129
+ static __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDescHalf1(void)
130
+ {
131
+ int e = (int)sizeof(unsigned short) * 8;
132
+
133
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
134
+ }
135
+
136
+ static __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDescHalf2(void)
137
+ {
138
+ int e = (int)sizeof(unsigned short) * 8;
139
+
140
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindFloat);
141
+ }
142
+
143
+ static __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDescHalf4(void)
144
+ {
145
+ int e = (int)sizeof(unsigned short) * 8;
146
+
147
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindFloat);
148
+ }
149
+
150
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<char>(void)
151
+ {
152
+ int e = (int)sizeof(char) * 8;
153
+
154
+ #if defined(_CHAR_UNSIGNED) || defined(__CHAR_UNSIGNED__)
155
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
156
+ #else /* _CHAR_UNSIGNED || __CHAR_UNSIGNED__ */
157
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
158
+ #endif /* _CHAR_UNSIGNED || __CHAR_UNSIGNED__ */
159
+ }
160
+
161
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<signed char>(void)
162
+ {
163
+ int e = (int)sizeof(signed char) * 8;
164
+
165
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
166
+ }
167
+
168
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<unsigned char>(void)
169
+ {
170
+ int e = (int)sizeof(unsigned char) * 8;
171
+
172
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
173
+ }
174
+
175
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<char1>(void)
176
+ {
177
+ int e = (int)sizeof(signed char) * 8;
178
+
179
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
180
+ }
181
+
182
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<uchar1>(void)
183
+ {
184
+ int e = (int)sizeof(unsigned char) * 8;
185
+
186
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
187
+ }
188
+
189
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<char2>(void)
190
+ {
191
+ int e = (int)sizeof(signed char) * 8;
192
+
193
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned);
194
+ }
195
+
196
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<uchar2>(void)
197
+ {
198
+ int e = (int)sizeof(unsigned char) * 8;
199
+
200
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned);
201
+ }
202
+
203
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<char4>(void)
204
+ {
205
+ int e = (int)sizeof(signed char) * 8;
206
+
207
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned);
208
+ }
209
+
210
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<uchar4>(void)
211
+ {
212
+ int e = (int)sizeof(unsigned char) * 8;
213
+
214
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned);
215
+ }
216
+
217
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<short>(void)
218
+ {
219
+ int e = (int)sizeof(short) * 8;
220
+
221
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
222
+ }
223
+
224
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<unsigned short>(void)
225
+ {
226
+ int e = (int)sizeof(unsigned short) * 8;
227
+
228
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
229
+ }
230
+
231
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<short1>(void)
232
+ {
233
+ int e = (int)sizeof(short) * 8;
234
+
235
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
236
+ }
237
+
238
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<ushort1>(void)
239
+ {
240
+ int e = (int)sizeof(unsigned short) * 8;
241
+
242
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
243
+ }
244
+
245
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<short2>(void)
246
+ {
247
+ int e = (int)sizeof(short) * 8;
248
+
249
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned);
250
+ }
251
+
252
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<ushort2>(void)
253
+ {
254
+ int e = (int)sizeof(unsigned short) * 8;
255
+
256
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned);
257
+ }
258
+
259
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<short4>(void)
260
+ {
261
+ int e = (int)sizeof(short) * 8;
262
+
263
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned);
264
+ }
265
+
266
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<ushort4>(void)
267
+ {
268
+ int e = (int)sizeof(unsigned short) * 8;
269
+
270
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned);
271
+ }
272
+
273
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<int>(void)
274
+ {
275
+ int e = (int)sizeof(int) * 8;
276
+
277
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
278
+ }
279
+
280
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<unsigned int>(void)
281
+ {
282
+ int e = (int)sizeof(unsigned int) * 8;
283
+
284
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
285
+ }
286
+
287
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<int1>(void)
288
+ {
289
+ int e = (int)sizeof(int) * 8;
290
+
291
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
292
+ }
293
+
294
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<uint1>(void)
295
+ {
296
+ int e = (int)sizeof(unsigned int) * 8;
297
+
298
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
299
+ }
300
+
301
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<int2>(void)
302
+ {
303
+ int e = (int)sizeof(int) * 8;
304
+
305
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned);
306
+ }
307
+
308
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<uint2>(void)
309
+ {
310
+ int e = (int)sizeof(unsigned int) * 8;
311
+
312
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned);
313
+ }
314
+
315
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<int4>(void)
316
+ {
317
+ int e = (int)sizeof(int) * 8;
318
+
319
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned);
320
+ }
321
+
322
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<uint4>(void)
323
+ {
324
+ int e = (int)sizeof(unsigned int) * 8;
325
+
326
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned);
327
+ }
328
+
329
+ #if !defined(__LP64__)
330
+
331
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<long>(void)
332
+ {
333
+ int e = (int)sizeof(long) * 8;
334
+
335
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
336
+ }
337
+
338
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<unsigned long>(void)
339
+ {
340
+ int e = (int)sizeof(unsigned long) * 8;
341
+
342
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
343
+ }
344
+
345
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<long1>(void)
346
+ {
347
+ int e = (int)sizeof(long) * 8;
348
+
349
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
350
+ }
351
+
352
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<ulong1>(void)
353
+ {
354
+ int e = (int)sizeof(unsigned long) * 8;
355
+
356
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
357
+ }
358
+
359
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<long2>(void)
360
+ {
361
+ int e = (int)sizeof(long) * 8;
362
+
363
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned);
364
+ }
365
+
366
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<ulong2>(void)
367
+ {
368
+ int e = (int)sizeof(unsigned long) * 8;
369
+
370
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned);
371
+ }
372
+
373
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<long4>(void)
374
+ {
375
+ int e = (int)sizeof(long) * 8;
376
+
377
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned);
378
+ }
379
+
380
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<ulong4>(void)
381
+ {
382
+ int e = (int)sizeof(unsigned long) * 8;
383
+
384
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned);
385
+ }
386
+
387
+ #endif /* !__LP64__ */
388
+
389
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<float>(void)
390
+ {
391
+ int e = (int)sizeof(float) * 8;
392
+
393
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
394
+ }
395
+
396
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<float1>(void)
397
+ {
398
+ int e = (int)sizeof(float) * 8;
399
+
400
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
401
+ }
402
+
403
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<float2>(void)
404
+ {
405
+ int e = (int)sizeof(float) * 8;
406
+
407
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindFloat);
408
+ }
409
+
410
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<float4>(void)
411
+ {
412
+ int e = (int)sizeof(float) * 8;
413
+
414
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindFloat);
415
+ }
416
+
417
+ static __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDescNV12(void)
418
+ {
419
+ int e = (int)sizeof(char) * 8;
420
+
421
+ return cudaCreateChannelDesc(e, e, e, 0, cudaChannelFormatKindNV12);
422
+ }
423
+
424
+ template<cudaChannelFormatKind> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
425
+ {
426
+ return cudaCreateChannelDesc(0, 0, 0, 0, cudaChannelFormatKindNone);
427
+ }
428
+
429
+ /* Signed 8-bit normalized integer formats */
430
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindSignedNormalized8X1>(void)
431
+ {
432
+ return cudaCreateChannelDesc(8, 0, 0, 0, cudaChannelFormatKindSignedNormalized8X1);
433
+ }
434
+
435
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindSignedNormalized8X2>(void)
436
+ {
437
+ return cudaCreateChannelDesc(8, 8, 0, 0, cudaChannelFormatKindSignedNormalized8X2);
438
+ }
439
+
440
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindSignedNormalized8X4>(void)
441
+ {
442
+ return cudaCreateChannelDesc(8, 8, 8, 8, cudaChannelFormatKindSignedNormalized8X4);
443
+ }
444
+
445
+ /* Unsigned 8-bit normalized integer formats */
446
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedNormalized8X1>(void)
447
+ {
448
+ return cudaCreateChannelDesc(8, 0, 0, 0, cudaChannelFormatKindUnsignedNormalized8X1);
449
+ }
450
+
451
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedNormalized8X2>(void)
452
+ {
453
+ return cudaCreateChannelDesc(8, 8, 0, 0, cudaChannelFormatKindUnsignedNormalized8X2);
454
+ }
455
+
456
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedNormalized8X4>(void)
457
+ {
458
+ return cudaCreateChannelDesc(8, 8, 8, 8, cudaChannelFormatKindUnsignedNormalized8X4);
459
+ }
460
+
461
+ /* Signed 16-bit normalized integer formats */
462
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindSignedNormalized16X1>(void)
463
+ {
464
+ return cudaCreateChannelDesc(16, 0, 0, 0, cudaChannelFormatKindSignedNormalized16X1);
465
+ }
466
+
467
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindSignedNormalized16X2>(void)
468
+ {
469
+ return cudaCreateChannelDesc(16, 16, 0, 0, cudaChannelFormatKindSignedNormalized16X2);
470
+ }
471
+
472
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindSignedNormalized16X4>(void)
473
+ {
474
+ return cudaCreateChannelDesc(16, 16, 16, 16, cudaChannelFormatKindSignedNormalized16X4);
475
+ }
476
+
477
+ /* Unsigned 16-bit normalized integer formats */
478
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedNormalized16X1>(void)
479
+ {
480
+ return cudaCreateChannelDesc(16, 0, 0, 0, cudaChannelFormatKindUnsignedNormalized16X1);
481
+ }
482
+
483
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedNormalized16X2>(void)
484
+ {
485
+ return cudaCreateChannelDesc(16, 16, 0, 0, cudaChannelFormatKindUnsignedNormalized16X2);
486
+ }
487
+
488
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedNormalized16X4>(void)
489
+ {
490
+ return cudaCreateChannelDesc(16, 16, 16, 16, cudaChannelFormatKindUnsignedNormalized16X4);
491
+ }
492
+
493
+ /* NV12 format */
494
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindNV12>(void)
495
+ {
496
+ return cudaCreateChannelDesc(8, 8, 8, 0, cudaChannelFormatKindNV12);
497
+ }
498
+
499
+ /* BC1 format */
500
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedBlockCompressed1>(void)
501
+ {
502
+ return cudaCreateChannelDesc(8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed1);
503
+ }
504
+
505
+ /* BC1sRGB format */
506
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedBlockCompressed1SRGB>(void)
507
+ {
508
+ return cudaCreateChannelDesc(8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed1SRGB);
509
+ }
510
+
511
+ /* BC2 format */
512
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedBlockCompressed2>(void)
513
+ {
514
+ return cudaCreateChannelDesc(8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed2);
515
+ }
516
+
517
+ /* BC2sRGB format */
518
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedBlockCompressed2SRGB>(void)
519
+ {
520
+ return cudaCreateChannelDesc(8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed2SRGB);
521
+ }
522
+
523
+ /* BC3 format */
524
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedBlockCompressed3>(void)
525
+ {
526
+ return cudaCreateChannelDesc(8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed3);
527
+ }
528
+
529
+ /* BC3sRGB format */
530
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedBlockCompressed3SRGB>(void)
531
+ {
532
+ return cudaCreateChannelDesc(8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed3SRGB);
533
+ }
534
+
535
+ /* BC4 unsigned format */
536
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedBlockCompressed4>(void)
537
+ {
538
+ return cudaCreateChannelDesc(8, 0, 0, 0, cudaChannelFormatKindUnsignedBlockCompressed4);
539
+ }
540
+
541
+ /* BC4 signed format */
542
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindSignedBlockCompressed4>(void)
543
+ {
544
+ return cudaCreateChannelDesc(8, 0, 0, 0, cudaChannelFormatKindSignedBlockCompressed4);
545
+ }
546
+
547
+ /* BC5 unsigned format */
548
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedBlockCompressed5>(void)
549
+ {
550
+ return cudaCreateChannelDesc(8, 8, 0, 0, cudaChannelFormatKindUnsignedBlockCompressed5);
551
+ }
552
+
553
+ /* BC5 signed format */
554
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindSignedBlockCompressed5>(void)
555
+ {
556
+ return cudaCreateChannelDesc(8, 8, 0, 0, cudaChannelFormatKindSignedBlockCompressed5);
557
+ }
558
+
559
+ /* BC6H unsigned format */
560
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedBlockCompressed6H>(void)
561
+ {
562
+ return cudaCreateChannelDesc(16, 16, 16, 0, cudaChannelFormatKindUnsignedBlockCompressed6H);
563
+ }
564
+
565
+ /* BC6H signed format */
566
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindSignedBlockCompressed6H>(void)
567
+ {
568
+ return cudaCreateChannelDesc(16, 16, 16, 0, cudaChannelFormatKindSignedBlockCompressed6H);
569
+ }
570
+
571
+ /* BC7 format */
572
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedBlockCompressed7>(void)
573
+ {
574
+ return cudaCreateChannelDesc(8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed7);
575
+ }
576
+
577
+ /* BC7sRGB format */
578
+ template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<cudaChannelFormatKindUnsignedBlockCompressed7SRGB>(void)
579
+ {
580
+ return cudaCreateChannelDesc(8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed7SRGB);
581
+ }
582
+
583
+ #endif /* __cplusplus */
584
+
585
+ /** @} */
586
+ /** @} */ /* END CUDART_TEXTURE_HL */
587
+
588
+ #endif /* !__CHANNEL_DESCRIPTOR_H__ */
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cudaEGL.h ADDED
@@ -0,0 +1,659 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2014 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
+ #ifndef CUDAEGL_H
51
+ #define CUDAEGL_H
52
+
53
+ #include "cuda.h"
54
+ #include "EGL/egl.h"
55
+ #include "EGL/eglext.h"
56
+
57
+
58
+ #ifdef CUDA_FORCE_API_VERSION
59
+ #error "CUDA_FORCE_API_VERSION is no longer supported."
60
+ #endif
61
+
62
+ #ifdef __cplusplus
63
+ extern "C" {
64
+ #endif
65
+
66
+ /**
67
+ * \addtogroup CUDA_TYPES
68
+ * @{
69
+ */
70
+
71
+ /**
72
+ * Maximum number of planes per frame
73
+ */
74
+ #define MAX_PLANES 3
75
+
76
+ /**
77
+ * CUDA EglFrame type - array or pointer
78
+ */
79
+ typedef enum CUeglFrameType_enum {
80
+ CU_EGL_FRAME_TYPE_ARRAY = 0, /**< Frame type CUDA array */
81
+ CU_EGL_FRAME_TYPE_PITCH = 1, /**< Frame type pointer */
82
+ } CUeglFrameType;
83
+
84
+ /**
85
+ * Indicates that timeout for ::cuEGLStreamConsumerAcquireFrame is infinite.
86
+ */
87
+ #define CUDA_EGL_INFINITE_TIMEOUT 0xFFFFFFFF
88
+
89
+ /**
90
+ * Resource location flags- sysmem or vidmem
91
+ *
92
+ * For CUDA context on iGPU, since video and system memory are equivalent -
93
+ * these flags will not have an effect on the execution.
94
+ *
95
+ * For CUDA context on dGPU, applications can use the flag ::CUeglResourceLocationFlags
96
+ * to give a hint about the desired location.
97
+ *
98
+ * ::CU_EGL_RESOURCE_LOCATION_SYSMEM - the frame data is made resident on the system memory
99
+ * to be accessed by CUDA.
100
+ *
101
+ * ::CU_EGL_RESOURCE_LOCATION_VIDMEM - the frame data is made resident on the dedicated
102
+ * video memory to be accessed by CUDA.
103
+ *
104
+ * There may be an additional latency due to new allocation and data migration,
105
+ * if the frame is produced on a different memory.
106
+
107
+ */
108
+ typedef enum CUeglResourceLocationFlags_enum {
109
+ CU_EGL_RESOURCE_LOCATION_SYSMEM = 0x00, /**< Resource location sysmem */
110
+ CU_EGL_RESOURCE_LOCATION_VIDMEM = 0x01 /**< Resource location vidmem */
111
+ } CUeglResourceLocationFlags;
112
+
113
+ /**
114
+ * CUDA EGL Color Format - The different planar and multiplanar formats currently supported for CUDA_EGL interops.
115
+ * Three channel formats are currently not supported for ::CU_EGL_FRAME_TYPE_ARRAY
116
+ */
117
+ typedef enum CUeglColorFormat_enum {
118
+ CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0x00, /**< Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
119
+ CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 0x01, /**< Y, UV in two surfaces (UV as one surface) with VU byte ordering, width, height ratio same as YUV420Planar. */
120
+ CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 0x02, /**< Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height = Y height. */
121
+ CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 0x03, /**< Y, UV in two surfaces with VU byte ordering, width, height ratio same as YUV422Planar. */
122
+ CU_EGL_COLOR_FORMAT_RGB = 0x04, /**< R/G/B three channels in one surface with BGR byte ordering. Only pitch linear format supported. */
123
+ CU_EGL_COLOR_FORMAT_BGR = 0x05, /**< R/G/B three channels in one surface with RGB byte ordering. Only pitch linear format supported. */
124
+ CU_EGL_COLOR_FORMAT_ARGB = 0x06, /**< R/G/B/A four channels in one surface with BGRA byte ordering. */
125
+ CU_EGL_COLOR_FORMAT_RGBA = 0x07, /**< R/G/B/A four channels in one surface with ABGR byte ordering. */
126
+ CU_EGL_COLOR_FORMAT_L = 0x08, /**< single luminance channel in one surface. */
127
+ CU_EGL_COLOR_FORMAT_R = 0x09, /**< single color channel in one surface. */
128
+ CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 0x0A, /**< Y, U, V in three surfaces, each in a separate surface, U/V width = Y width, U/V height = Y height. */
129
+ CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 0x0B, /**< Y, UV in two surfaces (UV as one surface) with VU byte ordering, width, height ratio same as YUV444Planar. */
130
+ CU_EGL_COLOR_FORMAT_YUYV_422 = 0x0C, /**< Y, U, V in one surface, interleaved as UYVY in one channel. */
131
+ CU_EGL_COLOR_FORMAT_UYVY_422 = 0x0D, /**< Y, U, V in one surface, interleaved as YUYV in one channel. */
132
+ CU_EGL_COLOR_FORMAT_ABGR = 0x0E, /**< R/G/B/A four channels in one surface with RGBA byte ordering. */
133
+ CU_EGL_COLOR_FORMAT_BGRA = 0x0F, /**< R/G/B/A four channels in one surface with ARGB byte ordering. */
134
+ CU_EGL_COLOR_FORMAT_A = 0x10, /**< Alpha color format - one channel in one surface. */
135
+ CU_EGL_COLOR_FORMAT_RG = 0x11, /**< R/G color format - two channels in one surface with GR byte ordering */
136
+ CU_EGL_COLOR_FORMAT_AYUV = 0x12, /**< Y, U, V, A four channels in one surface, interleaved as VUYA. */
137
+ CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 0x13, /**< Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. */
138
+ CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 0x14, /**< Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = Y height. */
139
+ CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 0x15, /**< Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
140
+ CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 0x16, /**< Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. */
141
+ CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 0x17, /**< Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
142
+ CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 0x18, /**< Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. */
143
+ CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 0x19, /**< Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
144
+ CU_EGL_COLOR_FORMAT_VYUY_ER = 0x1A, /**< Extended Range Y, U, V in one surface, interleaved as YVYU in one channel. */
145
+ CU_EGL_COLOR_FORMAT_UYVY_ER = 0x1B, /**< Extended Range Y, U, V in one surface, interleaved as YUYV in one channel. */
146
+ CU_EGL_COLOR_FORMAT_YUYV_ER = 0x1C, /**< Extended Range Y, U, V in one surface, interleaved as UYVY in one channel. */
147
+ CU_EGL_COLOR_FORMAT_YVYU_ER = 0x1D, /**< Extended Range Y, U, V in one surface, interleaved as VYUY in one channel. */
148
+ CU_EGL_COLOR_FORMAT_YUV_ER = 0x1E, /**< Extended Range Y, U, V three channels in one surface, interleaved as VUY. Only pitch linear format supported. */
149
+ CU_EGL_COLOR_FORMAT_YUVA_ER = 0x1F, /**< Extended Range Y, U, V, A four channels in one surface, interleaved as AVUY. */
150
+ CU_EGL_COLOR_FORMAT_AYUV_ER = 0x20, /**< Extended Range Y, U, V, A four channels in one surface, interleaved as VUYA. */
151
+ CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 0x21, /**< Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V height = Y height. */
152
+ CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 0x22, /**< Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V height = Y height. */
153
+ CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 0x23, /**< Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
154
+ CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 0x24, /**< Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = Y width, U/V height = Y height. */
155
+ CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 0x25, /**< Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = 1/2 Y width, U/V height = Y height. */
156
+ CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 0x26, /**< Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
157
+ CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 0x27, /**< Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V height = Y height. */
158
+ CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 0x28, /**< Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V height = Y height. */
159
+ CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 0x29, /**< Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
160
+ CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 0x2A, /**< Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. */
161
+ CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 0x2B, /**< Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = Y height. */
162
+ CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 0x2C, /**< Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
163
+ CU_EGL_COLOR_FORMAT_BAYER_RGGB = 0x2D, /**< Bayer format - one channel in one surface with interleaved RGGB ordering. */
164
+ CU_EGL_COLOR_FORMAT_BAYER_BGGR = 0x2E, /**< Bayer format - one channel in one surface with interleaved BGGR ordering. */
165
+ CU_EGL_COLOR_FORMAT_BAYER_GRBG = 0x2F, /**< Bayer format - one channel in one surface with interleaved GRBG ordering. */
166
+ CU_EGL_COLOR_FORMAT_BAYER_GBRG = 0x30, /**< Bayer format - one channel in one surface with interleaved GBRG ordering. */
167
+ CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 0x31, /**< Bayer10 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 10 bits used 6 bits No-op. */
168
+ CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 0x32, /**< Bayer10 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 10 bits used 6 bits No-op. */
169
+ CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 0x33, /**< Bayer10 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 10 bits used 6 bits No-op. */
170
+ CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 0x34, /**< Bayer10 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 10 bits used 6 bits No-op. */
171
+ CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 0x35, /**< Bayer12 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 12 bits used 4 bits No-op. */
172
+ CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 0x36, /**< Bayer12 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 12 bits used 4 bits No-op. */
173
+ CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 0x37, /**< Bayer12 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 12 bits used 4 bits No-op. */
174
+ CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 0x38, /**< Bayer12 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 12 bits used 4 bits No-op. */
175
+ CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 0x39, /**< Bayer14 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 14 bits used 2 bits No-op. */
176
+ CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 0x3A, /**< Bayer14 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 14 bits used 2 bits No-op. */
177
+ CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 0x3B, /**< Bayer14 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 14 bits used 2 bits No-op. */
178
+ CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 0x3C, /**< Bayer14 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 14 bits used 2 bits No-op. */
179
+ CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 0x3D, /**< Bayer20 format - one channel in one surface with interleaved RGGB ordering. Out of 32 bits, 20 bits used 12 bits No-op. */
180
+ CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 0x3E, /**< Bayer20 format - one channel in one surface with interleaved BGGR ordering. Out of 32 bits, 20 bits used 12 bits No-op. */
181
+ CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 0x3F, /**< Bayer20 format - one channel in one surface with interleaved GRBG ordering. Out of 32 bits, 20 bits used 12 bits No-op. */
182
+ CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 0x40, /**< Bayer20 format - one channel in one surface with interleaved GBRG ordering. Out of 32 bits, 20 bits used 12 bits No-op. */
183
+ CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 0x41, /**< Y, V, U in three surfaces, each in a separate surface, U/V width = Y width, U/V height = Y height. */
184
+ CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 0x42, /**< Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = Y height. */
185
+ CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 0x43, /**< Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
186
+ CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 0x44, /**< Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved RGGB ordering and mapped to opaque integer datatype. */
187
+ CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 0x45, /**< Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved BGGR ordering and mapped to opaque integer datatype. */
188
+ CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 0x46, /**< Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved GRBG ordering and mapped to opaque integer datatype. */
189
+ CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 0x47, /**< Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved GBRG ordering and mapped to opaque integer datatype. */
190
+ CU_EGL_COLOR_FORMAT_BAYER_BCCR = 0x48, /**< Bayer format - one channel in one surface with interleaved BCCR ordering. */
191
+ CU_EGL_COLOR_FORMAT_BAYER_RCCB = 0x49, /**< Bayer format - one channel in one surface with interleaved RCCB ordering. */
192
+ CU_EGL_COLOR_FORMAT_BAYER_CRBC = 0x4A, /**< Bayer format - one channel in one surface with interleaved CRBC ordering. */
193
+ CU_EGL_COLOR_FORMAT_BAYER_CBRC = 0x4B, /**< Bayer format - one channel in one surface with interleaved CBRC ordering. */
194
+ CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 0x4C, /**< Bayer10 format - one channel in one surface with interleaved CCCC ordering. Out of 16 bits, 10 bits used 6 bits No-op. */
195
+ CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 0x4D, /**< Bayer12 format - one channel in one surface with interleaved BCCR ordering. Out of 16 bits, 12 bits used 4 bits No-op. */
196
+ CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 0x4E, /**< Bayer12 format - one channel in one surface with interleaved RCCB ordering. Out of 16 bits, 12 bits used 4 bits No-op. */
197
+ CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 0x4F, /**< Bayer12 format - one channel in one surface with interleaved CRBC ordering. Out of 16 bits, 12 bits used 4 bits No-op. */
198
+ CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 0x50, /**< Bayer12 format - one channel in one surface with interleaved CBRC ordering. Out of 16 bits, 12 bits used 4 bits No-op. */
199
+ CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 0x51, /**< Bayer12 format - one channel in one surface with interleaved CCCC ordering. Out of 16 bits, 12 bits used 4 bits No-op. */
200
+ CU_EGL_COLOR_FORMAT_Y = 0x52, /**< Color format for single Y plane. */
201
+ CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 0x53, /**< Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
202
+ CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 0x54, /**< Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
203
+ CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 0x55, /**< Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height= 1/2 Y height. */
204
+ CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 0x56, /**< Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V height
205
+ = 1/2 Y height. */
206
+ CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 0x57, /**< Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
207
+ CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 0x58, /**< Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
208
+ CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 0x59, /**< Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height
209
+ = 1/2 Y height. */
210
+ CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 0x5A, /**< Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
211
+ CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 0x5B, /**< Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
212
+ CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 0x5C, /**< Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
213
+ CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 0x5D, /**< Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V height = Y height. */
214
+ CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 0x5E, /**< Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V height = Y height. */
215
+ CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 0x5F, /**< Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V height = Y height. */
216
+ CU_EGL_COLOR_FORMAT_Y_ER = 0x60, /**< Extended Range Color format for single Y plane. */
217
+ CU_EGL_COLOR_FORMAT_Y_709_ER = 0x61, /**< Extended Range Color format for single Y plane. */
218
+ CU_EGL_COLOR_FORMAT_Y10_ER = 0x62, /**< Extended Range Color format for single Y10 plane. */
219
+ CU_EGL_COLOR_FORMAT_Y10_709_ER = 0x63, /**< Extended Range Color format for single Y10 plane. */
220
+ CU_EGL_COLOR_FORMAT_Y12_ER = 0x64, /**< Extended Range Color format for single Y12 plane. */
221
+ CU_EGL_COLOR_FORMAT_Y12_709_ER = 0x65, /**< Extended Range Color format for single Y12 plane. */
222
+ CU_EGL_COLOR_FORMAT_YUVA = 0x66, /**< Y, U, V, A four channels in one surface, interleaved as AVUY. */
223
+ CU_EGL_COLOR_FORMAT_YUV = 0x67, /**< Y, U, V three channels in one surface, interleaved as VUY. Only pitch linear format supported. */
224
+ CU_EGL_COLOR_FORMAT_YVYU = 0x68, /**< Y, U, V in one surface, interleaved as YVYU in one channel. */
225
+ CU_EGL_COLOR_FORMAT_VYUY = 0x69, /**< Y, U, V in one surface, interleaved as VYUY in one channel. */
226
+ CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 0x6A, /**< Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
227
+ CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 0x6B, /**< Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
228
+ CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 0x6C, /**< Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. */
229
+ CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 0x6D, /**< Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. */
230
+ CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 0x6E, /**< Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
231
+ CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 0x6F, /**< Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. */
232
+ CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 0x70, /**< Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. */
233
+ CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 0x71, /**< Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. */
234
+ CU_EGL_COLOR_FORMAT_MAX
235
+ } CUeglColorFormat;
236
+
237
+ /**
238
+ * CUDA EGLFrame structure Descriptor - structure defining one frame of EGL.
239
+ *
240
+ * Each frame may contain one or more planes depending on whether the surface * is Multiplanar or not.
241
+ */
242
+ typedef struct CUeglFrame_st {
243
+ union {
244
+ CUarray pArray[MAX_PLANES]; /**< Array of CUarray corresponding to each plane*/
245
+ void* pPitch[MAX_PLANES]; /**< Array of Pointers corresponding to each plane*/
246
+ } frame;
247
+ unsigned int width; /**< Width of first plane */
248
+ unsigned int height; /**< Height of first plane */
249
+ unsigned int depth; /**< Depth of first plane */
250
+ unsigned int pitch; /**< Pitch of first plane */
251
+ unsigned int planeCount; /**< Number of planes */
252
+ unsigned int numChannels; /**< Number of channels for the plane */
253
+ CUeglFrameType frameType; /**< Array or Pitch */
254
+ CUeglColorFormat eglColorFormat; /**< CUDA EGL Color Format*/
255
+ CUarray_format cuFormat; /**< CUDA Array Format*/
256
+ } CUeglFrame_v1;
257
+ typedef CUeglFrame_v1 CUeglFrame;
258
+
259
+ /**
260
+ * CUDA EGLSream Connection
261
+ */
262
+ typedef struct CUeglStreamConnection_st* CUeglStreamConnection;
263
+
264
+ /** @} */ /* END CUDA_TYPES */
265
+
266
+ /**
267
+ * \file cudaEGL.h
268
+ * \brief Header file for the EGL interoperability functions of the
269
+ * low-level CUDA driver application programming interface.
270
+ */
271
+
272
+ /**
273
+ * \defgroup CUDA_EGL EGL Interoperability
274
+ * \ingroup CUDA_DRIVER
275
+ *
276
+ * ___MANBRIEF___ EGL interoperability functions of the low-level CUDA
277
+ * driver API (___CURRENT_FILE___) ___ENDMANBRIEF___
278
+ *
279
+ * This section describes the EGL interoperability functions of the
280
+ * low-level CUDA driver application programming interface.
281
+ *
282
+ * @{
283
+ */
284
+
285
+ /**
286
+ * \brief Registers an EGL image
287
+ *
288
+ * Registers the EGLImageKHR specified by \p image for access by
289
+ * CUDA. A handle to the registered object is returned as \p pCudaResource.
290
+ * Additional Mapping/Unmapping is not required for the registered resource and
291
+ * ::cuGraphicsResourceGetMappedEglFrame can be directly called on the \p pCudaResource.
292
+ *
293
+ * The application will be responsible for synchronizing access to shared objects.
294
+ * The application must ensure that any pending operation which access the objects have completed
295
+ * before passing control to CUDA. This may be accomplished by issuing and waiting for
296
+ * glFinish command on all GLcontexts (for OpenGL and likewise for other APIs).
297
+ * The application will be also responsible for ensuring that any pending operation on the
298
+ * registered CUDA resource has completed prior to executing subsequent commands in other APIs
299
+ * accesing the same memory objects.
300
+ * This can be accomplished by calling cuCtxSynchronize or cuEventSynchronize (preferably).
301
+ *
302
+ * The surface's intended usage is specified using \p flags, as follows:
303
+ *
304
+ * - ::CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this
305
+ * resource will be used. It is therefore assumed that this resource will be
306
+ * read from and written to by CUDA. This is the default value.
307
+ * - ::CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY: Specifies that CUDA
308
+ * will not write to this resource.
309
+ * - ::CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD: Specifies that
310
+ * CUDA will not read from this resource and will write over the
311
+ * entire contents of the resource, so none of the data previously
312
+ * stored in the resource will be preserved.
313
+ *
314
+ * The EGLImageKHR is an object which can be used to create EGLImage target resource. It is defined as a void pointer.
315
+ * typedef void* EGLImageKHR
316
+ *
317
+ * \param pCudaResource - Pointer to the returned object handle
318
+ * \param image - An EGLImageKHR image which can be used to create target resource.
319
+ * \param flags - Map flags
320
+ *
321
+ * \return
322
+ * ::CUDA_SUCCESS,
323
+ * ::CUDA_ERROR_INVALID_HANDLE,
324
+ * ::CUDA_ERROR_ALREADY_MAPPED,
325
+ * ::CUDA_ERROR_INVALID_CONTEXT,
326
+ *
327
+ * \sa ::cuGraphicsEGLRegisterImage, ::cuGraphicsUnregisterResource,
328
+ * ::cuGraphicsResourceSetMapFlags, ::cuGraphicsMapResources,
329
+ * ::cuGraphicsUnmapResources,
330
+ * ::cudaGraphicsEGLRegisterImage
331
+ */
332
+ CUresult CUDAAPI cuGraphicsEGLRegisterImage(CUgraphicsResource *pCudaResource, EGLImageKHR image, unsigned int flags);
333
+
334
+ /**
335
+ * \brief Connect CUDA to EGLStream as a consumer.
336
+ *
337
+ * Connect CUDA as a consumer to EGLStreamKHR specified by \p stream.
338
+ *
339
+ * The EGLStreamKHR is an EGL object that transfers a sequence of image frames from one
340
+ * API to another.
341
+ *
342
+ * \param conn - Pointer to the returned connection handle
343
+ * \param stream - EGLStreamKHR handle
344
+ *
345
+ * \return
346
+ * ::CUDA_SUCCESS,
347
+ * ::CUDA_ERROR_INVALID_HANDLE,
348
+ * ::CUDA_ERROR_INVALID_CONTEXT,
349
+ *
350
+ * \sa ::cuEGLStreamConsumerConnect, ::cuEGLStreamConsumerDisconnect,
351
+ * ::cuEGLStreamConsumerAcquireFrame, ::cuEGLStreamConsumerReleaseFrame,
352
+ * ::cudaEGLStreamConsumerConnect
353
+ */
354
+ CUresult CUDAAPI cuEGLStreamConsumerConnect(CUeglStreamConnection *conn, EGLStreamKHR stream);
355
+
356
+ /**
357
+ * \brief Connect CUDA to EGLStream as a consumer with given flags.
358
+ *
359
+ * Connect CUDA as a consumer to EGLStreamKHR specified by \p stream with specified \p flags defined by CUeglResourceLocationFlags.
360
+ *
361
+ * The flags specify whether the consumer wants to access frames from system memory or video memory.
362
+ * Default is ::CU_EGL_RESOURCE_LOCATION_VIDMEM.
363
+ *
364
+ * \param conn - Pointer to the returned connection handle
365
+ * \param stream - EGLStreamKHR handle
366
+ * \param flags - Flags denote intended location - system or video.
367
+ *
368
+ * \return
369
+ * ::CUDA_SUCCESS,
370
+ * ::CUDA_ERROR_INVALID_HANDLE,
371
+ * ::CUDA_ERROR_INVALID_CONTEXT,
372
+ *
373
+ * \sa ::cuEGLStreamConsumerConnect, ::cuEGLStreamConsumerDisconnect,
374
+ * ::cuEGLStreamConsumerAcquireFrame, ::cuEGLStreamConsumerReleaseFrame,
375
+ * ::cudaEGLStreamConsumerConnectWithFlags
376
+ */
377
+
378
+ CUresult CUDAAPI cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection *conn, EGLStreamKHR stream, unsigned int flags);
379
+
380
+ /**
381
+ * \brief Disconnect CUDA as a consumer to EGLStream .
382
+ *
383
+ * Disconnect CUDA as a consumer to EGLStreamKHR.
384
+ *
385
+ * \param conn - Conection to disconnect.
386
+ *
387
+ * \return
388
+ * ::CUDA_SUCCESS,
389
+ * ::CUDA_ERROR_INVALID_HANDLE,
390
+ * ::CUDA_ERROR_INVALID_CONTEXT,
391
+ *
392
+ * \sa ::cuEGLStreamConsumerConnect, ::cuEGLStreamConsumerDisconnect,
393
+ * ::cuEGLStreamConsumerAcquireFrame, ::cuEGLStreamConsumerReleaseFrame,
394
+ * ::cudaEGLStreamConsumerDisconnect
395
+ */
396
+ CUresult CUDAAPI cuEGLStreamConsumerDisconnect(CUeglStreamConnection *conn);
397
+
398
+ /**
399
+ * \brief Acquire an image frame from the EGLStream with CUDA as a consumer.
400
+ *
401
+ * Acquire an image frame from EGLStreamKHR. This API can also acquire an old frame presented
402
+ * by the producer unless explicitly disabled by setting EGL_SUPPORT_REUSE_NV flag to EGL_FALSE
403
+ * during stream initialization. By default, EGLStream is created with this flag set to EGL_TRUE.
404
+ * ::cuGraphicsResourceGetMappedEglFrame can be called on \p pCudaResource to get
405
+ * ::CUeglFrame.
406
+ *
407
+ * \param conn - Connection on which to acquire
408
+ * \param pCudaResource - CUDA resource on which the stream frame will be mapped for use.
409
+ * \param pStream - CUDA stream for synchronization and any data migrations
410
+ * implied by ::CUeglResourceLocationFlags.
411
+ * \param timeout - Desired timeout in usec for a new frame to be acquired.
412
+ * If set as ::CUDA_EGL_INFINITE_TIMEOUT, acquire waits infinitely.
413
+ * After timeout occurs CUDA consumer tries to acquire an old frame
414
+ * if available and EGL_SUPPORT_REUSE_NV flag is set.
415
+ *
416
+ * \return
417
+ * ::CUDA_SUCCESS,
418
+ * ::CUDA_ERROR_INVALID_HANDLE,
419
+ * ::CUDA_ERROR_LAUNCH_TIMEOUT,
420
+ *
421
+ * \sa ::cuEGLStreamConsumerConnect, ::cuEGLStreamConsumerDisconnect,
422
+ * ::cuEGLStreamConsumerAcquireFrame, ::cuEGLStreamConsumerReleaseFrame,
423
+ * ::cudaEGLStreamConsumerAcquireFrame
424
+ */
425
+ CUresult CUDAAPI cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection *conn,
426
+ CUgraphicsResource *pCudaResource, CUstream *pStream, unsigned int timeout);
427
+ /**
428
+ * \brief Releases the last frame acquired from the EGLStream.
429
+ *
430
+ * Release the acquired image frame specified by \p pCudaResource to EGLStreamKHR.
431
+ * If EGL_SUPPORT_REUSE_NV flag is set to EGL_TRUE, at the time of EGL creation
432
+ * this API doesn't release the last frame acquired on the EGLStream.
433
+ * By default, EGLStream is created with this flag set to EGL_TRUE.
434
+ *
435
+ * \param conn - Connection on which to release
436
+ * \param pCudaResource - CUDA resource whose corresponding frame is to be released
437
+ * \param pStream - CUDA stream on which release will be done.
438
+ *
439
+ * \return
440
+ * ::CUDA_SUCCESS,
441
+ * ::CUDA_ERROR_INVALID_HANDLE,
442
+ *
443
+ * \sa ::cuEGLStreamConsumerConnect, ::cuEGLStreamConsumerDisconnect,
444
+ * ::cuEGLStreamConsumerAcquireFrame, ::cuEGLStreamConsumerReleaseFrame,
445
+ * ::cudaEGLStreamConsumerReleaseFrame
446
+ */
447
+ CUresult CUDAAPI cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection *conn,
448
+ CUgraphicsResource pCudaResource, CUstream *pStream);
449
+
450
+ /**
451
+ * \brief Connect CUDA to EGLStream as a producer.
452
+ *
453
+ * Connect CUDA as a producer to EGLStreamKHR specified by \p stream.
454
+ *
455
+ * The EGLStreamKHR is an EGL object that transfers a sequence of image frames from one
456
+ * API to another.
457
+ *
458
+ * \param conn - Pointer to the returned connection handle
459
+ * \param stream - EGLStreamKHR handle
460
+ * \param width - width of the image to be submitted to the stream
461
+ * \param height - height of the image to be submitted to the stream
462
+ *
463
+ * \return
464
+ * ::CUDA_SUCCESS,
465
+ * ::CUDA_ERROR_INVALID_HANDLE,
466
+ * ::CUDA_ERROR_INVALID_CONTEXT,
467
+ *
468
+ * \sa ::cuEGLStreamProducerConnect, ::cuEGLStreamProducerDisconnect,
469
+ * ::cuEGLStreamProducerPresentFrame,
470
+ * ::cudaEGLStreamProducerConnect
471
+ */
472
+ CUresult CUDAAPI cuEGLStreamProducerConnect(CUeglStreamConnection *conn, EGLStreamKHR stream,
473
+ EGLint width, EGLint height);
474
+
475
+ /**
476
+ * \brief Disconnect CUDA as a producer to EGLStream .
477
+ *
478
+ * Disconnect CUDA as a producer to EGLStreamKHR.
479
+ *
480
+ * \param conn - Conection to disconnect.
481
+ *
482
+ * \return
483
+ * ::CUDA_SUCCESS,
484
+ * ::CUDA_ERROR_INVALID_HANDLE,
485
+ * ::CUDA_ERROR_INVALID_CONTEXT,
486
+ *
487
+ * \sa ::cuEGLStreamProducerConnect, ::cuEGLStreamProducerDisconnect,
488
+ * ::cuEGLStreamProducerPresentFrame,
489
+ * ::cudaEGLStreamProducerDisconnect
490
+ */
491
+ CUresult CUDAAPI cuEGLStreamProducerDisconnect(CUeglStreamConnection *conn);
492
+
493
+ /**
494
+ * \brief Present a CUDA eglFrame to the EGLStream with CUDA as a producer.
495
+ *
496
+ * When a frame is presented by the producer, it gets associated with the EGLStream
497
+ * and thus it is illegal to free the frame before the producer is disconnected.
498
+ * If a frame is freed and reused it may lead to undefined behavior.
499
+ *
500
+ * If producer and consumer are on different GPUs (iGPU and dGPU) then frametype
501
+ * ::CU_EGL_FRAME_TYPE_ARRAY is not supported. ::CU_EGL_FRAME_TYPE_PITCH can be used for
502
+ * such cross-device applications.
503
+ *
504
+ * The ::CUeglFrame is defined as:
505
+ * \code
506
+ * typedef struct CUeglFrame_st {
507
+ * union {
508
+ * CUarray pArray[MAX_PLANES];
509
+ * void* pPitch[MAX_PLANES];
510
+ * } frame;
511
+ * unsigned int width;
512
+ * unsigned int height;
513
+ * unsigned int depth;
514
+ * unsigned int pitch;
515
+ * unsigned int planeCount;
516
+ * unsigned int numChannels;
517
+ * CUeglFrameType frameType;
518
+ * CUeglColorFormat eglColorFormat;
519
+ * CUarray_format cuFormat;
520
+ * } CUeglFrame;
521
+ * \endcode
522
+ *
523
+ * For ::CUeglFrame of type ::CU_EGL_FRAME_TYPE_PITCH, the application may present sub-region of a memory
524
+ * allocation. In that case, the pitched pointer will specify the start address of the sub-region in
525
+ * the allocation and corresponding ::CUeglFrame fields will specify the dimensions of the sub-region.
526
+ *
527
+ * \param conn - Connection on which to present the CUDA array
528
+ * \param eglframe - CUDA Eglstream Proucer Frame handle to be sent to the consumer over EglStream.
529
+ * \param pStream - CUDA stream on which to present the frame.
530
+ *
531
+ * \return
532
+ * ::CUDA_SUCCESS,
533
+ * ::CUDA_ERROR_INVALID_HANDLE,
534
+ *
535
+ * \sa ::cuEGLStreamProducerConnect, ::cuEGLStreamProducerDisconnect,
536
+ * ::cuEGLStreamProducerReturnFrame,
537
+ * ::cudaEGLStreamProducerPresentFrame
538
+ */
539
+ CUresult CUDAAPI cuEGLStreamProducerPresentFrame(CUeglStreamConnection *conn,
540
+ CUeglFrame eglframe, CUstream *pStream);
541
+
542
+ /**
543
+ * \brief Return the CUDA eglFrame to the EGLStream released by the consumer.
544
+ *
545
+ * This API can potentially return CUDA_ERROR_LAUNCH_TIMEOUT if the consumer has not
546
+ * returned a frame to EGL stream. If timeout is returned the application can retry.
547
+ *
548
+ * \param conn - Connection on which to return
549
+ * \param eglframe - CUDA Eglstream Proucer Frame handle returned from the consumer over EglStream.
550
+ * \param pStream - CUDA stream on which to return the frame.
551
+ *
552
+ * \return
553
+ * ::CUDA_SUCCESS,
554
+ * ::CUDA_ERROR_INVALID_HANDLE,
555
+ * ::CUDA_ERROR_LAUNCH_TIMEOUT
556
+ *
557
+ * \sa ::cuEGLStreamProducerConnect, ::cuEGLStreamProducerDisconnect,
558
+ * ::cuEGLStreamProducerPresentFrame,
559
+ * ::cudaEGLStreamProducerReturnFrame
560
+ */
561
+ CUresult CUDAAPI cuEGLStreamProducerReturnFrame(CUeglStreamConnection *conn,
562
+ CUeglFrame *eglframe, CUstream *pStream);
563
+
564
+ /**
565
+ * \brief Get an eglFrame through which to access a registered EGL graphics resource.
566
+ *
567
+ * Returns in \p *eglFrame an eglFrame pointer through which the registered graphics resource
568
+ * \p resource may be accessed.
569
+ * This API can only be called for registered EGL graphics resources.
570
+ *
571
+ * The ::CUeglFrame is defined as:
572
+ * \code
573
+ * typedef struct CUeglFrame_st {
574
+ * union {
575
+ * CUarray pArray[MAX_PLANES];
576
+ * void* pPitch[MAX_PLANES];
577
+ * } frame;
578
+ * unsigned int width;
579
+ * unsigned int height;
580
+ * unsigned int depth;
581
+ * unsigned int pitch;
582
+ * unsigned int planeCount;
583
+ * unsigned int numChannels;
584
+ * CUeglFrameType frameType;
585
+ * CUeglColorFormat eglColorFormat;
586
+ * CUarray_format cuFormat;
587
+ * } CUeglFrame;
588
+ * \endcode
589
+ *
590
+ * If \p resource is not registered then ::CUDA_ERROR_NOT_MAPPED is returned.
591
+ * *
592
+ * \param eglFrame - Returned eglFrame.
593
+ * \param resource - Registered resource to access.
594
+ * \param index - Index for cubemap surfaces.
595
+ * \param mipLevel - Mipmap level for the subresource to access.
596
+ *
597
+ * \return
598
+ * ::CUDA_SUCCESS,
599
+ * ::CUDA_ERROR_DEINITIALIZED,
600
+ * ::CUDA_ERROR_NOT_INITIALIZED,
601
+ * ::CUDA_ERROR_INVALID_CONTEXT,
602
+ * ::CUDA_ERROR_INVALID_VALUE,
603
+ * ::CUDA_ERROR_INVALID_HANDLE,
604
+ * ::CUDA_ERROR_NOT_MAPPED
605
+ *
606
+ * \sa
607
+ * ::cuGraphicsMapResources,
608
+ * ::cuGraphicsSubResourceGetMappedArray,
609
+ * ::cuGraphicsResourceGetMappedPointer,
610
+ * ::cudaGraphicsResourceGetMappedEglFrame
611
+ */
612
+ CUresult CUDAAPI cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel);
613
+
614
+ /**
615
+ * \brief Creates an event from EGLSync object
616
+ *
617
+ * Creates an event *phEvent from an EGLSyncKHR eglSync with the flags specified
618
+ * via \p flags. Valid flags include:
619
+ * - ::CU_EVENT_DEFAULT: Default event creation flag.
620
+ * - ::CU_EVENT_BLOCKING_SYNC: Specifies that the created event should use blocking
621
+ * synchronization. A CPU thread that uses ::cuEventSynchronize() to wait on
622
+ * an event created with this flag will block until the event has actually
623
+ * been completed.
624
+ *
625
+ * Once the \p eglSync gets destroyed, ::cuEventDestroy is the only API
626
+ * that can be invoked on the event.
627
+ *
628
+ * ::cuEventRecord and TimingData are not supported for events created from EGLSync.
629
+ *
630
+ * The EGLSyncKHR is an opaque handle to an EGL sync object.
631
+ * typedef void* EGLSyncKHR
632
+ *
633
+ * \param phEvent - Returns newly created event
634
+ * \param eglSync - Opaque handle to EGLSync object
635
+ * \param flags - Event creation flags
636
+ *
637
+ * \return
638
+ * ::CUDA_SUCCESS,
639
+ * ::CUDA_ERROR_DEINITIALIZED,
640
+ * ::CUDA_ERROR_NOT_INITIALIZED,
641
+ * ::CUDA_ERROR_INVALID_CONTEXT,
642
+ * ::CUDA_ERROR_INVALID_VALUE,
643
+ * ::CUDA_ERROR_OUT_OF_MEMORY
644
+ *
645
+ * \sa
646
+ * ::cuEventQuery,
647
+ * ::cuEventSynchronize,
648
+ * ::cuEventDestroy
649
+ */
650
+ CUresult CUDAAPI cuEventCreateFromEGLSync(CUevent *phEvent, EGLSyncKHR eglSync, unsigned int flags);
651
+
652
+ /** @} */ /* END CUDA_EGL */
653
+
654
+ #ifdef __cplusplus
655
+ };
656
+ #endif
657
+
658
+ #endif
659
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cudaTypedefs.h ADDED
The diff for this file is too large to render. See raw diff
 
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_bf16.h ADDED
The diff for this file is too large to render. See raw diff
 
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_bf16.hpp ADDED
The diff for this file is too large to render. See raw diff
 
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_device_runtime_api.h ADDED
@@ -0,0 +1,744 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 1993-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(__CUDA_DEVICE_RUNTIME_API_H__)
51
+ #define __CUDA_DEVICE_RUNTIME_API_H__
52
+
53
+ #if defined(__CUDACC__) && !defined(__CUDACC_RTC__)
54
+ #include <stdlib.h>
55
+ #endif
56
+
57
+ /*******************************************************************************
58
+ * *
59
+ * *
60
+ * *
61
+ *******************************************************************************/
62
+
63
+ #if !defined(CUDA_FORCE_CDP1_IF_SUPPORTED) && !defined(__CUDADEVRT_INTERNAL__) && !defined(_NVHPC_CUDA) && !(defined(_WIN32) && !defined(_WIN64))
64
+ #define __CUDA_INTERNAL_USE_CDP2
65
+ #endif
66
+
67
+ #if !defined(__CUDACC_RTC__)
68
+
69
+ #if !defined(__CUDACC_INTERNAL_NO_STUBS__) && !defined(__CUDACC_RDC__) && !defined(__CUDACC_EWP__) && defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 350) && !defined(__CUDADEVRT_INTERNAL__)
70
+
71
+ #if defined(__cplusplus)
72
+ extern "C" {
73
+ #endif
74
+
75
+ struct cudaFuncAttributes;
76
+
77
+
78
+ #ifndef __CUDA_INTERNAL_USE_CDP2
79
+ inline __device__ cudaError_t CUDARTAPI cudaMalloc(void **p, size_t s)
80
+ {
81
+ return cudaErrorUnknown;
82
+ }
83
+
84
+ inline __device__ cudaError_t CUDARTAPI cudaFuncGetAttributes(struct cudaFuncAttributes *p, const void *c)
85
+ {
86
+ return cudaErrorUnknown;
87
+ }
88
+
89
+ inline __device__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device)
90
+ {
91
+ return cudaErrorUnknown;
92
+ }
93
+
94
+ inline __device__ cudaError_t CUDARTAPI cudaGetDevice(int *device)
95
+ {
96
+ return cudaErrorUnknown;
97
+ }
98
+
99
+ inline __device__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize)
100
+ {
101
+ return cudaErrorUnknown;
102
+ }
103
+
104
+ inline __device__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize, unsigned int flags)
105
+ {
106
+ return cudaErrorUnknown;
107
+ }
108
+ #else // __CUDA_INTERNAL_USE_CDP2
109
+ inline __device__ cudaError_t CUDARTAPI __cudaCDP2Malloc(void **p, size_t s)
110
+ {
111
+ return cudaErrorUnknown;
112
+ }
113
+
114
+ inline __device__ cudaError_t CUDARTAPI __cudaCDP2FuncGetAttributes(struct cudaFuncAttributes *p, const void *c)
115
+ {
116
+ return cudaErrorUnknown;
117
+ }
118
+
119
+ inline __device__ cudaError_t CUDARTAPI __cudaCDP2DeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device)
120
+ {
121
+ return cudaErrorUnknown;
122
+ }
123
+
124
+ inline __device__ cudaError_t CUDARTAPI __cudaCDP2GetDevice(int *device)
125
+ {
126
+ return cudaErrorUnknown;
127
+ }
128
+
129
+ inline __device__ cudaError_t CUDARTAPI __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize)
130
+ {
131
+ return cudaErrorUnknown;
132
+ }
133
+
134
+ inline __device__ cudaError_t CUDARTAPI __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize, unsigned int flags)
135
+ {
136
+ return cudaErrorUnknown;
137
+ }
138
+ #endif // __CUDA_INTERNAL_USE_CDP2
139
+
140
+
141
+ #if defined(__cplusplus)
142
+ }
143
+ #endif
144
+
145
+ #endif /* !defined(__CUDACC_INTERNAL_NO_STUBS__) && !defined(__CUDACC_RDC__) && !defined(__CUDACC_EWP__) && defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 350) && !defined(__CUDADEVRT_INTERNAL__) */
146
+
147
+ #endif /* !defined(__CUDACC_RTC__) */
148
+
149
+ #if defined(__DOXYGEN_ONLY__) || defined(CUDA_ENABLE_DEPRECATED)
150
+ # define __DEPRECATED__(msg)
151
+ #elif defined(_WIN32)
152
+ # define __DEPRECATED__(msg) __declspec(deprecated(msg))
153
+ #elif (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5 && !defined(__clang__))))
154
+ # define __DEPRECATED__(msg) __attribute__((deprecated))
155
+ #else
156
+ # define __DEPRECATED__(msg) __attribute__((deprecated(msg)))
157
+ #endif
158
+
159
+ #if defined(__CUDA_ARCH__) && !defined(__CDPRT_SUPPRESS_SYNC_DEPRECATION_WARNING)
160
+ # define __CDPRT_DEPRECATED(func_name) __DEPRECATED__("Use of "#func_name" from device code is deprecated. Moreover, such use will cause this module to fail to load on sm_90+ devices. If calls to "#func_name" from device code cannot be removed for older devices at this time, you may guard them with __CUDA_ARCH__ macros to remove them only for sm_90+ devices, making sure to generate code for compute_90 for the macros to take effect. Note that this mitigation will no longer work when support for "#func_name" from device code is eventually dropped for all devices. Disable this warning with -D__CDPRT_SUPPRESS_SYNC_DEPRECATION_WARNING.")
161
+ #else
162
+ # define __CDPRT_DEPRECATED(func_name)
163
+ #endif
164
+
165
+ #if defined(__cplusplus) && defined(__CUDACC__) /* Visible to nvcc front-end only */
166
+ #if !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 350) // Visible to SM>=3.5 and "__host__ __device__" only
167
+
168
+ #include "driver_types.h"
169
+ #include "crt/host_defines.h"
170
+
171
+ #define cudaStreamGraphTailLaunch (cudaStream_t)0x0100000000000000
172
+ #define cudaStreamGraphFireAndForget (cudaStream_t)0x0200000000000000
173
+ #define cudaStreamGraphFireAndForgetAsSibling (cudaStream_t)0x0300000000000000
174
+
175
+ #ifdef __CUDA_INTERNAL_USE_CDP2
176
+ #define cudaStreamTailLaunch ((cudaStream_t)0x3) /**< Per-grid stream with a tail launch semantics. Only applicable when used with CUDA Dynamic Parallelism. */
177
+ #define cudaStreamFireAndForget ((cudaStream_t)0x4) /**< Per-grid stream with a fire-and-forget synchronization behavior. Only applicable when used with CUDA Dynamic Parallelism. */
178
+ #endif
179
+
180
+ extern "C"
181
+ {
182
+
183
+ // Symbols beginning with __cudaCDP* should not be used outside
184
+ // this header file. Instead, compile with -DCUDA_FORCE_CDP1_IF_SUPPORTED if
185
+ // CDP1 support is required.
186
+
187
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaDeviceSynchronizeDeprecationAvoidance(void);
188
+
189
+ #ifndef __CUDA_INTERNAL_USE_CDP2
190
+ //// CDP1 endpoints
191
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device);
192
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetLimit(size_t *pValue, enum cudaLimit limit);
193
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetCacheConfig(enum cudaFuncCache *pCacheConfig);
194
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetSharedMemConfig(enum cudaSharedMemConfig *pConfig);
195
+ #if (__CUDA_ARCH__ < 900) && (defined(CUDA_FORCE_CDP1_IF_SUPPORTED) || (defined(_WIN32) && !defined(_WIN64)))
196
+ // cudaDeviceSynchronize is removed on sm_90+
197
+ extern __device__ __cudart_builtin__ __CDPRT_DEPRECATED(cudaDeviceSynchronize) cudaError_t CUDARTAPI cudaDeviceSynchronize(void);
198
+ #endif
199
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetLastError(void);
200
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaPeekAtLastError(void);
201
+ extern __device__ __cudart_builtin__ const char* CUDARTAPI cudaGetErrorString(cudaError_t error);
202
+ extern __device__ __cudart_builtin__ const char* CUDARTAPI cudaGetErrorName(cudaError_t error);
203
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDeviceCount(int *count);
204
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDevice(int *device);
205
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamCreateWithFlags(cudaStream_t *pStream, unsigned int flags);
206
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamDestroy(cudaStream_t stream);
207
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
208
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamWaitEvent_ptsz(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
209
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventCreateWithFlags(cudaEvent_t *event, unsigned int flags);
210
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecord(cudaEvent_t event, cudaStream_t stream);
211
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecord_ptsz(cudaEvent_t event, cudaStream_t stream);
212
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags);
213
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecordWithFlags_ptsz(cudaEvent_t event, cudaStream_t stream, unsigned int flags);
214
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventDestroy(cudaEvent_t event);
215
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncGetAttributes(struct cudaFuncAttributes *attr, const void *func);
216
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFree(void *devPtr);
217
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMalloc(void **devPtr, size_t size);
218
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpyAsync(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream);
219
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpyAsync_ptsz(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream);
220
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream);
221
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy2DAsync_ptsz(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream);
222
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy3DAsync(const struct cudaMemcpy3DParms *p, cudaStream_t stream);
223
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy3DAsync_ptsz(const struct cudaMemcpy3DParms *p, cudaStream_t stream);
224
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemsetAsync(void *devPtr, int value, size_t count, cudaStream_t stream);
225
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemsetAsync_ptsz(void *devPtr, int value, size_t count, cudaStream_t stream);
226
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream);
227
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset2DAsync_ptsz(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream);
228
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset3DAsync(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream);
229
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset3DAsync_ptsz(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream);
230
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaRuntimeGetVersion(int *runtimeVersion);
231
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize);
232
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize, unsigned int flags);
233
+ #endif // __CUDA_INTERNAL_USE_CDP2
234
+
235
+ //// CDP2 endpoints
236
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2DeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device);
237
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2DeviceGetLimit(size_t *pValue, enum cudaLimit limit);
238
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2DeviceGetCacheConfig(enum cudaFuncCache *pCacheConfig);
239
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2DeviceGetSharedMemConfig(enum cudaSharedMemConfig *pConfig);
240
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2GetLastError(void);
241
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2PeekAtLastError(void);
242
+ extern __device__ __cudart_builtin__ const char* CUDARTAPI __cudaCDP2GetErrorString(cudaError_t error);
243
+ extern __device__ __cudart_builtin__ const char* CUDARTAPI __cudaCDP2GetErrorName(cudaError_t error);
244
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2GetDeviceCount(int *count);
245
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2GetDevice(int *device);
246
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2StreamCreateWithFlags(cudaStream_t *pStream, unsigned int flags);
247
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2StreamDestroy(cudaStream_t stream);
248
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2StreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
249
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2StreamWaitEvent_ptsz(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
250
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventCreateWithFlags(cudaEvent_t *event, unsigned int flags);
251
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventRecord(cudaEvent_t event, cudaStream_t stream);
252
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventRecord_ptsz(cudaEvent_t event, cudaStream_t stream);
253
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags);
254
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventRecordWithFlags_ptsz(cudaEvent_t event, cudaStream_t stream, unsigned int flags);
255
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventDestroy(cudaEvent_t event);
256
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2FuncGetAttributes(struct cudaFuncAttributes *attr, const void *func);
257
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Free(void *devPtr);
258
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Malloc(void **devPtr, size_t size);
259
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2MemcpyAsync(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream);
260
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2MemcpyAsync_ptsz(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream);
261
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream);
262
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memcpy2DAsync_ptsz(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream);
263
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memcpy3DAsync(const struct cudaMemcpy3DParms *p, cudaStream_t stream);
264
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memcpy3DAsync_ptsz(const struct cudaMemcpy3DParms *p, cudaStream_t stream);
265
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2MemsetAsync(void *devPtr, int value, size_t count, cudaStream_t stream);
266
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2MemsetAsync_ptsz(void *devPtr, int value, size_t count, cudaStream_t stream);
267
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream);
268
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memset2DAsync_ptsz(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream);
269
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memset3DAsync(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream);
270
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memset3DAsync_ptsz(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream);
271
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2RuntimeGetVersion(int *runtimeVersion);
272
+ extern __device__ __cudart_builtin__ void * CUDARTAPI __cudaCDP2GetParameterBuffer(size_t alignment, size_t size);
273
+ extern __device__ __cudart_builtin__ void * CUDARTAPI __cudaCDP2GetParameterBufferV2(void *func, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize);
274
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2LaunchDevice_ptsz(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream);
275
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2LaunchDeviceV2_ptsz(void *parameterBuffer, cudaStream_t stream);
276
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2LaunchDevice(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream);
277
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2LaunchDeviceV2(void *parameterBuffer, cudaStream_t stream);
278
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize);
279
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize, unsigned int flags);
280
+
281
+
282
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream);
283
+ #if defined(CUDA_API_PER_THREAD_DEFAULT_STREAM)
284
+ static inline __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGraphLaunch_ptsz(cudaGraphExec_t graphExec, cudaStream_t stream)
285
+ {
286
+ if (stream == 0) {
287
+ stream = cudaStreamPerThread;
288
+ }
289
+ return cudaGraphLaunch(graphExec, stream);
290
+ }
291
+ #endif
292
+
293
+ /**
294
+ * \ingroup CUDART_GRAPH
295
+ * \brief Get the currently running device graph id.
296
+ *
297
+ * Get the currently running device graph id.
298
+ * \return Returns the current device graph id, 0 if the call is outside of a device graph.
299
+ * \sa cudaGraphLaunch
300
+ */
301
+ static inline __device__ __cudart_builtin__ cudaGraphExec_t CUDARTAPI cudaGetCurrentGraphExec(void)
302
+ {
303
+ unsigned long long current_graph_exec;
304
+ asm ("mov.u64 %0, %%current_graph_exec;" : "=l"(current_graph_exec));
305
+ return (cudaGraphExec_t)current_graph_exec;
306
+ }
307
+
308
+ /**
309
+ * \ingroup CUDART_EXECUTION
310
+ * \brief Programmatic dependency trigger
311
+ *
312
+ * This device function ensures the programmatic launch completion edges /
313
+ * events are fulfilled. See
314
+ * ::cudaLaunchAttributeID::cudaLaunchAttributeProgrammaticStreamSerialization
315
+ * and ::cudaLaunchAttributeID::cudaLaunchAttributeProgrammaticEvent for more
316
+ * information. The event / edge kick off only happens when every CTAs
317
+ * in the grid has either exited or called this function at least once,
318
+ * otherwise the kick off happens automatically after all warps finishes
319
+ * execution but before the grid completes. The kick off only enables
320
+ * scheduling of the secondary kernel. It provides no memory visibility
321
+ * guarantee itself. The user could enforce memory visibility by inserting a
322
+ * memory fence of the correct scope.
323
+ */
324
+ static inline __device__ __cudart_builtin__ void CUDARTAPI cudaTriggerProgrammaticLaunchCompletion(void)
325
+ {
326
+ asm volatile("griddepcontrol.launch_dependents;":::);
327
+ }
328
+
329
+ /**
330
+ * \ingroup CUDART_EXECUTION
331
+ * \brief Programmatic grid dependency synchronization
332
+ *
333
+ * This device function will block the thread until all direct grid
334
+ * dependencies have completed. This API is intended to use in conjuncture with
335
+ * programmatic / launch event / dependency. See
336
+ * ::cudaLaunchAttributeID::cudaLaunchAttributeProgrammaticStreamSerialization
337
+ * and ::cudaLaunchAttributeID::cudaLaunchAttributeProgrammaticEvent for more
338
+ * information.
339
+ */
340
+ static inline __device__ __cudart_builtin__ void CUDARTAPI cudaGridDependencySynchronize(void)
341
+ {
342
+ asm volatile("griddepcontrol.wait;":::"memory");
343
+ }
344
+
345
+ /**
346
+ * \ingroup CUDART_GRAPH
347
+ * \brief Sets the condition value associated with a conditional node.
348
+ *
349
+ * Sets the condition value associated with a conditional node.
350
+ * \sa cudaGraphConditionalHandleCreate
351
+ */
352
+ extern __device__ __cudart_builtin__ void CUDARTAPI cudaGraphSetConditional(cudaGraphConditionalHandle handle, unsigned int value);
353
+
354
+ //// CG API
355
+ extern __device__ __cudart_builtin__ unsigned long long CUDARTAPI cudaCGGetIntrinsicHandle(enum cudaCGScope scope);
356
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaCGSynchronize(unsigned long long handle, unsigned int flags);
357
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaCGSynchronizeGrid(unsigned long long handle, unsigned int flags);
358
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaCGGetSize(unsigned int *numThreads, unsigned int *numGrids, unsigned long long handle);
359
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaCGGetRank(unsigned int *threadRank, unsigned int *gridRank, unsigned long long handle);
360
+
361
+
362
+ //// CDP API
363
+
364
+ #ifdef __CUDA_ARCH__
365
+
366
+ #ifdef __CUDA_INTERNAL_USE_CDP2
367
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device)
368
+ {
369
+ return __cudaCDP2DeviceGetAttribute(value, attr, device);
370
+ }
371
+
372
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetLimit(size_t *pValue, enum cudaLimit limit)
373
+ {
374
+ return __cudaCDP2DeviceGetLimit(pValue, limit);
375
+ }
376
+
377
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetCacheConfig(enum cudaFuncCache *pCacheConfig)
378
+ {
379
+ return __cudaCDP2DeviceGetCacheConfig(pCacheConfig);
380
+ }
381
+
382
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetSharedMemConfig(enum cudaSharedMemConfig *pConfig)
383
+ {
384
+ return __cudaCDP2DeviceGetSharedMemConfig(pConfig);
385
+ }
386
+
387
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetLastError(void)
388
+ {
389
+ return __cudaCDP2GetLastError();
390
+ }
391
+
392
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaPeekAtLastError(void)
393
+ {
394
+ return __cudaCDP2PeekAtLastError();
395
+ }
396
+
397
+ static __inline__ __device__ __cudart_builtin__ const char* CUDARTAPI cudaGetErrorString(cudaError_t error)
398
+ {
399
+ return __cudaCDP2GetErrorString(error);
400
+ }
401
+
402
+ static __inline__ __device__ __cudart_builtin__ const char* CUDARTAPI cudaGetErrorName(cudaError_t error)
403
+ {
404
+ return __cudaCDP2GetErrorName(error);
405
+ }
406
+
407
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDeviceCount(int *count)
408
+ {
409
+ return __cudaCDP2GetDeviceCount(count);
410
+ }
411
+
412
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDevice(int *device)
413
+ {
414
+ return __cudaCDP2GetDevice(device);
415
+ }
416
+
417
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamCreateWithFlags(cudaStream_t *pStream, unsigned int flags)
418
+ {
419
+ return __cudaCDP2StreamCreateWithFlags(pStream, flags);
420
+ }
421
+
422
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamDestroy(cudaStream_t stream)
423
+ {
424
+ return __cudaCDP2StreamDestroy(stream);
425
+ }
426
+
427
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags)
428
+ {
429
+ return __cudaCDP2StreamWaitEvent(stream, event, flags);
430
+ }
431
+
432
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamWaitEvent_ptsz(cudaStream_t stream, cudaEvent_t event, unsigned int flags)
433
+ {
434
+ return __cudaCDP2StreamWaitEvent_ptsz(stream, event, flags);
435
+ }
436
+
437
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventCreateWithFlags(cudaEvent_t *event, unsigned int flags)
438
+ {
439
+ return __cudaCDP2EventCreateWithFlags(event, flags);
440
+ }
441
+
442
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecord(cudaEvent_t event, cudaStream_t stream)
443
+ {
444
+ return __cudaCDP2EventRecord(event, stream);
445
+ }
446
+
447
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecord_ptsz(cudaEvent_t event, cudaStream_t stream)
448
+ {
449
+ return __cudaCDP2EventRecord_ptsz(event, stream);
450
+ }
451
+
452
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags)
453
+ {
454
+ return __cudaCDP2EventRecordWithFlags(event, stream, flags);
455
+ }
456
+
457
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecordWithFlags_ptsz(cudaEvent_t event, cudaStream_t stream, unsigned int flags)
458
+ {
459
+ return __cudaCDP2EventRecordWithFlags_ptsz(event, stream, flags);
460
+ }
461
+
462
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventDestroy(cudaEvent_t event)
463
+ {
464
+ return __cudaCDP2EventDestroy(event);
465
+ }
466
+
467
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncGetAttributes(struct cudaFuncAttributes *attr, const void *func)
468
+ {
469
+ return __cudaCDP2FuncGetAttributes(attr, func);
470
+ }
471
+
472
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFree(void *devPtr)
473
+ {
474
+ return __cudaCDP2Free(devPtr);
475
+ }
476
+
477
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMalloc(void **devPtr, size_t size)
478
+ {
479
+ return __cudaCDP2Malloc(devPtr, size);
480
+ }
481
+
482
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpyAsync(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream)
483
+ {
484
+ return __cudaCDP2MemcpyAsync(dst, src, count, kind, stream);
485
+ }
486
+
487
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpyAsync_ptsz(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream)
488
+ {
489
+ return __cudaCDP2MemcpyAsync_ptsz(dst, src, count, kind, stream);
490
+ }
491
+
492
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream)
493
+ {
494
+ return __cudaCDP2Memcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream);
495
+ }
496
+
497
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy2DAsync_ptsz(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream)
498
+ {
499
+ return __cudaCDP2Memcpy2DAsync_ptsz(dst, dpitch, src, spitch, width, height, kind, stream);
500
+ }
501
+
502
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy3DAsync(const struct cudaMemcpy3DParms *p, cudaStream_t stream)
503
+ {
504
+ return __cudaCDP2Memcpy3DAsync(p, stream);
505
+ }
506
+
507
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy3DAsync_ptsz(const struct cudaMemcpy3DParms *p, cudaStream_t stream)
508
+ {
509
+ return __cudaCDP2Memcpy3DAsync_ptsz(p, stream);
510
+ }
511
+
512
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemsetAsync(void *devPtr, int value, size_t count, cudaStream_t stream)
513
+ {
514
+ return __cudaCDP2MemsetAsync(devPtr, value, count, stream);
515
+ }
516
+
517
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemsetAsync_ptsz(void *devPtr, int value, size_t count, cudaStream_t stream)
518
+ {
519
+ return __cudaCDP2MemsetAsync_ptsz(devPtr, value, count, stream);
520
+ }
521
+
522
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream)
523
+ {
524
+ return __cudaCDP2Memset2DAsync(devPtr, pitch, value, width, height, stream);
525
+ }
526
+
527
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset2DAsync_ptsz(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream)
528
+ {
529
+ return __cudaCDP2Memset2DAsync_ptsz(devPtr, pitch, value, width, height, stream);
530
+ }
531
+
532
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset3DAsync(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream)
533
+ {
534
+ return __cudaCDP2Memset3DAsync(pitchedDevPtr, value, extent, stream);
535
+ }
536
+
537
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset3DAsync_ptsz(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream)
538
+ {
539
+ return __cudaCDP2Memset3DAsync_ptsz(pitchedDevPtr, value, extent, stream);
540
+ }
541
+
542
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaRuntimeGetVersion(int *runtimeVersion)
543
+ {
544
+ return __cudaCDP2RuntimeGetVersion(runtimeVersion);
545
+ }
546
+
547
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize)
548
+ {
549
+ return __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSmemSize);
550
+ }
551
+
552
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize, unsigned int flags)
553
+ {
554
+ return __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSmemSize, flags);
555
+ }
556
+ #endif // __CUDA_INTERNAL_USE_CDP2
557
+
558
+ #endif // __CUDA_ARCH__
559
+
560
+
561
+ /**
562
+ * \ingroup CUDART_EXECUTION
563
+ * \brief Obtains a parameter buffer
564
+ *
565
+ * Obtains a parameter buffer which can be filled with parameters for a kernel launch.
566
+ * Parameters passed to ::cudaLaunchDevice must be allocated via this function.
567
+ *
568
+ * This is a low level API and can only be accessed from Parallel Thread Execution (PTX).
569
+ * CUDA user code should use <<< >>> to launch kernels.
570
+ *
571
+ * \param alignment - Specifies alignment requirement of the parameter buffer
572
+ * \param size - Specifies size requirement in bytes
573
+ *
574
+ * \return
575
+ * Returns pointer to the allocated parameterBuffer
576
+ * \notefnerr
577
+ *
578
+ * \sa cudaLaunchDevice
579
+ */
580
+ #ifdef __CUDA_INTERNAL_USE_CDP2
581
+ static __inline__ __device__ __cudart_builtin__ void * CUDARTAPI cudaGetParameterBuffer(size_t alignment, size_t size)
582
+ {
583
+ return __cudaCDP2GetParameterBuffer(alignment, size);
584
+ }
585
+ #else
586
+ extern __device__ __cudart_builtin__ void * CUDARTAPI cudaGetParameterBuffer(size_t alignment, size_t size);
587
+ #endif
588
+
589
+
590
+ #ifdef __CUDA_INTERNAL_USE_CDP2
591
+ static __inline__ __device__ __cudart_builtin__ void * CUDARTAPI cudaGetParameterBufferV2(void *func, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize)
592
+ {
593
+ return __cudaCDP2GetParameterBufferV2(func, gridDimension, blockDimension, sharedMemSize);
594
+ }
595
+ #else
596
+ extern __device__ __cudart_builtin__ void * CUDARTAPI cudaGetParameterBufferV2(void *func, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize);
597
+ #endif
598
+
599
+
600
+ #ifdef __CUDA_INTERNAL_USE_CDP2
601
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDevice_ptsz(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream)
602
+ {
603
+ return __cudaCDP2LaunchDevice_ptsz(func, parameterBuffer, gridDimension, blockDimension, sharedMemSize, stream);
604
+ }
605
+
606
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDeviceV2_ptsz(void *parameterBuffer, cudaStream_t stream)
607
+ {
608
+ return __cudaCDP2LaunchDeviceV2_ptsz(parameterBuffer, stream);
609
+ }
610
+ #else
611
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDevice_ptsz(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream);
612
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDeviceV2_ptsz(void *parameterBuffer, cudaStream_t stream);
613
+ #endif
614
+
615
+
616
+ /**
617
+ * \ingroup CUDART_EXECUTION
618
+ * \brief Launches a specified kernel
619
+ *
620
+ * Launches a specified kernel with the specified parameter buffer. A parameter buffer can be obtained
621
+ * by calling ::cudaGetParameterBuffer().
622
+ *
623
+ * This is a low level API and can only be accessed from Parallel Thread Execution (PTX).
624
+ * CUDA user code should use <<< >>> to launch the kernels.
625
+ *
626
+ * \param func - Pointer to the kernel to be launched
627
+ * \param parameterBuffer - Holds the parameters to the launched kernel. parameterBuffer can be NULL. (Optional)
628
+ * \param gridDimension - Specifies grid dimensions
629
+ * \param blockDimension - Specifies block dimensions
630
+ * \param sharedMemSize - Specifies size of shared memory
631
+ * \param stream - Specifies the stream to be used
632
+ *
633
+ * \return
634
+ * ::cudaSuccess, ::cudaErrorInvalidDevice, ::cudaErrorLaunchMaxDepthExceeded, ::cudaErrorInvalidConfiguration,
635
+ * ::cudaErrorStartupFailure, ::cudaErrorLaunchPendingCountExceeded, ::cudaErrorLaunchOutOfResources
636
+ * \notefnerr
637
+ * \n Please refer to Execution Configuration and Parameter Buffer Layout from the CUDA Programming
638
+ * Guide for the detailed descriptions of launch configuration and parameter layout respectively.
639
+ *
640
+ * \sa cudaGetParameterBuffer
641
+ */
642
+ #if defined(CUDA_API_PER_THREAD_DEFAULT_STREAM) && defined(__CUDA_ARCH__)
643
+ // When compiling for the device and per thread default stream is enabled, add
644
+ // a static inline redirect to the per thread stream entry points.
645
+
646
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI
647
+ cudaLaunchDevice(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream)
648
+ {
649
+ #ifdef __CUDA_INTERNAL_USE_CDP2
650
+ return __cudaCDP2LaunchDevice_ptsz(func, parameterBuffer, gridDimension, blockDimension, sharedMemSize, stream);
651
+ #else
652
+ return cudaLaunchDevice_ptsz(func, parameterBuffer, gridDimension, blockDimension, sharedMemSize, stream);
653
+ #endif
654
+ }
655
+
656
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI
657
+ cudaLaunchDeviceV2(void *parameterBuffer, cudaStream_t stream)
658
+ {
659
+ #ifdef __CUDA_INTERNAL_USE_CDP2
660
+ return __cudaCDP2LaunchDeviceV2_ptsz(parameterBuffer, stream);
661
+ #else
662
+ return cudaLaunchDeviceV2_ptsz(parameterBuffer, stream);
663
+ #endif
664
+ }
665
+ #else // defined(CUDA_API_PER_THREAD_DEFAULT_STREAM) && defined(__CUDA_ARCH__)
666
+ #ifdef __CUDA_INTERNAL_USE_CDP2
667
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDevice(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream)
668
+ {
669
+ return __cudaCDP2LaunchDevice(func, parameterBuffer, gridDimension, blockDimension, sharedMemSize, stream);
670
+ }
671
+
672
+ static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDeviceV2(void *parameterBuffer, cudaStream_t stream)
673
+ {
674
+ return __cudaCDP2LaunchDeviceV2(parameterBuffer, stream);
675
+ }
676
+ #else // __CUDA_INTERNAL_USE_CDP2
677
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDevice(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream);
678
+ extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDeviceV2(void *parameterBuffer, cudaStream_t stream);
679
+ #endif // __CUDA_INTERNAL_USE_CDP2
680
+ #endif // defined(CUDA_API_PER_THREAD_DEFAULT_STREAM) && defined(__CUDA_ARCH__)
681
+
682
+
683
+ // These symbols should not be used outside of this header file.
684
+ #define __cudaCDP2DeviceGetAttribute
685
+ #define __cudaCDP2DeviceGetLimit
686
+ #define __cudaCDP2DeviceGetCacheConfig
687
+ #define __cudaCDP2DeviceGetSharedMemConfig
688
+ #define __cudaCDP2GetLastError
689
+ #define __cudaCDP2PeekAtLastError
690
+ #define __cudaCDP2GetErrorString
691
+ #define __cudaCDP2GetErrorName
692
+ #define __cudaCDP2GetDeviceCount
693
+ #define __cudaCDP2GetDevice
694
+ #define __cudaCDP2StreamCreateWithFlags
695
+ #define __cudaCDP2StreamDestroy
696
+ #define __cudaCDP2StreamWaitEvent
697
+ #define __cudaCDP2StreamWaitEvent_ptsz
698
+ #define __cudaCDP2EventCreateWithFlags
699
+ #define __cudaCDP2EventRecord
700
+ #define __cudaCDP2EventRecord_ptsz
701
+ #define __cudaCDP2EventRecordWithFlags
702
+ #define __cudaCDP2EventRecordWithFlags_ptsz
703
+ #define __cudaCDP2EventDestroy
704
+ #define __cudaCDP2FuncGetAttributes
705
+ #define __cudaCDP2Free
706
+ #define __cudaCDP2Malloc
707
+ #define __cudaCDP2MemcpyAsync
708
+ #define __cudaCDP2MemcpyAsync_ptsz
709
+ #define __cudaCDP2Memcpy2DAsync
710
+ #define __cudaCDP2Memcpy2DAsync_ptsz
711
+ #define __cudaCDP2Memcpy3DAsync
712
+ #define __cudaCDP2Memcpy3DAsync_ptsz
713
+ #define __cudaCDP2MemsetAsync
714
+ #define __cudaCDP2MemsetAsync_ptsz
715
+ #define __cudaCDP2Memset2DAsync
716
+ #define __cudaCDP2Memset2DAsync_ptsz
717
+ #define __cudaCDP2Memset3DAsync
718
+ #define __cudaCDP2Memset3DAsync_ptsz
719
+ #define __cudaCDP2RuntimeGetVersion
720
+ #define __cudaCDP2GetParameterBuffer
721
+ #define __cudaCDP2GetParameterBufferV2
722
+ #define __cudaCDP2LaunchDevice_ptsz
723
+ #define __cudaCDP2LaunchDeviceV2_ptsz
724
+ #define __cudaCDP2LaunchDevice
725
+ #define __cudaCDP2LaunchDeviceV2
726
+ #define __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessor
727
+ #define __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessorWithFlags
728
+
729
+ }
730
+
731
+ template <typename T> static __inline__ __device__ __cudart_builtin__ cudaError_t cudaMalloc(T **devPtr, size_t size);
732
+ template <typename T> static __inline__ __device__ __cudart_builtin__ cudaError_t cudaFuncGetAttributes(struct cudaFuncAttributes *attr, T *entry);
733
+ template <typename T> static __inline__ __device__ __cudart_builtin__ cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, T func, int blockSize, size_t dynamicSmemSize);
734
+ template <typename T> static __inline__ __device__ __cudart_builtin__ cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, T func, int blockSize, size_t dynamicSmemSize, unsigned int flags);
735
+
736
+
737
+ #endif // !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 350)
738
+ #endif /* defined(__cplusplus) && defined(__CUDACC__) */
739
+
740
+ #undef __DEPRECATED__
741
+ #undef __CDPRT_DEPRECATED
742
+ #undef __CUDA_INTERNAL_USE_CDP2
743
+
744
+ #endif /* !__CUDA_DEVICE_RUNTIME_API_H__ */
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_fp16.h ADDED
The diff for this file is too large to render. See raw diff
 
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_fp8.h ADDED
@@ -0,0 +1,367 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 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
+ #ifndef __CUDA_FP8_H__
51
+ #define __CUDA_FP8_H__
52
+
53
+ /* Set up function decorations */
54
+ #if defined(__CUDACC__)
55
+ #define __CUDA_FP8_DECL__ static __device__ __inline__
56
+ #define __CUDA_HOSTDEVICE_FP8__ __host__ __device__
57
+ #define __CUDA_HOSTDEVICE_FP8_DECL__ static __host__ __device__ __inline__
58
+ #else /* !defined(__CUDACC__) */
59
+ #if defined(__GNUC__)
60
+ #define __CUDA_HOSTDEVICE_FP8_DECL__ static __attribute__((unused))
61
+ #else
62
+ #define __CUDA_HOSTDEVICE_FP8_DECL__ static
63
+ #endif /* defined(__GNUC__) */
64
+ #define __CUDA_HOSTDEVICE_FP8__
65
+ #endif /* defined(__CUDACC_) */
66
+
67
+ #if !defined(_MSC_VER) && __cplusplus >= 201103L
68
+ #define __CPP_VERSION_AT_LEAST_11_FP8
69
+ #elif _MSC_FULL_VER >= 190024210 && _MSVC_LANG >= 201103L
70
+ #define __CPP_VERSION_AT_LEAST_11_FP8
71
+ #endif
72
+
73
+ /* bring in __half_raw data type */
74
+ #include "cuda_fp16.h"
75
+ /* bring in __nv_bfloat16_raw data type */
76
+ #include "cuda_bf16.h"
77
+ /* bring in float2, double4, etc vector types */
78
+ #include "vector_types.h"
79
+
80
+ /**
81
+ * \defgroup CUDA_MATH_INTRINSIC_FP8 FP8 Intrinsics
82
+ * This section describes fp8 intrinsic functions.
83
+ * To use these functions, include the header file \p cuda_fp8.h in your
84
+ * program.
85
+ * The following macros are available to help users selectively enable/disable
86
+ * various definitions present in the header file:
87
+ * - \p __CUDA_NO_FP8_CONVERSIONS__ - If defined, this macro will prevent any
88
+ * use of the C++ type conversions (converting constructors and conversion
89
+ * operators) defined in the header.
90
+ * - \p __CUDA_NO_FP8_CONVERSION_OPERATORS__ - If defined, this macro will
91
+ * prevent any use of the C++ conversion operators from \p fp8 to other types.
92
+ */
93
+
94
+ /**
95
+ * \defgroup CUDA_MATH_FP8_MISC FP8 Conversion and Data Movement
96
+ * \ingroup CUDA_MATH_INTRINSIC_FP8
97
+ * To use these functions, include the header file \p cuda_fp8.h in your
98
+ * program.
99
+ */
100
+
101
+ /**
102
+ * \ingroup CUDA_MATH_FP8_MISC
103
+ * \brief 8-bit \p unsigned \p integer
104
+ * type abstraction used to for \p fp8 floating-point
105
+ * numbers storage.
106
+ */
107
+ typedef unsigned char __nv_fp8_storage_t;
108
+
109
+ /**
110
+ * \ingroup CUDA_MATH_FP8_MISC
111
+ * \brief 16-bit \p unsigned \p integer
112
+ * type abstraction used to for storage of pairs of
113
+ * \p fp8 floating-point numbers.
114
+ */
115
+ typedef unsigned short int __nv_fp8x2_storage_t;
116
+
117
+ /**
118
+ * \ingroup CUDA_MATH_FP8_MISC
119
+ * \brief 32-bit \p unsigned \p integer
120
+ * type abstraction used to for storage of tetrads of
121
+ * \p fp8 floating-point numbers.
122
+ */
123
+ typedef unsigned int __nv_fp8x4_storage_t;
124
+
125
+ /**
126
+ * \ingroup CUDA_MATH_FP8_MISC
127
+ * \brief Enumerates the modes applicable when
128
+ * performing a narrowing conversion to \p fp8 destination types.
129
+ */
130
+ typedef enum __nv_saturation_t {
131
+ /**
132
+ * Means no saturation to finite is performed when conversion
133
+ * results in rounding values outside the range of destination
134
+ * type.
135
+ * NOTE: for fp8 type of e4m3 kind, the results that are larger
136
+ * than the maximum representable finite number of the target
137
+ * format become NaN.
138
+ */
139
+ __NV_NOSAT,
140
+ /**
141
+ * Means input larger than the maximum representable
142
+ * finite number MAXNORM of the target format round to the
143
+ * MAXNORM of the same sign as input.
144
+ */
145
+ __NV_SATFINITE,
146
+ } __nv_saturation_t;
147
+
148
+ /**
149
+ * \ingroup CUDA_MATH_FP8_MISC
150
+ * \brief Enumerates the possible
151
+ * interpretations of the 8-bit values when referring to them as
152
+ * \p fp8 types.
153
+ */
154
+ typedef enum __nv_fp8_interpretation_t {
155
+ __NV_E4M3, /**< Stands for \p fp8 numbers of \p e4m3 kind. */
156
+ __NV_E5M2, /**< Stands for \p fp8 numbers of \p e5m2 kind. */
157
+ } __nv_fp8_interpretation_t;
158
+
159
+ /* Forward-declaration of C-style APIs */
160
+
161
+ /**
162
+ * \ingroup CUDA_MATH_FP8_MISC
163
+ * \brief Converts input \p double precision \p x to \p fp8 type of the
164
+ * requested kind using round-to-nearest-even rounding and requested saturation
165
+ * mode.
166
+ *
167
+ * \details Converts input \p x to \p fp8 type of the kind specified by
168
+ * \p fp8_interpretation parameter,
169
+ * using round-to-nearest-even rounding and
170
+ * saturation mode specified by \p saturate parameter.
171
+ *
172
+ * \returns
173
+ * - The \p __nv_fp8_storage_t value holds the result of conversion.
174
+ */
175
+ __CUDA_HOSTDEVICE_FP8_DECL__ __nv_fp8_storage_t
176
+ __nv_cvt_double_to_fp8(const double x, const __nv_saturation_t saturate,
177
+ const __nv_fp8_interpretation_t fp8_interpretation);
178
+
179
+ /**
180
+ * \ingroup CUDA_MATH_FP8_MISC
181
+ * \brief Converts input vector of two \p double precision numbers packed
182
+ * in \p double2 \p x into a vector of two values of \p fp8 type of
183
+ * the requested kind using round-to-nearest-even rounding and requested
184
+ * saturation mode.
185
+ *
186
+ * \details Converts input vector \p x to a vector of two \p fp8 values of the
187
+ * kind specified by \p fp8_interpretation parameter, using
188
+ * round-to-nearest-even rounding and saturation mode specified by \p saturate
189
+ * parameter.
190
+ *
191
+ * \returns
192
+ * - The \p __nv_fp8x2_storage_t value holds the result of conversion.
193
+ */
194
+ __CUDA_HOSTDEVICE_FP8_DECL__ __nv_fp8x2_storage_t
195
+ __nv_cvt_double2_to_fp8x2(const double2 x, const __nv_saturation_t saturate,
196
+ const __nv_fp8_interpretation_t fp8_interpretation);
197
+
198
+ /**
199
+ * \ingroup CUDA_MATH_FP8_MISC
200
+ * \brief Converts input \p single precision \p x to \p fp8 type of the
201
+ * requested kind using round-to-nearest-even rounding and requested saturation
202
+ * mode.
203
+ *
204
+ * \details Converts input \p x to \p fp8 type of the kind specified by
205
+ * \p fp8_interpretation parameter,
206
+ * using round-to-nearest-even rounding and
207
+ * saturation mode specified by \p saturate parameter.
208
+ *
209
+ * \returns
210
+ * - The \p __nv_fp8_storage_t value holds the result of conversion.
211
+ */
212
+ __CUDA_HOSTDEVICE_FP8_DECL__ __nv_fp8_storage_t
213
+ __nv_cvt_float_to_fp8(const float x, const __nv_saturation_t saturate,
214
+ const __nv_fp8_interpretation_t fp8_interpretation);
215
+
216
+ /**
217
+ * \ingroup CUDA_MATH_FP8_MISC
218
+ * \brief Converts input vector of two \p single precision numbers packed
219
+ * in \p float2 \p x into a vector of two values of \p fp8 type of
220
+ * the requested kind using round-to-nearest-even rounding and requested
221
+ * saturation mode.
222
+ *
223
+ * \details Converts input vector \p x to a vector of two \p fp8 values of the
224
+ * kind specified by \p fp8_interpretation parameter, using
225
+ * round-to-nearest-even rounding and saturation mode specified by \p saturate
226
+ * parameter.
227
+ *
228
+ * \returns
229
+ * - The \p __nv_fp8x2_storage_t value holds the result of conversion.
230
+ */
231
+ __CUDA_HOSTDEVICE_FP8_DECL__ __nv_fp8x2_storage_t
232
+ __nv_cvt_float2_to_fp8x2(const float2 x, const __nv_saturation_t saturate,
233
+ const __nv_fp8_interpretation_t fp8_interpretation);
234
+
235
+ /**
236
+ * \ingroup CUDA_MATH_FP8_MISC
237
+ * \brief Converts input \p half precision \p x to \p fp8 type of the requested
238
+ * kind using round-to-nearest-even rounding and requested saturation mode.
239
+ *
240
+ * \details Converts input \p x to \p fp8 type of the kind specified by
241
+ * \p fp8_interpretation parameter,
242
+ * using round-to-nearest-even rounding and
243
+ * saturation mode specified by \p saturate parameter.
244
+ *
245
+ * \returns
246
+ * - The \p __nv_fp8_storage_t value holds the result of conversion.
247
+ */
248
+ __CUDA_HOSTDEVICE_FP8_DECL__ __nv_fp8_storage_t
249
+ __nv_cvt_halfraw_to_fp8(const __half_raw x, const __nv_saturation_t saturate,
250
+ const __nv_fp8_interpretation_t fp8_interpretation);
251
+
252
+ /**
253
+ * \ingroup CUDA_MATH_FP8_MISC
254
+ * \brief Converts input vector of two \p half precision numbers packed
255
+ * in \p __half2_raw \p x into a vector of two values of \p fp8 type of
256
+ * the requested kind using round-to-nearest-even rounding and requested
257
+ * saturation mode.
258
+ *
259
+ * \details Converts input vector \p x to a vector of two \p fp8 values of the
260
+ * kind specified by \p fp8_interpretation parameter, using
261
+ * round-to-nearest-even rounding and saturation mode specified by \p saturate
262
+ * parameter.
263
+ *
264
+ * \returns
265
+ * - The \p __nv_fp8x2_storage_t value holds the result of conversion.
266
+ */
267
+ __CUDA_HOSTDEVICE_FP8_DECL__ __nv_fp8x2_storage_t __nv_cvt_halfraw2_to_fp8x2(
268
+ const __half2_raw x, const __nv_saturation_t saturate,
269
+ const __nv_fp8_interpretation_t fp8_interpretation);
270
+
271
+ /**
272
+ * \ingroup CUDA_MATH_FP8_MISC
273
+ * \brief Converts input \p nv_bfloat16 precision \p x to \p fp8 type of the
274
+ * requested kind using round-to-nearest-even rounding and requested saturation
275
+ * mode.
276
+ *
277
+ * \details Converts input \p x to \p fp8 type of the kind specified by
278
+ * \p fp8_interpretation parameter,
279
+ * using round-to-nearest-even rounding and
280
+ * saturation mode specified by \p saturate parameter.
281
+ *
282
+ * \returns
283
+ * - The \p __nv_fp8_storage_t value holds the result of conversion.
284
+ */
285
+ __CUDA_HOSTDEVICE_FP8_DECL__ __nv_fp8_storage_t __nv_cvt_bfloat16raw_to_fp8(
286
+ const __nv_bfloat16_raw x, const __nv_saturation_t saturate,
287
+ const __nv_fp8_interpretation_t fp8_interpretation);
288
+
289
+ /**
290
+ * \ingroup CUDA_MATH_FP8_MISC
291
+ * \brief Converts input vector of two \p nv_bfloat16 precision numbers packed
292
+ * in \p __nv_bfloat162_raw \p x into a vector of two values of \p fp8 type of
293
+ * the requested kind using round-to-nearest-even rounding and requested
294
+ * saturation mode.
295
+ *
296
+ * \details Converts input vector \p x to a vector of two \p fp8 values of the
297
+ * kind specified by \p fp8_interpretation parameter, using
298
+ * round-to-nearest-even rounding and saturation mode specified by \p saturate
299
+ * parameter.
300
+ *
301
+ * \returns
302
+ * - The \p __nv_fp8x2_storage_t value holds the result of conversion.
303
+ */
304
+ __CUDA_HOSTDEVICE_FP8_DECL__ __nv_fp8x2_storage_t
305
+ __nv_cvt_bfloat16raw2_to_fp8x2(
306
+ const __nv_bfloat162_raw x, const __nv_saturation_t saturate,
307
+ const __nv_fp8_interpretation_t fp8_interpretation);
308
+
309
+ /**
310
+ * \ingroup CUDA_MATH_FP8_MISC
311
+ * \brief Converts input \p fp8 \p x of the specified kind
312
+ * to \p half precision.
313
+ *
314
+ * \details Converts input \p x of \p fp8 type of the kind specified by
315
+ * \p fp8_interpretation parameter
316
+ * to \p half precision.
317
+ *
318
+ * \returns
319
+ * - The \p __half_raw value holds the result of conversion.
320
+ */
321
+ __CUDA_HOSTDEVICE_FP8_DECL__ __half_raw
322
+ __nv_cvt_fp8_to_halfraw(const __nv_fp8_storage_t x,
323
+ const __nv_fp8_interpretation_t fp8_interpretation);
324
+ /**
325
+ * \ingroup CUDA_MATH_FP8_MISC
326
+ * \brief Converts input vector of two \p fp8 values of the specified kind
327
+ * to a vector of two \p half precision values packed in \p __half2_raw
328
+ * structure.
329
+ *
330
+ * \details Converts input vector \p x of \p fp8 type of the kind specified by
331
+ * \p fp8_interpretation parameter
332
+ * to a vector of two \p half precision values and returns as \p __half2_raw
333
+ * structure.
334
+ *
335
+ * \returns
336
+ * - The \p __half2_raw value holds the result of conversion.
337
+ */
338
+ __CUDA_HOSTDEVICE_FP8_DECL__ __half2_raw
339
+ __nv_cvt_fp8x2_to_halfraw2(const __nv_fp8x2_storage_t x,
340
+ const __nv_fp8_interpretation_t fp8_interpretation);
341
+
342
+ #if defined(__cplusplus)
343
+
344
+ #define __CUDA_FP8_TYPES_EXIST__
345
+
346
+ /* Forward-declaration of structures defined in "cuda_fp8.hpp" */
347
+ struct __nv_fp8_e5m2;
348
+ struct __nv_fp8x2_e5m2;
349
+ struct __nv_fp8x4_e5m2;
350
+
351
+ struct __nv_fp8_e4m3;
352
+ struct __nv_fp8x2_e4m3;
353
+ struct __nv_fp8x4_e4m3;
354
+
355
+ #endif /* defined(__cplusplus) */
356
+
357
+ #include "cuda_fp8.hpp"
358
+
359
+ #undef __CUDA_FP8_DECL__
360
+ #undef __CUDA_HOSTDEVICE_FP8__
361
+ #undef __CUDA_HOSTDEVICE_FP8_DECL__
362
+
363
+ #if defined(__CPP_VERSION_AT_LEAST_11_FP8)
364
+ #undef __CPP_VERSION_AT_LEAST_11_FP8
365
+ #endif /* defined(__CPP_VERSION_AT_LEAST_11_FP8) */
366
+
367
+ #endif /* end of include guard: __CUDA_FP8_H__ */
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_pipeline_primitives.h ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 1993-2019 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
+ #ifndef _CUDA_PIPELINE_PRIMITIVES_H_
51
+ # define _CUDA_PIPELINE_PRIMITIVES_H_
52
+
53
+ # include "cuda_pipeline_helpers.h"
54
+
55
+ _CUDA_PIPELINE_STATIC_QUALIFIER
56
+ void __pipeline_memcpy_async(void* __restrict__ dst_shared, const void* __restrict__ src_global, size_t size_and_align,
57
+ size_t zfill = 0)
58
+ {
59
+ _CUDA_PIPELINE_ASSERT(size_and_align == 4 || size_and_align == 8 || size_and_align == 16);
60
+ _CUDA_PIPELINE_ASSERT(zfill <= size_and_align);
61
+ _CUDA_PIPELINE_ASSERT(__isShared(dst_shared));
62
+ _CUDA_PIPELINE_ASSERT(__isGlobal(src_global));
63
+ _CUDA_PIPELINE_ASSERT(!(reinterpret_cast<uintptr_t>(dst_shared) & (size_and_align - 1)));
64
+ _CUDA_PIPELINE_ASSERT(!(reinterpret_cast<uintptr_t>(src_global) & (size_and_align - 1)));
65
+
66
+ switch (size_and_align) {
67
+ case 16:
68
+ switch (zfill) {
69
+ case 0: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 16>(dst_shared, src_global); return;
70
+ case 1: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 15>(dst_shared, src_global); return;
71
+ case 2: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 14>(dst_shared, src_global); return;
72
+ case 3: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 13>(dst_shared, src_global); return;
73
+ case 4: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 12>(dst_shared, src_global); return;
74
+ case 5: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 11>(dst_shared, src_global); return;
75
+ case 6: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 10>(dst_shared, src_global); return;
76
+ case 7: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 9>(dst_shared, src_global); return;
77
+ case 8: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 8>(dst_shared, src_global); return;
78
+ case 9: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 7>(dst_shared, src_global); return;
79
+ case 10: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 6>(dst_shared, src_global); return;
80
+ case 11: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 5>(dst_shared, src_global); return;
81
+ case 12: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 4>(dst_shared, src_global); return;
82
+ case 13: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 3>(dst_shared, src_global); return;
83
+ case 14: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 2>(dst_shared, src_global); return;
84
+ case 15: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 1>(dst_shared, src_global); return;
85
+ case 16: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async<16, 0>(dst_shared, src_global); return;
86
+ default: _CUDA_PIPELINE_ABORT(); return;
87
+ }
88
+ case 8:
89
+ switch (zfill) {
90
+ case 0: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 8, 8>(dst_shared, src_global); return;
91
+ case 1: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 8, 7>(dst_shared, src_global); return;
92
+ case 2: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 8, 6>(dst_shared, src_global); return;
93
+ case 3: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 8, 5>(dst_shared, src_global); return;
94
+ case 4: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 8, 4>(dst_shared, src_global); return;
95
+ case 5: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 8, 3>(dst_shared, src_global); return;
96
+ case 6: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 8, 2>(dst_shared, src_global); return;
97
+ case 7: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 8, 1>(dst_shared, src_global); return;
98
+ case 8: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 8, 0>(dst_shared, src_global); return;
99
+ default: _CUDA_PIPELINE_ABORT(); return;
100
+ }
101
+ case 4:
102
+ switch (zfill) {
103
+ case 0: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 4, 4>(dst_shared, src_global); return;
104
+ case 1: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 4, 3>(dst_shared, src_global); return;
105
+ case 2: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 4, 2>(dst_shared, src_global); return;
106
+ case 3: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 4, 1>(dst_shared, src_global); return;
107
+ case 4: _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_memcpy_async< 4, 0>(dst_shared, src_global); return;
108
+ default: _CUDA_PIPELINE_ABORT(); return;
109
+ }
110
+ default:
111
+ _CUDA_PIPELINE_ABORT();
112
+ return;
113
+ }
114
+ }
115
+
116
+ _CUDA_PIPELINE_STATIC_QUALIFIER
117
+ void __pipeline_commit()
118
+ {
119
+ _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_commit();
120
+ }
121
+
122
+ _CUDA_PIPELINE_STATIC_QUALIFIER
123
+ void __pipeline_wait_prior(size_t prior)
124
+ {
125
+ switch (prior) {
126
+ case 0 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<0>(); return;
127
+ case 1 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<1>(); return;
128
+ case 2 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<2>(); return;
129
+ case 3 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<3>(); return;
130
+ case 4 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<4>(); return;
131
+ case 5 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<5>(); return;
132
+ case 6 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<6>(); return;
133
+ case 7 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<7>(); return;
134
+ default : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<8>(); return;
135
+ }
136
+ }
137
+
138
+ # if defined(_CUDA_PIPELINE_ARCH_700_OR_LATER)
139
+ # include "cuda_awbarrier_primitives.h"
140
+
141
+ _CUDA_PIPELINE_STATIC_QUALIFIER
142
+ void __pipeline_arrive_on(__mbarrier_t* barrier)
143
+ {
144
+ _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_arrive_on(barrier);
145
+ }
146
+ # endif
147
+
148
+ #endif /* !_CUDA_PIPELINE_PRIMITIVES_H_ */
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cuda_runtime.h ADDED
@@ -0,0 +1,2363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 1993-2023 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(__CUDA_RUNTIME_H__)
51
+ #define __CUDA_RUNTIME_H__
52
+
53
+ #if !defined(__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__)
54
+ #define __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__
55
+ #define __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_CUDA_RUNTIME_H__
56
+ #endif
57
+
58
+ #define EXCLUDE_FROM_RTC
59
+ #if defined(__GNUC__)
60
+ #if defined(__clang__) || (!defined(__PGIC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
61
+ #pragma GCC diagnostic push
62
+ #endif
63
+ #if defined(__clang__) || (!defined(__PGIC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)))
64
+ #pragma GCC diagnostic ignored "-Wunused-function"
65
+ #endif
66
+ #elif defined(_MSC_VER)
67
+ #pragma warning(push)
68
+ #pragma warning(disable: 4820)
69
+ #endif
70
+ #ifdef __QNX__
71
+ #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
72
+ typedef unsigned size_t;
73
+ #endif
74
+ #endif
75
+ #undef EXCLUDE_FROM_RTC
76
+ /*******************************************************************************
77
+ * *
78
+ * *
79
+ * *
80
+ *******************************************************************************/
81
+
82
+ #include "crt/host_config.h"
83
+
84
+ /*******************************************************************************
85
+ * *
86
+ * *
87
+ * *
88
+ *******************************************************************************/
89
+
90
+ #include "builtin_types.h"
91
+ #include "library_types.h"
92
+ #if !defined(__CUDACC_RTC__)
93
+ #define EXCLUDE_FROM_RTC
94
+ #include "channel_descriptor.h"
95
+ #include "cuda_runtime_api.h"
96
+ #include "driver_functions.h"
97
+ #undef EXCLUDE_FROM_RTC
98
+ #endif /* !__CUDACC_RTC__ */
99
+ #include "crt/host_defines.h"
100
+ #ifdef __CUDACC_RTC__
101
+ #include "target"
102
+ #endif /* defined(__CUDACC_RTC__) */
103
+
104
+
105
+ #include "vector_functions.h"
106
+
107
+ #if defined(__CUDACC__)
108
+
109
+ #if defined(__CUDACC_RTC__)
110
+ #include "nvrtc_device_runtime.h"
111
+ #include "crt/device_functions.h"
112
+ #include "crt/common_functions.h"
113
+ #include "device_launch_parameters.h"
114
+
115
+ #else /* !__CUDACC_RTC__ */
116
+ #define EXCLUDE_FROM_RTC
117
+ #include "crt/common_functions.h"
118
+ #include "crt/device_functions.h"
119
+ #include "device_launch_parameters.h"
120
+
121
+ #if defined(__CUDACC_EXTENDED_LAMBDA__)
122
+ #include <functional>
123
+ #include <utility>
124
+ struct __device_builtin__ __nv_lambda_preheader_injection { };
125
+ #endif /* defined(__CUDACC_EXTENDED_LAMBDA__) */
126
+
127
+ #undef EXCLUDE_FROM_RTC
128
+ #endif /* __CUDACC_RTC__ */
129
+
130
+ #endif /* __CUDACC__ */
131
+
132
+ /** \cond impl_private */
133
+ #if defined(__DOXYGEN_ONLY__) || defined(CUDA_ENABLE_DEPRECATED)
134
+ #define __CUDA_DEPRECATED
135
+ #elif defined(_MSC_VER)
136
+ #define __CUDA_DEPRECATED __declspec(deprecated)
137
+ #elif defined(__GNUC__)
138
+ #define __CUDA_DEPRECATED __attribute__((deprecated))
139
+ #else
140
+ #define __CUDA_DEPRECATED
141
+ #endif
142
+ /** \endcond impl_private */
143
+
144
+ #define EXCLUDE_FROM_RTC
145
+ #if defined(__cplusplus) && !defined(__CUDACC_RTC__)
146
+
147
+ #if __cplusplus >= 201103L || (defined(_MSC_VER) && (_MSC_VER >= 1900))
148
+ #include <utility>
149
+ #endif
150
+
151
+ /*******************************************************************************
152
+ * *
153
+ * *
154
+ * *
155
+ *******************************************************************************/
156
+
157
+ /**
158
+ * \addtogroup CUDART_HIGHLEVEL
159
+ * @{
160
+ */
161
+
162
+ /**
163
+ *\brief Launches a device function
164
+ *
165
+ * The function invokes kernel \p func on \p gridDim (\p gridDim.x &times; \p gridDim.y
166
+ * &times; \p gridDim.z) grid of blocks. Each block contains \p blockDim (\p blockDim.x &times;
167
+ * \p blockDim.y &times; \p blockDim.z) threads.
168
+ *
169
+ * If the kernel has N parameters the \p args should point to array of N pointers.
170
+ * Each pointer, from <tt>args[0]</tt> to <tt>args[N - 1]</tt>, point to the region
171
+ * of memory from which the actual parameter will be copied.
172
+ *
173
+ * \p sharedMem sets the amount of dynamic shared memory that will be available to
174
+ * each thread block.
175
+ *
176
+ * \p stream specifies a stream the invocation is associated to.
177
+ *
178
+ * \param func - Device function symbol
179
+ * \param gridDim - Grid dimentions
180
+ * \param blockDim - Block dimentions
181
+ * \param args - Arguments
182
+ * \param sharedMem - Shared memory (defaults to 0)
183
+ * \param stream - Stream identifier (defaults to NULL)
184
+ *
185
+ * \return
186
+ * ::cudaSuccess,
187
+ * ::cudaErrorInvalidDeviceFunction,
188
+ * ::cudaErrorInvalidConfiguration,
189
+ * ::cudaErrorLaunchFailure,
190
+ * ::cudaErrorLaunchTimeout,
191
+ * ::cudaErrorLaunchOutOfResources,
192
+ * ::cudaErrorSharedObjectInitFailed,
193
+ * ::cudaErrorInvalidPtx,
194
+ * ::cudaErrorUnsupportedPtxVersion,
195
+ * ::cudaErrorNoKernelImageForDevice,
196
+ * ::cudaErrorJitCompilerNotFound,
197
+ * ::cudaErrorJitCompilationDisabled
198
+ * \notefnerr
199
+ * \note_async
200
+ * \note_null_stream
201
+ * \note_init_rt
202
+ * \note_callback
203
+ *
204
+ * \ref ::cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C API)"
205
+ */
206
+ template<class T>
207
+ static __inline__ __host__ cudaError_t cudaLaunchKernel(
208
+ const T *func,
209
+ dim3 gridDim,
210
+ dim3 blockDim,
211
+ void **args,
212
+ size_t sharedMem = 0,
213
+ cudaStream_t stream = 0
214
+ )
215
+ {
216
+ return ::cudaLaunchKernel((const void *)func, gridDim, blockDim, args, sharedMem, stream);
217
+ }
218
+
219
+
220
+ #if __cplusplus >= 201103L || (defined(_MSC_VER) && (_MSC_VER >= 1900)) || defined(__DOXYGEN_ONLY__)
221
+ /**
222
+ * \brief Launches a CUDA function with launch-time configuration
223
+ *
224
+ * Invokes the kernel \p func on \p config->gridDim (\p config->gridDim.x
225
+ * &times; \p config->gridDim.y &times; \p config->gridDim.z) grid of blocks.
226
+ * Each block contains \p config->blockDim (\p config->blockDim.x &times;
227
+ * \p config->blockDim.y &times; \p config->blockDim.z) threads.
228
+ *
229
+ * \p config->dynamicSmemBytes sets the amount of dynamic shared memory that
230
+ * will be available to each thread block.
231
+ *
232
+ * \p config->stream specifies a stream the invocation is associated to.
233
+ *
234
+ * Configuration beyond grid and block dimensions, dynamic shared memory size,
235
+ * and stream can be provided with the following two fields of \p config:
236
+ *
237
+ * \p config->attrs is an array of \p config->numAttrs contiguous
238
+ * ::cudaLaunchAttribute elements. The value of this pointer is not considered
239
+ * if \p config->numAttrs is zero. However, in that case, it is recommended to
240
+ * set the pointer to NULL.
241
+ * \p config->numAttrs is the number of attributes populating the first
242
+ * \p config->numAttrs positions of the \p config->attrs array.
243
+ *
244
+ * The kernel arguments should be passed as arguments to this function via the
245
+ * \p args parameter pack.
246
+ *
247
+ * The C API version of this function, \p cudaLaunchKernelExC, is also available
248
+ * for pre-C++11 compilers and for use cases where the ability to pass kernel
249
+ * parameters via void* array is preferable.
250
+ *
251
+ * \param config - Launch configuration
252
+ * \param func - Kernel to launch
253
+ * \param args - Parameter pack of kernel parameters
254
+ *
255
+ * \return
256
+ * ::cudaSuccess,
257
+ * ::cudaErrorInvalidDeviceFunction,
258
+ * ::cudaErrorInvalidConfiguration,
259
+ * ::cudaErrorLaunchFailure,
260
+ * ::cudaErrorLaunchTimeout,
261
+ * ::cudaErrorLaunchOutOfResources,
262
+ * ::cudaErrorSharedObjectInitFailed,
263
+ * ::cudaErrorInvalidPtx,
264
+ * ::cudaErrorUnsupportedPtxVersion,
265
+ * ::cudaErrorNoKernelImageForDevice,
266
+ * ::cudaErrorJitCompilerNotFound,
267
+ * ::cudaErrorJitCompilationDisabled
268
+ * \note_null_stream
269
+ * \notefnerr
270
+ * \note_init_rt
271
+ * \note_callback
272
+ *
273
+ * \sa
274
+ * \ref ::cudaLaunchKernelExC(const cudaLaunchConfig_t *config, const void *func, void **args) "cudaLaunchKernelEx (C API)",
275
+ * ::cuLaunchKernelEx
276
+ */
277
+ template<typename... ExpTypes, typename... ActTypes>
278
+ static __inline__ __host__ cudaError_t cudaLaunchKernelEx(
279
+ const cudaLaunchConfig_t *config,
280
+ void (*kernel)(ExpTypes...),
281
+ ActTypes &&... args
282
+ )
283
+ {
284
+ return [&](ExpTypes... coercedArgs){
285
+ void *pArgs[] = { &coercedArgs... };
286
+ return ::cudaLaunchKernelExC(config, (const void *)kernel, pArgs);
287
+ }(std::forward<ActTypes>(args)...);
288
+ }
289
+ #endif
290
+
291
+ /**
292
+ *\brief Launches a device function
293
+ *
294
+ * The function invokes kernel \p func on \p gridDim (\p gridDim.x &times; \p gridDim.y
295
+ * &times; \p gridDim.z) grid of blocks. Each block contains \p blockDim (\p blockDim.x &times;
296
+ * \p blockDim.y &times; \p blockDim.z) threads.
297
+ *
298
+ * The device on which this kernel is invoked must have a non-zero value for
299
+ * the device attribute ::cudaDevAttrCooperativeLaunch.
300
+ *
301
+ * The total number of blocks launched cannot exceed the maximum number of blocks per
302
+ * multiprocessor as returned by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor (or
303
+ * ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times the number of multiprocessors
304
+ * as specified by the device attribute ::cudaDevAttrMultiProcessorCount.
305
+ *
306
+ * The kernel cannot make use of CUDA dynamic parallelism.
307
+ *
308
+ * If the kernel has N parameters the \p args should point to array of N pointers.
309
+ * Each pointer, from <tt>args[0]</tt> to <tt>args[N - 1]</tt>, point to the region
310
+ * of memory from which the actual parameter will be copied.
311
+ *
312
+ * \p sharedMem sets the amount of dynamic shared memory that will be available to
313
+ * each thread block.
314
+ *
315
+ * \p stream specifies a stream the invocation is associated to.
316
+ *
317
+ * \param func - Device function symbol
318
+ * \param gridDim - Grid dimentions
319
+ * \param blockDim - Block dimentions
320
+ * \param args - Arguments
321
+ * \param sharedMem - Shared memory (defaults to 0)
322
+ * \param stream - Stream identifier (defaults to NULL)
323
+ *
324
+ * \return
325
+ * ::cudaSuccess,
326
+ * ::cudaErrorInvalidDeviceFunction,
327
+ * ::cudaErrorInvalidConfiguration,
328
+ * ::cudaErrorLaunchFailure,
329
+ * ::cudaErrorLaunchTimeout,
330
+ * ::cudaErrorLaunchOutOfResources,
331
+ * ::cudaErrorSharedObjectInitFailed
332
+ * \notefnerr
333
+ * \note_async
334
+ * \note_null_stream
335
+ * \note_init_rt
336
+ * \note_callback
337
+ *
338
+ * \ref ::cudaLaunchCooperativeKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchCooperativeKernel (C API)"
339
+ */
340
+ template<class T>
341
+ static __inline__ __host__ cudaError_t cudaLaunchCooperativeKernel(
342
+ const T *func,
343
+ dim3 gridDim,
344
+ dim3 blockDim,
345
+ void **args,
346
+ size_t sharedMem = 0,
347
+ cudaStream_t stream = 0
348
+ )
349
+ {
350
+ return ::cudaLaunchCooperativeKernel((const void *)func, gridDim, blockDim, args, sharedMem, stream);
351
+ }
352
+
353
+ /**
354
+ * \brief \hl Creates an event object with the specified flags
355
+ *
356
+ * Creates an event object with the specified flags. Valid flags include:
357
+ * - ::cudaEventDefault: Default event creation flag.
358
+ * - ::cudaEventBlockingSync: Specifies that event should use blocking
359
+ * synchronization. A host thread that uses ::cudaEventSynchronize() to wait
360
+ * on an event created with this flag will block until the event actually
361
+ * completes.
362
+ * - ::cudaEventDisableTiming: Specifies that the created event does not need
363
+ * to record timing data. Events created with this flag specified and
364
+ * the ::cudaEventBlockingSync flag not specified will provide the best
365
+ * performance when used with ::cudaStreamWaitEvent() and ::cudaEventQuery().
366
+ *
367
+ * \param event - Newly created event
368
+ * \param flags - Flags for new event
369
+ *
370
+ * \return
371
+ * ::cudaSuccess,
372
+ * ::cudaErrorInvalidValue,
373
+ * ::cudaErrorLaunchFailure,
374
+ * ::cudaErrorMemoryAllocation
375
+ * \notefnerr
376
+ * \note_init_rt
377
+ * \note_callback
378
+ *
379
+ * \sa \ref ::cudaEventCreate(cudaEvent_t*) "cudaEventCreate (C API)",
380
+ * ::cudaEventCreateWithFlags, ::cudaEventRecord, ::cudaEventQuery,
381
+ * ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,
382
+ * ::cudaStreamWaitEvent
383
+ */
384
+ static __inline__ __host__ cudaError_t cudaEventCreate(
385
+ cudaEvent_t *event,
386
+ unsigned int flags
387
+ )
388
+ {
389
+ return ::cudaEventCreateWithFlags(event, flags);
390
+ }
391
+
392
+ /**
393
+ * \brief Creates an executable graph from a graph
394
+ *
395
+ * Instantiates \p graph as an executable graph. The graph is validated for any
396
+ * structural constraints or intra-node constraints which were not previously
397
+ * validated. If instantiation is successful, a handle to the instantiated graph
398
+ * is returned in \p pGraphExec.
399
+ *
400
+ * If there are any errors, diagnostic information may be returned in \p pErrorNode and
401
+ * \p pLogBuffer. This is the primary way to inspect instantiation errors. The output
402
+ * will be null terminated unless the diagnostics overflow
403
+ * the buffer. In this case, they will be truncated, and the last byte can be
404
+ * inspected to determine if truncation occurred.
405
+ *
406
+ * \param pGraphExec - Returns instantiated graph
407
+ * \param graph - Graph to instantiate
408
+ * \param pErrorNode - In case of an instantiation error, this may be modified to
409
+ * indicate a node contributing to the error
410
+ * \param pLogBuffer - A character buffer to store diagnostic messages
411
+ * \param bufferSize - Size of the log buffer in bytes
412
+ *
413
+ * \return
414
+ * ::cudaSuccess,
415
+ * ::cudaErrorInvalidValue
416
+ * \note_graph_thread_safety
417
+ * \notefnerr
418
+ * \note_init_rt
419
+ * \note_callback
420
+ *
421
+ * \sa
422
+ * ::cudaGraphInstantiateWithFlags,
423
+ * ::cudaGraphCreate,
424
+ * ::cudaGraphUpload,
425
+ * ::cudaGraphLaunch,
426
+ * ::cudaGraphExecDestroy
427
+ */
428
+ static __inline__ __host__ cudaError_t cudaGraphInstantiate(
429
+ cudaGraphExec_t *pGraphExec,
430
+ cudaGraph_t graph,
431
+ cudaGraphNode_t *pErrorNode,
432
+ char *pLogBuffer,
433
+ size_t bufferSize
434
+ )
435
+ {
436
+ (void)pErrorNode;
437
+ (void)pLogBuffer;
438
+ (void)bufferSize;
439
+ return ::cudaGraphInstantiate(pGraphExec, graph, 0);
440
+ }
441
+
442
+ /**
443
+ * \brief \hl Allocates page-locked memory on the host
444
+ *
445
+ * Allocates \p size bytes of host memory that is page-locked and accessible
446
+ * to the device. The driver tracks the virtual memory ranges allocated with
447
+ * this function and automatically accelerates calls to functions such as
448
+ * ::cudaMemcpy(). Since the memory can be accessed directly by the device, it
449
+ * can be read or written with much higher bandwidth than pageable memory
450
+ * obtained with functions such as ::malloc(). Allocating excessive amounts of
451
+ * pinned memory may degrade system performance, since it reduces the amount
452
+ * of memory available to the system for paging. As a result, this function is
453
+ * best used sparingly to allocate staging areas for data exchange between host
454
+ * and device.
455
+ *
456
+ * The \p flags parameter enables different options to be specified that affect
457
+ * the allocation, as follows.
458
+ * - ::cudaHostAllocDefault: This flag's value is defined to be 0.
459
+ * - ::cudaHostAllocPortable: The memory returned by this call will be
460
+ * considered as pinned memory by all CUDA contexts, not just the one that
461
+ * performed the allocation.
462
+ * - ::cudaHostAllocMapped: Maps the allocation into the CUDA address space.
463
+ * The device pointer to the memory may be obtained by calling
464
+ * ::cudaHostGetDevicePointer().
465
+ * - ::cudaHostAllocWriteCombined: Allocates the memory as write-combined (WC).
466
+ * WC memory can be transferred across the PCI Express bus more quickly on some
467
+ * system configurations, but cannot be read efficiently by most CPUs. WC
468
+ * memory is a good option for buffers that will be written by the CPU and read
469
+ * by the device via mapped pinned memory or host->device transfers.
470
+ *
471
+ * All of these flags are orthogonal to one another: a developer may allocate
472
+ * memory that is portable, mapped and/or write-combined with no restrictions.
473
+ *
474
+ * ::cudaSetDeviceFlags() must have been called with the ::cudaDeviceMapHost
475
+ * flag in order for the ::cudaHostAllocMapped flag to have any effect.
476
+ *
477
+ * The ::cudaHostAllocMapped flag may be specified on CUDA contexts for devices
478
+ * that do not support mapped pinned memory. The failure is deferred to
479
+ * ::cudaHostGetDevicePointer() because the memory may be mapped into other
480
+ * CUDA contexts via the ::cudaHostAllocPortable flag.
481
+ *
482
+ * Memory allocated by this function must be freed with ::cudaFreeHost().
483
+ *
484
+ * \param ptr - Device pointer to allocated memory
485
+ * \param size - Requested allocation size in bytes
486
+ * \param flags - Requested properties of allocated memory
487
+ *
488
+ * \return
489
+ * ::cudaSuccess,
490
+ * ::cudaErrorMemoryAllocation
491
+ * \notefnerr
492
+ * \note_init_rt
493
+ * \note_callback
494
+ *
495
+ * \sa ::cudaSetDeviceFlags,
496
+ * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)",
497
+ * ::cudaFreeHost, ::cudaHostAlloc
498
+ */
499
+ static __inline__ __host__ cudaError_t cudaMallocHost(
500
+ void **ptr,
501
+ size_t size,
502
+ unsigned int flags
503
+ )
504
+ {
505
+ return ::cudaHostAlloc(ptr, size, flags);
506
+ }
507
+
508
+ template<class T>
509
+ static __inline__ __host__ cudaError_t cudaHostAlloc(
510
+ T **ptr,
511
+ size_t size,
512
+ unsigned int flags
513
+ )
514
+ {
515
+ return ::cudaHostAlloc((void**)(void*)ptr, size, flags);
516
+ }
517
+
518
+ template<class T>
519
+ static __inline__ __host__ cudaError_t cudaHostGetDevicePointer(
520
+ T **pDevice,
521
+ void *pHost,
522
+ unsigned int flags
523
+ )
524
+ {
525
+ return ::cudaHostGetDevicePointer((void**)(void*)pDevice, pHost, flags);
526
+ }
527
+
528
+ /**
529
+ * \brief Allocates memory that will be automatically managed by the Unified Memory system
530
+ *
531
+ * Allocates \p size bytes of managed memory on the device and returns in
532
+ * \p *devPtr a pointer to the allocated memory. If the device doesn't support
533
+ * allocating managed memory, ::cudaErrorNotSupported is returned. Support
534
+ * for managed memory can be queried using the device attribute
535
+ * ::cudaDevAttrManagedMemory. The allocated memory is suitably
536
+ * aligned for any kind of variable. The memory is not cleared. If \p size
537
+ * is 0, ::cudaMallocManaged returns ::cudaErrorInvalidValue. The pointer
538
+ * is valid on the CPU and on all GPUs in the system that support managed memory.
539
+ * All accesses to this pointer must obey the Unified Memory programming model.
540
+ *
541
+ * \p flags specifies the default stream association for this allocation.
542
+ * \p flags must be one of ::cudaMemAttachGlobal or ::cudaMemAttachHost. The
543
+ * default value for \p flags is ::cudaMemAttachGlobal.
544
+ * If ::cudaMemAttachGlobal is specified, then this memory is accessible from
545
+ * any stream on any device. If ::cudaMemAttachHost is specified, then the
546
+ * allocation should not be accessed from devices that have a zero value for the
547
+ * device attribute ::cudaDevAttrConcurrentManagedAccess; an explicit call to
548
+ * ::cudaStreamAttachMemAsync will be required to enable access on such devices.
549
+ *
550
+ * If the association is later changed via ::cudaStreamAttachMemAsync to
551
+ * a single stream, the default association, as specifed during ::cudaMallocManaged,
552
+ * is restored when that stream is destroyed. For __managed__ variables, the
553
+ * default association is always ::cudaMemAttachGlobal. Note that destroying a
554
+ * stream is an asynchronous operation, and as a result, the change to default
555
+ * association won't happen until all work in the stream has completed.
556
+ *
557
+ * Memory allocated with ::cudaMallocManaged should be released with ::cudaFree.
558
+ *
559
+ * Device memory oversubscription is possible for GPUs that have a non-zero value for the
560
+ * device attribute ::cudaDevAttrConcurrentManagedAccess. Managed memory on
561
+ * such GPUs may be evicted from device memory to host memory at any time by the Unified
562
+ * Memory driver in order to make room for other allocations.
563
+ *
564
+ * In a multi-GPU system where all GPUs have a non-zero value for the device attribute
565
+ * ::cudaDevAttrConcurrentManagedAccess, managed memory may not be populated when this
566
+ * API returns and instead may be populated on access. In such systems, managed memory can
567
+ * migrate to any processor's memory at any time. The Unified Memory driver will employ heuristics to
568
+ * maintain data locality and prevent excessive page faults to the extent possible. The application
569
+ * can also guide the driver about memory usage patterns via ::cudaMemAdvise. The application
570
+ * can also explicitly migrate memory to a desired processor's memory via
571
+ * ::cudaMemPrefetchAsync.
572
+ *
573
+ * In a multi-GPU system where all of the GPUs have a zero value for the device attribute
574
+ * ::cudaDevAttrConcurrentManagedAccess and all the GPUs have peer-to-peer support
575
+ * with each other, the physical storage for managed memory is created on the GPU which is active
576
+ * at the time ::cudaMallocManaged is called. All other GPUs will reference the data at reduced
577
+ * bandwidth via peer mappings over the PCIe bus. The Unified Memory driver does not migrate
578
+ * memory among such GPUs.
579
+ *
580
+ * In a multi-GPU system where not all GPUs have peer-to-peer support with each other and
581
+ * where the value of the device attribute ::cudaDevAttrConcurrentManagedAccess
582
+ * is zero for at least one of those GPUs, the location chosen for physical storage of managed
583
+ * memory is system-dependent.
584
+ * - On Linux, the location chosen will be device memory as long as the current set of active
585
+ * contexts are on devices that either have peer-to-peer support with each other or have a
586
+ * non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess.
587
+ * If there is an active context on a GPU that does not have a non-zero value for that device
588
+ * attribute and it does not have peer-to-peer support with the other devices that have active
589
+ * contexts on them, then the location for physical storage will be 'zero-copy' or host memory.
590
+ * Note that this means that managed memory that is located in device memory is migrated to
591
+ * host memory if a new context is created on a GPU that doesn't have a non-zero value for
592
+ * the device attribute and does not support peer-to-peer with at least one of the other devices
593
+ * that has an active context. This in turn implies that context creation may fail if there is
594
+ * insufficient host memory to migrate all managed allocations.
595
+ * - On Windows, the physical storage is always created in 'zero-copy' or host memory.
596
+ * All GPUs will reference the data at reduced bandwidth over the PCIe bus. In these
597
+ * circumstances, use of the environment variable CUDA_VISIBLE_DEVICES is recommended to
598
+ * restrict CUDA to only use those GPUs that have peer-to-peer support.
599
+ * Alternatively, users can also set CUDA_MANAGED_FORCE_DEVICE_ALLOC to a non-zero
600
+ * value to force the driver to always use device memory for physical storage.
601
+ * When this environment variable is set to a non-zero value, all devices used in
602
+ * that process that support managed memory have to be peer-to-peer compatible
603
+ * with each other. The error ::cudaErrorInvalidDevice will be returned if a device
604
+ * that supports managed memory is used and it is not peer-to-peer compatible with
605
+ * any of the other managed memory supporting devices that were previously used in
606
+ * that process, even if ::cudaDeviceReset has been called on those devices. These
607
+ * environment variables are described in the CUDA programming guide under the
608
+ * "CUDA environment variables" section.
609
+ * - On ARM, managed memory is not available on discrete gpu with Drive PX-2.
610
+ *
611
+ * \param devPtr - Pointer to allocated device memory
612
+ * \param size - Requested allocation size in bytes
613
+ * \param flags - Must be either ::cudaMemAttachGlobal or ::cudaMemAttachHost (defaults to ::cudaMemAttachGlobal)
614
+ *
615
+ * \return
616
+ * ::cudaSuccess,
617
+ * ::cudaErrorMemoryAllocation,
618
+ * ::cudaErrorNotSupported,
619
+ * ::cudaErrorInvalidValue
620
+ * \note_init_rt
621
+ * \note_callback
622
+ *
623
+ * \sa ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray,
624
+ * ::cudaMalloc3D, ::cudaMalloc3DArray,
625
+ * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)",
626
+ * ::cudaFreeHost, ::cudaHostAlloc, ::cudaDeviceGetAttribute, ::cudaStreamAttachMemAsync
627
+ */
628
+ template<class T>
629
+ static __inline__ __host__ cudaError_t cudaMallocManaged(
630
+ T **devPtr,
631
+ size_t size,
632
+ unsigned int flags = cudaMemAttachGlobal
633
+ )
634
+ {
635
+ return ::cudaMallocManaged((void**)(void*)devPtr, size, flags);
636
+ }
637
+
638
+ /**
639
+ * \brief Advise about the usage of a given memory range.
640
+ *
641
+ * This is an alternate spelling for cudaMemAdvise made available through operator overloading.
642
+ *
643
+ * \sa ::cudaMemAdvise,
644
+ * \ref ::cudaMemAdvise(const void* devPtr, size_t count, enum cudaMemoryAdvise advice, struct cudaMemLocation location) "cudaMemAdvise (C API)"
645
+ */
646
+ template<class T>
647
+ cudaError_t cudaMemAdvise(
648
+ T *devPtr,
649
+ size_t count,
650
+ enum cudaMemoryAdvise advice,
651
+ struct cudaMemLocation location
652
+ )
653
+ {
654
+ return ::cudaMemAdvise_v2((const void *)devPtr, count, advice, location);
655
+ }
656
+
657
+ template<class T>
658
+ static __inline__ __host__ cudaError_t cudaMemPrefetchAsync(
659
+ T *devPtr,
660
+ size_t count,
661
+ struct cudaMemLocation location,
662
+ unsigned int flags,
663
+ cudaStream_t stream = 0
664
+ )
665
+ {
666
+ return ::cudaMemPrefetchAsync_v2((const void *)devPtr, count, location, flags, stream);
667
+ }
668
+
669
+ /**
670
+ * \brief Attach memory to a stream asynchronously
671
+ *
672
+ * Enqueues an operation in \p stream to specify stream association of
673
+ * \p length bytes of memory starting from \p devPtr. This function is a
674
+ * stream-ordered operation, meaning that it is dependent on, and will
675
+ * only take effect when, previous work in stream has completed. Any
676
+ * previous association is automatically replaced.
677
+ *
678
+ * \p devPtr must point to an one of the following types of memories:
679
+ * - managed memory declared using the __managed__ keyword or allocated with
680
+ * ::cudaMallocManaged.
681
+ * - a valid host-accessible region of system-allocated pageable memory. This
682
+ * type of memory may only be specified if the device associated with the
683
+ * stream reports a non-zero value for the device attribute
684
+ * ::cudaDevAttrPageableMemoryAccess.
685
+ *
686
+ * For managed allocations, \p length must be either zero or the entire
687
+ * allocation's size. Both indicate that the entire allocation's stream
688
+ * association is being changed. Currently, it is not possible to change stream
689
+ * association for a portion of a managed allocation.
690
+ *
691
+ * For pageable allocations, \p length must be non-zero.
692
+ *
693
+ * The stream association is specified using \p flags which must be
694
+ * one of ::cudaMemAttachGlobal, ::cudaMemAttachHost or ::cudaMemAttachSingle.
695
+ * The default value for \p flags is ::cudaMemAttachSingle
696
+ * If the ::cudaMemAttachGlobal flag is specified, the memory can be accessed
697
+ * by any stream on any device.
698
+ * If the ::cudaMemAttachHost flag is specified, the program makes a guarantee
699
+ * that it won't access the memory on the device from any stream on a device that
700
+ * has a zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess.
701
+ * If the ::cudaMemAttachSingle flag is specified and \p stream is associated with
702
+ * a device that has a zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess,
703
+ * the program makes a guarantee that it will only access the memory on the device
704
+ * from \p stream. It is illegal to attach singly to the NULL stream, because the
705
+ * NULL stream is a virtual global stream and not a specific stream. An error will
706
+ * be returned in this case.
707
+ *
708
+ * When memory is associated with a single stream, the Unified Memory system will
709
+ * allow CPU access to this memory region so long as all operations in \p stream
710
+ * have completed, regardless of whether other streams are active. In effect,
711
+ * this constrains exclusive ownership of the managed memory region by
712
+ * an active GPU to per-stream activity instead of whole-GPU activity.
713
+ *
714
+ * Accessing memory on the device from streams that are not associated with
715
+ * it will produce undefined results. No error checking is performed by the
716
+ * Unified Memory system to ensure that kernels launched into other streams
717
+ * do not access this region.
718
+ *
719
+ * It is a program's responsibility to order calls to ::cudaStreamAttachMemAsync
720
+ * via events, synchronization or other means to ensure legal access to memory
721
+ * at all times. Data visibility and coherency will be changed appropriately
722
+ * for all kernels which follow a stream-association change.
723
+ *
724
+ * If \p stream is destroyed while data is associated with it, the association is
725
+ * removed and the association reverts to the default visibility of the allocation
726
+ * as specified at ::cudaMallocManaged. For __managed__ variables, the default
727
+ * association is always ::cudaMemAttachGlobal. Note that destroying a stream is an
728
+ * asynchronous operation, and as a result, the change to default association won't
729
+ * happen until all work in the stream has completed.
730
+ *
731
+ * \param stream - Stream in which to enqueue the attach operation
732
+ * \param devPtr - Pointer to memory (must be a pointer to managed memory or
733
+ * to a valid host-accessible region of system-allocated
734
+ * memory)
735
+ * \param length - Length of memory (defaults to zero)
736
+ * \param flags - Must be one of ::cudaMemAttachGlobal, ::cudaMemAttachHost or ::cudaMemAttachSingle (defaults to ::cudaMemAttachSingle)
737
+ *
738
+ * \return
739
+ * ::cudaSuccess,
740
+ * ::cudaErrorNotReady,
741
+ * ::cudaErrorInvalidValue,
742
+ * ::cudaErrorInvalidResourceHandle
743
+ * \notefnerr
744
+ * \note_init_rt
745
+ * \note_callback
746
+ *
747
+ * \sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamWaitEvent, ::cudaStreamSynchronize, ::cudaStreamAddCallback, ::cudaStreamDestroy, ::cudaMallocManaged
748
+ */
749
+ template<class T>
750
+ static __inline__ __host__ cudaError_t cudaStreamAttachMemAsync(
751
+ cudaStream_t stream,
752
+ T *devPtr,
753
+ size_t length = 0,
754
+ unsigned int flags = cudaMemAttachSingle
755
+ )
756
+ {
757
+ return ::cudaStreamAttachMemAsync(stream, (void*)devPtr, length, flags);
758
+ }
759
+
760
+ template<class T>
761
+ static __inline__ __host__ cudaError_t cudaMalloc(
762
+ T **devPtr,
763
+ size_t size
764
+ )
765
+ {
766
+ return ::cudaMalloc((void**)(void*)devPtr, size);
767
+ }
768
+
769
+ template<class T>
770
+ static __inline__ __host__ cudaError_t cudaMallocHost(
771
+ T **ptr,
772
+ size_t size,
773
+ unsigned int flags = 0
774
+ )
775
+ {
776
+ return cudaMallocHost((void**)(void*)ptr, size, flags);
777
+ }
778
+
779
+ template<class T>
780
+ static __inline__ __host__ cudaError_t cudaMallocPitch(
781
+ T **devPtr,
782
+ size_t *pitch,
783
+ size_t width,
784
+ size_t height
785
+ )
786
+ {
787
+ return ::cudaMallocPitch((void**)(void*)devPtr, pitch, width, height);
788
+ }
789
+
790
+ /**
791
+ * \brief Allocate from a pool
792
+ *
793
+ * This is an alternate spelling for cudaMallocFromPoolAsync
794
+ * made available through operator overloading.
795
+ *
796
+ * \sa ::cudaMallocFromPoolAsync,
797
+ * \ref ::cudaMallocAsync(void** ptr, size_t size, cudaStream_t hStream) "cudaMallocAsync (C API)"
798
+ */
799
+ static __inline__ __host__ cudaError_t cudaMallocAsync(
800
+ void **ptr,
801
+ size_t size,
802
+ cudaMemPool_t memPool,
803
+ cudaStream_t stream
804
+ )
805
+ {
806
+ return ::cudaMallocFromPoolAsync(ptr, size, memPool, stream);
807
+ }
808
+
809
+ template<class T>
810
+ static __inline__ __host__ cudaError_t cudaMallocAsync(
811
+ T **ptr,
812
+ size_t size,
813
+ cudaMemPool_t memPool,
814
+ cudaStream_t stream
815
+ )
816
+ {
817
+ return ::cudaMallocFromPoolAsync((void**)(void*)ptr, size, memPool, stream);
818
+ }
819
+
820
+ template<class T>
821
+ static __inline__ __host__ cudaError_t cudaMallocAsync(
822
+ T **ptr,
823
+ size_t size,
824
+ cudaStream_t stream
825
+ )
826
+ {
827
+ return ::cudaMallocAsync((void**)(void*)ptr, size, stream);
828
+ }
829
+
830
+ template<class T>
831
+ static __inline__ __host__ cudaError_t cudaMallocFromPoolAsync(
832
+ T **ptr,
833
+ size_t size,
834
+ cudaMemPool_t memPool,
835
+ cudaStream_t stream
836
+ )
837
+ {
838
+ return ::cudaMallocFromPoolAsync((void**)(void*)ptr, size, memPool, stream);
839
+ }
840
+
841
+ #if defined(__CUDACC__)
842
+
843
+ /**
844
+ * \brief \hl Copies data to the given symbol on the device
845
+ *
846
+ * Copies \p count bytes from the memory area pointed to by \p src
847
+ * to the memory area \p offset bytes from the start of symbol
848
+ * \p symbol. The memory areas may not overlap. \p symbol is a variable that
849
+ * resides in global or constant memory space. \p kind can be either
850
+ * ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToDevice.
851
+ *
852
+ * \param symbol - Device symbol reference
853
+ * \param src - Source memory address
854
+ * \param count - Size in bytes to copy
855
+ * \param offset - Offset from start of symbol in bytes
856
+ * \param kind - Type of transfer
857
+ *
858
+ * \return
859
+ * ::cudaSuccess,
860
+ * ::cudaErrorInvalidValue,
861
+ * ::cudaErrorInvalidSymbol,
862
+ * ::cudaErrorInvalidMemcpyDirection,
863
+ * ::cudaErrorNoKernelImageForDevice
864
+ * \notefnerr
865
+ * \note_sync
866
+ * \note_string_api_deprecation
867
+ * \note_init_rt
868
+ * \note_callback
869
+ *
870
+ * \sa ::cudaMemcpy, ::cudaMemcpy2D,
871
+ * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,
872
+ * ::cudaMemcpy2DArrayToArray,
873
+ * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,
874
+ * ::cudaMemcpy2DToArrayAsync,
875
+ * ::cudaMemcpy2DFromArrayAsync,
876
+ * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync
877
+ */
878
+ template<class T>
879
+ static __inline__ __host__ cudaError_t cudaMemcpyToSymbol(
880
+ const T &symbol,
881
+ const void *src,
882
+ size_t count,
883
+ size_t offset = 0,
884
+ enum cudaMemcpyKind kind = cudaMemcpyHostToDevice
885
+ )
886
+ {
887
+ return ::cudaMemcpyToSymbol((const void*)&symbol, src, count, offset, kind);
888
+ }
889
+
890
+ /**
891
+ * \brief \hl Copies data to the given symbol on the device
892
+ *
893
+ * Copies \p count bytes from the memory area pointed to by \p src
894
+ * to the memory area \p offset bytes from the start of symbol
895
+ * \p symbol. The memory areas may not overlap. \p symbol is a variable that
896
+ * resides in global or constant memory space. \p kind can be either
897
+ * ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToDevice.
898
+ *
899
+ * ::cudaMemcpyToSymbolAsync() is asynchronous with respect to the host, so
900
+ * the call may return before the copy is complete. The copy can optionally
901
+ * be associated to a stream by passing a non-zero \p stream argument. If
902
+ * \p kind is ::cudaMemcpyHostToDevice and \p stream is non-zero, the copy
903
+ * may overlap with operations in other streams.
904
+ *
905
+ * \param symbol - Device symbol reference
906
+ * \param src - Source memory address
907
+ * \param count - Size in bytes to copy
908
+ * \param offset - Offset from start of symbol in bytes
909
+ * \param kind - Type of transfer
910
+ * \param stream - Stream identifier
911
+ *
912
+ * \return
913
+ * ::cudaSuccess,
914
+ * ::cudaErrorInvalidValue,
915
+ * ::cudaErrorInvalidSymbol,
916
+ * ::cudaErrorInvalidMemcpyDirection,
917
+ * ::cudaErrorNoKernelImageForDevice
918
+ * \notefnerr
919
+ * \note_async
920
+ * \note_string_api_deprecation
921
+ * \note_init_rt
922
+ * \note_callback
923
+ *
924
+ * \sa ::cudaMemcpy, ::cudaMemcpy2D,
925
+ * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,
926
+ * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,
927
+ * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,
928
+ * ::cudaMemcpy2DToArrayAsync,
929
+ * ::cudaMemcpy2DFromArrayAsync,
930
+ * ::cudaMemcpyFromSymbolAsync
931
+ */
932
+ template<class T>
933
+ static __inline__ __host__ cudaError_t cudaMemcpyToSymbolAsync(
934
+ const T &symbol,
935
+ const void *src,
936
+ size_t count,
937
+ size_t offset = 0,
938
+ enum cudaMemcpyKind kind = cudaMemcpyHostToDevice,
939
+ cudaStream_t stream = 0
940
+ )
941
+ {
942
+ return ::cudaMemcpyToSymbolAsync((const void*)&symbol, src, count, offset, kind, stream);
943
+ }
944
+
945
+ /**
946
+ * \brief \hl Copies data from the given symbol on the device
947
+ *
948
+ * Copies \p count bytes from the memory area \p offset bytes
949
+ * from the start of symbol \p symbol to the memory area pointed to by \p dst.
950
+ * The memory areas may not overlap. \p symbol is a variable that
951
+ * resides in global or constant memory space. \p kind can be either
952
+ * ::cudaMemcpyDeviceToHost or ::cudaMemcpyDeviceToDevice.
953
+ *
954
+ * \param dst - Destination memory address
955
+ * \param symbol - Device symbol reference
956
+ * \param count - Size in bytes to copy
957
+ * \param offset - Offset from start of symbol in bytes
958
+ * \param kind - Type of transfer
959
+ *
960
+ * \return
961
+ * ::cudaSuccess,
962
+ * ::cudaErrorInvalidValue,
963
+ * ::cudaErrorInvalidSymbol,
964
+ * ::cudaErrorInvalidMemcpyDirection,
965
+ * ::cudaErrorNoKernelImageForDevice
966
+ * \notefnerr
967
+ * \note_sync
968
+ * \note_string_api_deprecation
969
+ * \note_init_rt
970
+ * \note_callback
971
+ *
972
+ * \sa ::cudaMemcpy, ::cudaMemcpy2D,
973
+ * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,
974
+ * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,
975
+ * ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,
976
+ * ::cudaMemcpy2DToArrayAsync,
977
+ * ::cudaMemcpy2DFromArrayAsync,
978
+ * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync
979
+ */
980
+ template<class T>
981
+ static __inline__ __host__ cudaError_t cudaMemcpyFromSymbol(
982
+ void *dst,
983
+ const T &symbol,
984
+ size_t count,
985
+ size_t offset = 0,
986
+ enum cudaMemcpyKind kind = cudaMemcpyDeviceToHost
987
+ )
988
+ {
989
+ return ::cudaMemcpyFromSymbol(dst, (const void*)&symbol, count, offset, kind);
990
+ }
991
+
992
+ /**
993
+ * \brief \hl Copies data from the given symbol on the device
994
+ *
995
+ * Copies \p count bytes from the memory area \p offset bytes
996
+ * from the start of symbol \p symbol to the memory area pointed to by \p dst.
997
+ * The memory areas may not overlap. \p symbol is a variable that resides in
998
+ * global or constant memory space. \p kind can be either
999
+ * ::cudaMemcpyDeviceToHost or ::cudaMemcpyDeviceToDevice.
1000
+ *
1001
+ * ::cudaMemcpyFromSymbolAsync() is asynchronous with respect to the host, so
1002
+ * the call may return before the copy is complete. The copy can optionally be
1003
+ * associated to a stream by passing a non-zero \p stream argument. If \p kind
1004
+ * is ::cudaMemcpyDeviceToHost and \p stream is non-zero, the copy may overlap
1005
+ * with operations in other streams.
1006
+ *
1007
+ * \param dst - Destination memory address
1008
+ * \param symbol - Device symbol reference
1009
+ * \param count - Size in bytes to copy
1010
+ * \param offset - Offset from start of symbol in bytes
1011
+ * \param kind - Type of transfer
1012
+ * \param stream - Stream identifier
1013
+ *
1014
+ * \return
1015
+ * ::cudaSuccess,
1016
+ * ::cudaErrorInvalidValue,
1017
+ * ::cudaErrorInvalidSymbol,
1018
+ * ::cudaErrorInvalidMemcpyDirection,
1019
+ * ::cudaErrorNoKernelImageForDevice
1020
+ * \notefnerr
1021
+ * \note_async
1022
+ * \note_string_api_deprecation
1023
+ * \note_init_rt
1024
+ * \note_callback
1025
+ *
1026
+ * \sa ::cudaMemcpy, ::cudaMemcpy2D,
1027
+ * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,
1028
+ * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,
1029
+ * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,
1030
+ * ::cudaMemcpy2DToArrayAsync,
1031
+ * ::cudaMemcpy2DFromArrayAsync,
1032
+ * ::cudaMemcpyToSymbolAsync
1033
+ */
1034
+ template<class T>
1035
+ static __inline__ __host__ cudaError_t cudaMemcpyFromSymbolAsync(
1036
+ void *dst,
1037
+ const T &symbol,
1038
+ size_t count,
1039
+ size_t offset = 0,
1040
+ enum cudaMemcpyKind kind = cudaMemcpyDeviceToHost,
1041
+ cudaStream_t stream = 0
1042
+ )
1043
+ {
1044
+ return ::cudaMemcpyFromSymbolAsync(dst, (const void*)&symbol, count, offset, kind, stream);
1045
+ }
1046
+
1047
+ /**
1048
+ * \brief Creates a memcpy node to copy to a symbol on the device and adds it to a graph
1049
+ *
1050
+ * Creates a new memcpy node to copy to \p symbol and adds it to \p graph with
1051
+ * \p numDependencies dependencies specified via \p pDependencies.
1052
+ * It is possible for \p numDependencies to be 0, in which case the node will be placed
1053
+ * at the root of the graph. \p pDependencies may not have any duplicate entries.
1054
+ * A handle to the new node will be returned in \p pGraphNode.
1055
+ *
1056
+ * When the graph is launched, the node will copy \p count bytes from the memory area
1057
+ * pointed to by \p src to the memory area pointed to by \p offset bytes from the start
1058
+ * of symbol \p symbol. The memory areas may not overlap. \p symbol is a variable that
1059
+ * resides in global or constant memory space. \p kind can be either
1060
+ * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.
1061
+ * Passing ::cudaMemcpyDefault is recommended, in which case the type of
1062
+ * transfer is inferred from the pointer values. However, ::cudaMemcpyDefault
1063
+ * is only allowed on systems that support unified virtual addressing.
1064
+ *
1065
+ * Memcpy nodes have some additional restrictions with regards to managed memory, if the
1066
+ * system contains at least one device which has a zero value for the device attribute
1067
+ * ::cudaDevAttrConcurrentManagedAccess.
1068
+ *
1069
+ * \param pGraphNode - Returns newly created node
1070
+ * \param graph - Graph to which to add the node
1071
+ * \param pDependencies - Dependencies of the node
1072
+ * \param numDependencies - Number of dependencies
1073
+ * \param symbol - Device symbol address
1074
+ * \param src - Source memory address
1075
+ * \param count - Size in bytes to copy
1076
+ * \param offset - Offset from start of symbol in bytes
1077
+ * \param kind - Type of transfer
1078
+ *
1079
+ * \return
1080
+ * ::cudaSuccess,
1081
+ * ::cudaErrorInvalidValue
1082
+ * \note_graph_thread_safety
1083
+ * \notefnerr
1084
+ * \note_init_rt
1085
+ * \note_callback
1086
+ *
1087
+ * \sa
1088
+ * ::cudaMemcpyToSymbol,
1089
+ * ::cudaGraphAddMemcpyNode,
1090
+ * ::cudaGraphAddMemcpyNodeFromSymbol,
1091
+ * ::cudaGraphMemcpyNodeGetParams,
1092
+ * ::cudaGraphMemcpyNodeSetParams,
1093
+ * ::cudaGraphMemcpyNodeSetParamsToSymbol,
1094
+ * ::cudaGraphMemcpyNodeSetParamsFromSymbol,
1095
+ * ::cudaGraphCreate,
1096
+ * ::cudaGraphDestroyNode,
1097
+ * ::cudaGraphAddChildGraphNode,
1098
+ * ::cudaGraphAddEmptyNode,
1099
+ * ::cudaGraphAddKernelNode,
1100
+ * ::cudaGraphAddHostNode,
1101
+ * ::cudaGraphAddMemsetNode
1102
+ */
1103
+ template<class T>
1104
+ static __inline__ __host__ cudaError_t cudaGraphAddMemcpyNodeToSymbol(
1105
+ cudaGraphNode_t *pGraphNode,
1106
+ cudaGraph_t graph,
1107
+ const cudaGraphNode_t *pDependencies,
1108
+ size_t numDependencies,
1109
+ const T &symbol,
1110
+ const void* src,
1111
+ size_t count,
1112
+ size_t offset,
1113
+ enum cudaMemcpyKind kind)
1114
+ {
1115
+ return ::cudaGraphAddMemcpyNodeToSymbol(pGraphNode, graph, pDependencies, numDependencies, (const void*)&symbol, src, count, offset, kind);
1116
+ }
1117
+
1118
+ /**
1119
+ * \brief Creates a memcpy node to copy from a symbol on the device and adds it to a graph
1120
+ *
1121
+ * Creates a new memcpy node to copy from \p symbol and adds it to \p graph with
1122
+ * \p numDependencies dependencies specified via \p pDependencies.
1123
+ * It is possible for \p numDependencies to be 0, in which case the node will be placed
1124
+ * at the root of the graph. \p pDependencies may not have any duplicate entries.
1125
+ * A handle to the new node will be returned in \p pGraphNode.
1126
+ *
1127
+ * When the graph is launched, the node will copy \p count bytes from the memory area
1128
+ * pointed to by \p offset bytes from the start of symbol \p symbol to the memory area
1129
+ * pointed to by \p dst. The memory areas may not overlap. \p symbol is a variable
1130
+ * that resides in global or constant memory space. \p kind can be either
1131
+ * ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.
1132
+ * Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer
1133
+ * is inferred from the pointer values. However, ::cudaMemcpyDefault is only
1134
+ * allowed on systems that support unified virtual addressing.
1135
+ *
1136
+ * Memcpy nodes have some additional restrictions with regards to managed memory, if the
1137
+ * system contains at least one device which has a zero value for the device attribute
1138
+ * ::cudaDevAttrConcurrentManagedAccess.
1139
+ *
1140
+ * \param pGraphNode - Returns newly created node
1141
+ * \param graph - Graph to which to add the node
1142
+ * \param pDependencies - Dependencies of the node
1143
+ * \param numDependencies - Number of dependencies
1144
+ * \param dst - Destination memory address
1145
+ * \param symbol - Device symbol address
1146
+ * \param count - Size in bytes to copy
1147
+ * \param offset - Offset from start of symbol in bytes
1148
+ * \param kind - Type of transfer
1149
+ *
1150
+ * \return
1151
+ * ::cudaSuccess,
1152
+ * ::cudaErrorInvalidValue
1153
+ * \note_graph_thread_safety
1154
+ * \notefnerr
1155
+ * \note_init_rt
1156
+ * \note_callback
1157
+ *
1158
+ * \sa
1159
+ * ::cudaMemcpyFromSymbol,
1160
+ * ::cudaGraphAddMemcpyNode,
1161
+ * ::cudaGraphAddMemcpyNodeToSymbol,
1162
+ * ::cudaGraphMemcpyNodeGetParams,
1163
+ * ::cudaGraphMemcpyNodeSetParams,
1164
+ * ::cudaGraphMemcpyNodeSetParamsFromSymbol,
1165
+ * ::cudaGraphMemcpyNodeSetParamsToSymbol,
1166
+ * ::cudaGraphCreate,
1167
+ * ::cudaGraphDestroyNode,
1168
+ * ::cudaGraphAddChildGraphNode,
1169
+ * ::cudaGraphAddEmptyNode,
1170
+ * ::cudaGraphAddKernelNode,
1171
+ * ::cudaGraphAddHostNode,
1172
+ * ::cudaGraphAddMemsetNode
1173
+ */
1174
+ template<class T>
1175
+ static __inline__ __host__ cudaError_t cudaGraphAddMemcpyNodeFromSymbol(
1176
+ cudaGraphNode_t* pGraphNode,
1177
+ cudaGraph_t graph,
1178
+ const cudaGraphNode_t* pDependencies,
1179
+ size_t numDependencies,
1180
+ void* dst,
1181
+ const T &symbol,
1182
+ size_t count,
1183
+ size_t offset,
1184
+ enum cudaMemcpyKind kind)
1185
+ {
1186
+ return ::cudaGraphAddMemcpyNodeFromSymbol(pGraphNode, graph, pDependencies, numDependencies, dst, (const void*)&symbol, count, offset, kind);
1187
+ }
1188
+
1189
+ /**
1190
+ * \brief Sets a memcpy node's parameters to copy to a symbol on the device
1191
+ *
1192
+ * Sets the parameters of memcpy node \p node to the copy described by the provided parameters.
1193
+ *
1194
+ * When the graph is launched, the node will copy \p count bytes from the memory area
1195
+ * pointed to by \p src to the memory area pointed to by \p offset bytes from the start
1196
+ * of symbol \p symbol. The memory areas may not overlap. \p symbol is a variable that
1197
+ * resides in global or constant memory space. \p kind can be either
1198
+ * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.
1199
+ * Passing ::cudaMemcpyDefault is recommended, in which case the type of
1200
+ * transfer is inferred from the pointer values. However, ::cudaMemcpyDefault
1201
+ * is only allowed on systems that support unified virtual addressing.
1202
+ *
1203
+ * \param node - Node to set the parameters for
1204
+ * \param symbol - Device symbol address
1205
+ * \param src - Source memory address
1206
+ * \param count - Size in bytes to copy
1207
+ * \param offset - Offset from start of symbol in bytes
1208
+ * \param kind - Type of transfer
1209
+ *
1210
+ * \return
1211
+ * ::cudaSuccess,
1212
+ * ::cudaErrorInvalidValue
1213
+ * \note_graph_thread_safety
1214
+ * \notefnerr
1215
+ * \note_init_rt
1216
+ * \note_callback
1217
+ *
1218
+ * \sa
1219
+ * ::cudaMemcpyToSymbol,
1220
+ * ::cudaGraphMemcpyNodeSetParams,
1221
+ * ::cudaGraphMemcpyNodeSetParamsFromSymbol,
1222
+ * ::cudaGraphAddMemcpyNode,
1223
+ * ::cudaGraphMemcpyNodeGetParams
1224
+ */
1225
+ template<class T>
1226
+ static __inline__ __host__ cudaError_t cudaGraphMemcpyNodeSetParamsToSymbol(
1227
+ cudaGraphNode_t node,
1228
+ const T &symbol,
1229
+ const void* src,
1230
+ size_t count,
1231
+ size_t offset,
1232
+ enum cudaMemcpyKind kind)
1233
+ {
1234
+ return ::cudaGraphMemcpyNodeSetParamsToSymbol(node, (const void*)&symbol, src, count, offset, kind);
1235
+ }
1236
+
1237
+ /**
1238
+ * \brief Sets a memcpy node's parameters to copy from a symbol on the device
1239
+ *
1240
+ * Sets the parameters of memcpy node \p node to the copy described by the provided parameters.
1241
+ *
1242
+ * When the graph is launched, the node will copy \p count bytes from the memory area
1243
+ * pointed to by \p offset bytes from the start of symbol \p symbol to the memory area
1244
+ * pointed to by \p dst. The memory areas may not overlap. \p symbol is a variable
1245
+ * that resides in global or constant memory space. \p kind can be either
1246
+ * ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.
1247
+ * Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer
1248
+ * is inferred from the pointer values. However, ::cudaMemcpyDefault is only
1249
+ * allowed on systems that support unified virtual addressing.
1250
+ *
1251
+ * \param node - Node to set the parameters for
1252
+ * \param dst - Destination memory address
1253
+ * \param symbol - Device symbol address
1254
+ * \param count - Size in bytes to copy
1255
+ * \param offset - Offset from start of symbol in bytes
1256
+ * \param kind - Type of transfer
1257
+ *
1258
+ * \return
1259
+ * ::cudaSuccess,
1260
+ * ::cudaErrorInvalidValue
1261
+ * \note_graph_thread_safety
1262
+ * \notefnerr
1263
+ * \note_init_rt
1264
+ * \note_callback
1265
+ *
1266
+ * \sa
1267
+ * ::cudaMemcpyFromSymbol,
1268
+ * ::cudaGraphMemcpyNodeSetParams,
1269
+ * ::cudaGraphMemcpyNodeSetParamsToSymbol,
1270
+ * ::cudaGraphAddMemcpyNode,
1271
+ * ::cudaGraphMemcpyNodeGetParams
1272
+ */
1273
+ template<class T>
1274
+ static __inline__ __host__ cudaError_t cudaGraphMemcpyNodeSetParamsFromSymbol(
1275
+ cudaGraphNode_t node,
1276
+ void* dst,
1277
+ const T &symbol,
1278
+ size_t count,
1279
+ size_t offset,
1280
+ enum cudaMemcpyKind kind)
1281
+ {
1282
+ return ::cudaGraphMemcpyNodeSetParamsFromSymbol(node, dst, (const void*)&symbol, count, offset, kind);
1283
+ }
1284
+
1285
+ /**
1286
+ * \brief Sets the parameters for a memcpy node in the given graphExec to copy to a symbol on the device
1287
+ *
1288
+ * Updates the work represented by \p node in \p hGraphExec as though \p node had
1289
+ * contained the given params at instantiation. \p node must remain in the graph which was
1290
+ * used to instantiate \p hGraphExec. Changed edges to and from \p node are ignored.
1291
+ *
1292
+ * \p src and \p symbol must be allocated from the same contexts as the original source and
1293
+ * destination memory. The instantiation-time memory operands must be 1-dimensional.
1294
+ * Zero-length operations are not supported.
1295
+ *
1296
+ * The modifications only affect future launches of \p hGraphExec. Already enqueued
1297
+ * or running launches of \p hGraphExec are not affected by this call. \p node is also
1298
+ * not modified by this call.
1299
+ *
1300
+ * Returns ::cudaErrorInvalidValue if the memory operands' mappings changed or
1301
+ * the original memory operands are multidimensional.
1302
+ *
1303
+ * \param hGraphExec - The executable graph in which to set the specified node
1304
+ * \param node - Memcpy node from the graph which was used to instantiate graphExec
1305
+ * \param symbol - Device symbol address
1306
+ * \param src - Source memory address
1307
+ * \param count - Size in bytes to copy
1308
+ * \param offset - Offset from start of symbol in bytes
1309
+ * \param kind - Type of transfer
1310
+ *
1311
+ * \return
1312
+ * ::cudaSuccess,
1313
+ * ::cudaErrorInvalidValue
1314
+ * \note_graph_thread_safety
1315
+ * \notefnerr
1316
+ * \note_init_rt
1317
+ * \note_callback
1318
+ *
1319
+ * \sa
1320
+ * ::cudaGraphAddMemcpyNode,
1321
+ * ::cudaGraphAddMemcpyNodeToSymbol,
1322
+ * ::cudaGraphMemcpyNodeSetParams,
1323
+ * ::cudaGraphMemcpyNodeSetParamsToSymbol,
1324
+ * ::cudaGraphInstantiate,
1325
+ * ::cudaGraphExecMemcpyNodeSetParams,
1326
+ * ::cudaGraphExecMemcpyNodeSetParamsFromSymbol,
1327
+ * ::cudaGraphExecKernelNodeSetParams,
1328
+ * ::cudaGraphExecMemsetNodeSetParams,
1329
+ * ::cudaGraphExecHostNodeSetParams
1330
+ */
1331
+ template<class T>
1332
+ static __inline__ __host__ cudaError_t cudaGraphExecMemcpyNodeSetParamsToSymbol(
1333
+ cudaGraphExec_t hGraphExec,
1334
+ cudaGraphNode_t node,
1335
+ const T &symbol,
1336
+ const void* src,
1337
+ size_t count,
1338
+ size_t offset,
1339
+ enum cudaMemcpyKind kind)
1340
+ {
1341
+ return ::cudaGraphExecMemcpyNodeSetParamsToSymbol(hGraphExec, node, (const void*)&symbol, src, count, offset, kind);
1342
+ }
1343
+
1344
+ /**
1345
+ * \brief Sets the parameters for a memcpy node in the given graphExec to copy from a symbol on the device
1346
+ *
1347
+ * Updates the work represented by \p node in \p hGraphExec as though \p node had
1348
+ * contained the given params at instantiation. \p node must remain in the graph which was
1349
+ * used to instantiate \p hGraphExec. Changed edges to and from \p node are ignored.
1350
+ *
1351
+ * \p symbol and \p dst must be allocated from the same contexts as the original source and
1352
+ * destination memory. The instantiation-time memory operands must be 1-dimensional.
1353
+ * Zero-length operations are not supported.
1354
+ *
1355
+ * The modifications only affect future launches of \p hGraphExec. Already enqueued
1356
+ * or running launches of \p hGraphExec are not affected by this call. \p node is also
1357
+ * not modified by this call.
1358
+ *
1359
+ * Returns ::cudaErrorInvalidValue if the memory operands' mappings changed or
1360
+ * the original memory operands are multidimensional.
1361
+ *
1362
+ * \param hGraphExec - The executable graph in which to set the specified node
1363
+ * \param node - Memcpy node from the graph which was used to instantiate graphExec
1364
+ * \param dst - Destination memory address
1365
+ * \param symbol - Device symbol address
1366
+ * \param count - Size in bytes to copy
1367
+ * \param offset - Offset from start of symbol in bytes
1368
+ * \param kind - Type of transfer
1369
+ *
1370
+ * \return
1371
+ * ::cudaSuccess,
1372
+ * ::cudaErrorInvalidValue
1373
+ * \note_graph_thread_safety
1374
+ * \notefnerr
1375
+ * \note_init_rt
1376
+ * \note_callback
1377
+ *
1378
+ * \sa
1379
+ * ::cudaGraphAddMemcpyNode,
1380
+ * ::cudaGraphAddMemcpyNodeFromSymbol,
1381
+ * ::cudaGraphMemcpyNodeSetParams,
1382
+ * ::cudaGraphMemcpyNodeSetParamsFromSymbol,
1383
+ * ::cudaGraphInstantiate,
1384
+ * ::cudaGraphExecMemcpyNodeSetParams,
1385
+ * ::cudaGraphExecMemcpyNodeSetParamsToSymbol,
1386
+ * ::cudaGraphExecKernelNodeSetParams,
1387
+ * ::cudaGraphExecMemsetNodeSetParams,
1388
+ * ::cudaGraphExecHostNodeSetParams
1389
+ */
1390
+ template<class T>
1391
+ static __inline__ __host__ cudaError_t cudaGraphExecMemcpyNodeSetParamsFromSymbol(
1392
+ cudaGraphExec_t hGraphExec,
1393
+ cudaGraphNode_t node,
1394
+ void* dst,
1395
+ const T &symbol,
1396
+ size_t count,
1397
+ size_t offset,
1398
+ enum cudaMemcpyKind kind)
1399
+ {
1400
+ return ::cudaGraphExecMemcpyNodeSetParamsFromSymbol(hGraphExec, node, dst, (const void*)&symbol, count, offset, kind);
1401
+ }
1402
+
1403
+ // convenience function to avoid source breakage in c++ code
1404
+ static __inline__ __host__ cudaError_t CUDARTAPI cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphNode_t *hErrorNode_out, enum cudaGraphExecUpdateResult *updateResult_out)
1405
+ {
1406
+ cudaGraphExecUpdateResultInfo resultInfo;
1407
+ cudaError_t status = cudaGraphExecUpdate(hGraphExec, hGraph, &resultInfo);
1408
+ if (hErrorNode_out) {
1409
+ *hErrorNode_out = resultInfo.errorNode;
1410
+ }
1411
+ if (updateResult_out) {
1412
+ *updateResult_out = resultInfo.result;
1413
+ }
1414
+ return status;
1415
+ }
1416
+
1417
+ #if __cplusplus >= 201103L || (defined(_MSC_VER) && (_MSC_VER >= 1900))
1418
+
1419
+ /**
1420
+ * \brief Creates a user object by wrapping a C++ object
1421
+ *
1422
+ * TODO detail
1423
+ *
1424
+ * \param object_out - Location to return the user object handle
1425
+ * \param objectToWrap - This becomes the \ptr argument to ::cudaUserObjectCreate. A
1426
+ * lambda will be passed for the \p destroy argument, which calls
1427
+ * delete on this object pointer.
1428
+ * \param initialRefcount - The initial refcount to create the object with, typically 1. The
1429
+ * initial references are owned by the calling thread.
1430
+ * \param flags - Currently it is required to pass cudaUserObjectNoDestructorSync,
1431
+ * which is the only defined flag. This indicates that the destroy
1432
+ * callback cannot be waited on by any CUDA API. Users requiring
1433
+ * synchronization of the callback should signal its completion
1434
+ * manually.
1435
+ *
1436
+ * \return
1437
+ * ::cudaSuccess,
1438
+ * ::cudaErrorInvalidValue
1439
+ *
1440
+ * \sa
1441
+ * ::cudaUserObjectCreate
1442
+ */
1443
+ template<class T>
1444
+ static __inline__ __host__ cudaError_t cudaUserObjectCreate(
1445
+ cudaUserObject_t *object_out,
1446
+ T *objectToWrap,
1447
+ unsigned int initialRefcount,
1448
+ unsigned int flags)
1449
+ {
1450
+ return ::cudaUserObjectCreate(
1451
+ object_out,
1452
+ objectToWrap,
1453
+ [](void *vpObj) { delete reinterpret_cast<T *>(vpObj); },
1454
+ initialRefcount,
1455
+ flags);
1456
+ }
1457
+
1458
+ template<class T>
1459
+ static __inline__ __host__ cudaError_t cudaUserObjectCreate(
1460
+ cudaUserObject_t *object_out,
1461
+ T *objectToWrap,
1462
+ unsigned int initialRefcount,
1463
+ cudaUserObjectFlags flags)
1464
+ {
1465
+ return cudaUserObjectCreate(object_out, objectToWrap, initialRefcount, (unsigned int)flags);
1466
+ }
1467
+
1468
+ #endif
1469
+
1470
+ /**
1471
+ * \brief \hl Finds the address associated with a CUDA symbol
1472
+ *
1473
+ * Returns in \p *devPtr the address of symbol \p symbol on the device.
1474
+ * \p symbol can either be a variable that resides in global or constant memory space.
1475
+ * If \p symbol cannot be found, or if \p symbol is not declared
1476
+ * in the global or constant memory space, \p *devPtr is unchanged and the error
1477
+ * ::cudaErrorInvalidSymbol is returned.
1478
+ *
1479
+ * \param devPtr - Return device pointer associated with symbol
1480
+ * \param symbol - Device symbol reference
1481
+ *
1482
+ * \return
1483
+ * ::cudaSuccess,
1484
+ * ::cudaErrorInvalidSymbol,
1485
+ * ::cudaErrorNoKernelImageForDevice
1486
+ * \notefnerr
1487
+ * \note_init_rt
1488
+ * \note_callback
1489
+ *
1490
+ * \sa \ref ::cudaGetSymbolAddress(void**, const void*) "cudaGetSymbolAddress (C API)",
1491
+ * \ref ::cudaGetSymbolSize(size_t*, const T&) "cudaGetSymbolSize (C++ API)"
1492
+ */
1493
+ template<class T>
1494
+ static __inline__ __host__ cudaError_t cudaGetSymbolAddress(
1495
+ void **devPtr,
1496
+ const T &symbol
1497
+ )
1498
+ {
1499
+ return ::cudaGetSymbolAddress(devPtr, (const void*)&symbol);
1500
+ }
1501
+
1502
+ /**
1503
+ * \brief \hl Finds the size of the object associated with a CUDA symbol
1504
+ *
1505
+ * Returns in \p *size the size of symbol \p symbol. \p symbol must be a
1506
+ * variable that resides in global or constant memory space.
1507
+ * If \p symbol cannot be found, or if \p symbol is not declared
1508
+ * in global or constant memory space, \p *size is unchanged and the error
1509
+ * ::cudaErrorInvalidSymbol is returned.
1510
+ *
1511
+ * \param size - Size of object associated with symbol
1512
+ * \param symbol - Device symbol reference
1513
+ *
1514
+ * \return
1515
+ * ::cudaSuccess,
1516
+ * ::cudaErrorInvalidSymbol,
1517
+ * ::cudaErrorNoKernelImageForDevice
1518
+ * \notefnerr
1519
+ * \note_init_rt
1520
+ * \note_callback
1521
+ *
1522
+ * \sa \ref ::cudaGetSymbolAddress(void**, const T&) "cudaGetSymbolAddress (C++ API)",
1523
+ * \ref ::cudaGetSymbolSize(size_t*, const void*) "cudaGetSymbolSize (C API)"
1524
+ */
1525
+ template<class T>
1526
+ static __inline__ __host__ cudaError_t cudaGetSymbolSize(
1527
+ size_t *size,
1528
+ const T &symbol
1529
+ )
1530
+ {
1531
+ return ::cudaGetSymbolSize(size, (const void*)&symbol);
1532
+ }
1533
+
1534
+ /**
1535
+ * \brief \hl Sets the preferred cache configuration for a device function
1536
+ *
1537
+ * On devices where the L1 cache and shared memory use the same hardware
1538
+ * resources, this sets through \p cacheConfig the preferred cache configuration
1539
+ * for the function specified via \p func. This is only a preference. The
1540
+ * runtime will use the requested configuration if possible, but it is free to
1541
+ * choose a different configuration if required to execute \p func.
1542
+ *
1543
+ * \p func must be a pointer to a function that executes on the device.
1544
+ * The parameter specified by \p func must be declared as a \p __global__
1545
+ * function. If the specified function does not exist,
1546
+ * then ::cudaErrorInvalidDeviceFunction is returned.
1547
+ *
1548
+ * This setting does nothing on devices where the size of the L1 cache and
1549
+ * shared memory are fixed.
1550
+ *
1551
+ * Launching a kernel with a different preference than the most recent
1552
+ * preference setting may insert a device-side synchronization point.
1553
+ *
1554
+ * The supported cache configurations are:
1555
+ * - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)
1556
+ * - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache
1557
+ * - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory
1558
+ *
1559
+ * \param func - device function pointer
1560
+ * \param cacheConfig - Requested cache configuration
1561
+ *
1562
+ * \return
1563
+ * ::cudaSuccess,
1564
+ * ::cudaErrorInvalidDeviceFunction
1565
+ * \notefnerr
1566
+ * \note_init_rt
1567
+ * \note_callback
1568
+ *
1569
+ * \ref ::cudaLaunchKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C++ API)",
1570
+ * \ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C API)",
1571
+ * \ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, T*) "cudaFuncGetAttributes (C++ API)",
1572
+ * ::cudaSetDoubleForDevice,
1573
+ * ::cudaSetDoubleForHost,
1574
+ * ::cudaThreadGetCacheConfig,
1575
+ * ::cudaThreadSetCacheConfig
1576
+ */
1577
+ template<class T>
1578
+ static __inline__ __host__ cudaError_t cudaFuncSetCacheConfig(
1579
+ T *func,
1580
+ enum cudaFuncCache cacheConfig
1581
+ )
1582
+ {
1583
+ return ::cudaFuncSetCacheConfig((const void*)func, cacheConfig);
1584
+ }
1585
+
1586
+ template<class T>
1587
+ static __inline__ __host__ cudaError_t cudaFuncSetSharedMemConfig(
1588
+ T *func,
1589
+ enum cudaSharedMemConfig config
1590
+ )
1591
+ {
1592
+ return ::cudaFuncSetSharedMemConfig((const void*)func, config);
1593
+ }
1594
+
1595
+ #endif // __CUDACC__
1596
+
1597
+ /**
1598
+ * \brief Returns occupancy for a device function
1599
+ *
1600
+ * Returns in \p *numBlocks the maximum number of active blocks per
1601
+ * streaming multiprocessor for the device function.
1602
+ *
1603
+ * \param numBlocks - Returned occupancy
1604
+ * \param func - Kernel function for which occupancy is calulated
1605
+ * \param blockSize - Block size the kernel is intended to be launched with
1606
+ * \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes
1607
+ *
1608
+ * \return
1609
+ * ::cudaSuccess,
1610
+ * ::cudaErrorInvalidDevice,
1611
+ * ::cudaErrorInvalidDeviceFunction,
1612
+ * ::cudaErrorInvalidValue,
1613
+ * ::cudaErrorUnknown,
1614
+ * \notefnerr
1615
+ * \note_init_rt
1616
+ * \note_callback
1617
+ *
1618
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
1619
+ * \sa ::cudaOccupancyMaxPotentialBlockSize
1620
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags
1621
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem
1622
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags
1623
+ * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock
1624
+ */
1625
+ template<class T>
1626
+ static __inline__ __host__ cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(
1627
+ int *numBlocks,
1628
+ T func,
1629
+ int blockSize,
1630
+ size_t dynamicSMemSize)
1631
+ {
1632
+ return ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, (const void*)func, blockSize, dynamicSMemSize, cudaOccupancyDefault);
1633
+ }
1634
+
1635
+ /**
1636
+ * \brief Returns occupancy for a device function with the specified flags
1637
+ *
1638
+ * Returns in \p *numBlocks the maximum number of active blocks per
1639
+ * streaming multiprocessor for the device function.
1640
+ *
1641
+ * The \p flags parameter controls how special cases are handled. Valid flags include:
1642
+ *
1643
+ * - ::cudaOccupancyDefault: keeps the default behavior as
1644
+ * ::cudaOccupancyMaxActiveBlocksPerMultiprocessor
1645
+ *
1646
+ * - ::cudaOccupancyDisableCachingOverride: suppresses the default behavior
1647
+ * on platform where global caching affects occupancy. On such platforms, if caching
1648
+ * is enabled, but per-block SM resource usage would result in zero occupancy, the
1649
+ * occupancy calculator will calculate the occupancy as if caching is disabled.
1650
+ * Setting this flag makes the occupancy calculator to return 0 in such cases.
1651
+ * More information can be found about this feature in the "Unified L1/Texture Cache"
1652
+ * section of the Maxwell tuning guide.
1653
+ *
1654
+ * \param numBlocks - Returned occupancy
1655
+ * \param func - Kernel function for which occupancy is calulated
1656
+ * \param blockSize - Block size the kernel is intended to be launched with
1657
+ * \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes
1658
+ * \param flags - Requested behavior for the occupancy calculator
1659
+ *
1660
+ * \return
1661
+ * ::cudaSuccess,
1662
+ * ::cudaErrorInvalidDevice,
1663
+ * ::cudaErrorInvalidDeviceFunction,
1664
+ * ::cudaErrorInvalidValue,
1665
+ * ::cudaErrorUnknown,
1666
+ * \notefnerr
1667
+ * \note_init_rt
1668
+ * \note_callback
1669
+ *
1670
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor
1671
+ * \sa ::cudaOccupancyMaxPotentialBlockSize
1672
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags
1673
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem
1674
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags
1675
+ * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock
1676
+ */
1677
+ template<class T>
1678
+ static __inline__ __host__ cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
1679
+ int *numBlocks,
1680
+ T func,
1681
+ int blockSize,
1682
+ size_t dynamicSMemSize,
1683
+ unsigned int flags)
1684
+ {
1685
+ return ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, (const void*)func, blockSize, dynamicSMemSize, flags);
1686
+ }
1687
+
1688
+ /**
1689
+ * Helper functor for cudaOccupancyMaxPotentialBlockSize
1690
+ */
1691
+ class __cudaOccupancyB2DHelper {
1692
+ size_t n;
1693
+ public:
1694
+ inline __host__ CUDART_DEVICE __cudaOccupancyB2DHelper(size_t n_) : n(n_) {}
1695
+ inline __host__ CUDART_DEVICE size_t operator()(int)
1696
+ {
1697
+ return n;
1698
+ }
1699
+ };
1700
+
1701
+ /**
1702
+ * \brief Returns grid and block size that achieves maximum potential occupancy for a device function
1703
+ *
1704
+ * Returns in \p *minGridSize and \p *blocksize a suggested grid /
1705
+ * block size pair that achieves the best potential occupancy
1706
+ * (i.e. the maximum number of active warps with the smallest number
1707
+ * of blocks).
1708
+ *
1709
+ * The \p flags parameter controls how special cases are handled. Valid flags include:
1710
+ *
1711
+ * - ::cudaOccupancyDefault: keeps the default behavior as
1712
+ * ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags
1713
+ *
1714
+ * - ::cudaOccupancyDisableCachingOverride: This flag suppresses the default behavior
1715
+ * on platform where global caching affects occupancy. On such platforms, if caching
1716
+ * is enabled, but per-block SM resource usage would result in zero occupancy, the
1717
+ * occupancy calculator will calculate the occupancy as if caching is disabled.
1718
+ * Setting this flag makes the occupancy calculator to return 0 in such cases.
1719
+ * More information can be found about this feature in the "Unified L1/Texture Cache"
1720
+ * section of the Maxwell tuning guide.
1721
+ *
1722
+ * \param minGridSize - Returned minimum grid size needed to achieve the best potential occupancy
1723
+ * \param blockSize - Returned block size
1724
+ * \param func - Device function symbol
1725
+ * \param blockSizeToDynamicSMemSize - A unary function / functor that takes block size, and returns the size, in bytes, of dynamic shared memory needed for a block
1726
+ * \param blockSizeLimit - The maximum block size \p func is designed to work with. 0 means no limit.
1727
+ * \param flags - Requested behavior for the occupancy calculator
1728
+ *
1729
+ * \return
1730
+ * ::cudaSuccess,
1731
+ * ::cudaErrorInvalidDevice,
1732
+ * ::cudaErrorInvalidDeviceFunction,
1733
+ * ::cudaErrorInvalidValue,
1734
+ * ::cudaErrorUnknown,
1735
+ * \notefnerr
1736
+ * \note_init_rt
1737
+ * \note_callback
1738
+ *
1739
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem
1740
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor
1741
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
1742
+ * \sa ::cudaOccupancyMaxPotentialBlockSize
1743
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags
1744
+ * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock
1745
+ */
1746
+
1747
+ template<typename UnaryFunction, class T>
1748
+ static __inline__ __host__ CUDART_DEVICE cudaError_t cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(
1749
+ int *minGridSize,
1750
+ int *blockSize,
1751
+ T func,
1752
+ UnaryFunction blockSizeToDynamicSMemSize,
1753
+ int blockSizeLimit = 0,
1754
+ unsigned int flags = 0)
1755
+ {
1756
+ cudaError_t status;
1757
+
1758
+ // Device and function properties
1759
+ int device;
1760
+ struct cudaFuncAttributes attr;
1761
+
1762
+ // Limits
1763
+ int maxThreadsPerMultiProcessor;
1764
+ int warpSize;
1765
+ int devMaxThreadsPerBlock;
1766
+ int multiProcessorCount;
1767
+ int funcMaxThreadsPerBlock;
1768
+ int occupancyLimit;
1769
+ int granularity;
1770
+
1771
+ // Recorded maximum
1772
+ int maxBlockSize = 0;
1773
+ int numBlocks = 0;
1774
+ int maxOccupancy = 0;
1775
+
1776
+ // Temporary
1777
+ int blockSizeToTryAligned;
1778
+ int blockSizeToTry;
1779
+ int blockSizeLimitAligned;
1780
+ int occupancyInBlocks;
1781
+ int occupancyInThreads;
1782
+ size_t dynamicSMemSize;
1783
+
1784
+ ///////////////////////////
1785
+ // Check user input
1786
+ ///////////////////////////
1787
+
1788
+ if (!minGridSize || !blockSize || !func) {
1789
+ return cudaErrorInvalidValue;
1790
+ }
1791
+
1792
+ //////////////////////////////////////////////
1793
+ // Obtain device and function properties
1794
+ //////////////////////////////////////////////
1795
+
1796
+ status = ::cudaGetDevice(&device);
1797
+ if (status != cudaSuccess) {
1798
+ return status;
1799
+ }
1800
+
1801
+ status = cudaDeviceGetAttribute(
1802
+ &maxThreadsPerMultiProcessor,
1803
+ cudaDevAttrMaxThreadsPerMultiProcessor,
1804
+ device);
1805
+ if (status != cudaSuccess) {
1806
+ return status;
1807
+ }
1808
+
1809
+ status = cudaDeviceGetAttribute(
1810
+ &warpSize,
1811
+ cudaDevAttrWarpSize,
1812
+ device);
1813
+ if (status != cudaSuccess) {
1814
+ return status;
1815
+ }
1816
+
1817
+ status = cudaDeviceGetAttribute(
1818
+ &devMaxThreadsPerBlock,
1819
+ cudaDevAttrMaxThreadsPerBlock,
1820
+ device);
1821
+ if (status != cudaSuccess) {
1822
+ return status;
1823
+ }
1824
+
1825
+ status = cudaDeviceGetAttribute(
1826
+ &multiProcessorCount,
1827
+ cudaDevAttrMultiProcessorCount,
1828
+ device);
1829
+ if (status != cudaSuccess) {
1830
+ return status;
1831
+ }
1832
+
1833
+ status = cudaFuncGetAttributes(&attr, func);
1834
+ if (status != cudaSuccess) {
1835
+ return status;
1836
+ }
1837
+
1838
+ funcMaxThreadsPerBlock = attr.maxThreadsPerBlock;
1839
+
1840
+ /////////////////////////////////////////////////////////////////////////////////
1841
+ // Try each block size, and pick the block size with maximum occupancy
1842
+ /////////////////////////////////////////////////////////////////////////////////
1843
+
1844
+ occupancyLimit = maxThreadsPerMultiProcessor;
1845
+ granularity = warpSize;
1846
+
1847
+ if (blockSizeLimit == 0) {
1848
+ blockSizeLimit = devMaxThreadsPerBlock;
1849
+ }
1850
+
1851
+ if (devMaxThreadsPerBlock < blockSizeLimit) {
1852
+ blockSizeLimit = devMaxThreadsPerBlock;
1853
+ }
1854
+
1855
+ if (funcMaxThreadsPerBlock < blockSizeLimit) {
1856
+ blockSizeLimit = funcMaxThreadsPerBlock;
1857
+ }
1858
+
1859
+ blockSizeLimitAligned = ((blockSizeLimit + (granularity - 1)) / granularity) * granularity;
1860
+
1861
+ for (blockSizeToTryAligned = blockSizeLimitAligned; blockSizeToTryAligned > 0; blockSizeToTryAligned -= granularity) {
1862
+ // This is needed for the first iteration, because
1863
+ // blockSizeLimitAligned could be greater than blockSizeLimit
1864
+ //
1865
+ if (blockSizeLimit < blockSizeToTryAligned) {
1866
+ blockSizeToTry = blockSizeLimit;
1867
+ } else {
1868
+ blockSizeToTry = blockSizeToTryAligned;
1869
+ }
1870
+
1871
+ dynamicSMemSize = blockSizeToDynamicSMemSize(blockSizeToTry);
1872
+
1873
+ status = cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
1874
+ &occupancyInBlocks,
1875
+ func,
1876
+ blockSizeToTry,
1877
+ dynamicSMemSize,
1878
+ flags);
1879
+
1880
+ if (status != cudaSuccess) {
1881
+ return status;
1882
+ }
1883
+
1884
+ occupancyInThreads = blockSizeToTry * occupancyInBlocks;
1885
+
1886
+ if (occupancyInThreads > maxOccupancy) {
1887
+ maxBlockSize = blockSizeToTry;
1888
+ numBlocks = occupancyInBlocks;
1889
+ maxOccupancy = occupancyInThreads;
1890
+ }
1891
+
1892
+ // Early out if we have reached the maximum
1893
+ //
1894
+ if (occupancyLimit == maxOccupancy) {
1895
+ break;
1896
+ }
1897
+ }
1898
+
1899
+ ///////////////////////////
1900
+ // Return best available
1901
+ ///////////////////////////
1902
+
1903
+ // Suggested min grid size to achieve a full machine launch
1904
+ //
1905
+ *minGridSize = numBlocks * multiProcessorCount;
1906
+ *blockSize = maxBlockSize;
1907
+
1908
+ return status;
1909
+ }
1910
+
1911
+ /**
1912
+ * \brief Returns grid and block size that achieves maximum potential occupancy for a device function
1913
+ *
1914
+ * Returns in \p *minGridSize and \p *blocksize a suggested grid /
1915
+ * block size pair that achieves the best potential occupancy
1916
+ * (i.e. the maximum number of active warps with the smallest number
1917
+ * of blocks).
1918
+ *
1919
+ * \param minGridSize - Returned minimum grid size needed to achieve the best potential occupancy
1920
+ * \param blockSize - Returned block size
1921
+ * \param func - Device function symbol
1922
+ * \param blockSizeToDynamicSMemSize - A unary function / functor that takes block size, and returns the size, in bytes, of dynamic shared memory needed for a block
1923
+ * \param blockSizeLimit - The maximum block size \p func is designed to work with. 0 means no limit.
1924
+ *
1925
+ * \return
1926
+ * ::cudaSuccess,
1927
+ * ::cudaErrorInvalidDevice,
1928
+ * ::cudaErrorInvalidDeviceFunction,
1929
+ * ::cudaErrorInvalidValue,
1930
+ * ::cudaErrorUnknown,
1931
+ * \notefnerr
1932
+ * \note_init_rt
1933
+ * \note_callback
1934
+ *
1935
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags
1936
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor
1937
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
1938
+ * \sa ::cudaOccupancyMaxPotentialBlockSize
1939
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags
1940
+ * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock
1941
+ */
1942
+
1943
+ template<typename UnaryFunction, class T>
1944
+ static __inline__ __host__ CUDART_DEVICE cudaError_t cudaOccupancyMaxPotentialBlockSizeVariableSMem(
1945
+ int *minGridSize,
1946
+ int *blockSize,
1947
+ T func,
1948
+ UnaryFunction blockSizeToDynamicSMemSize,
1949
+ int blockSizeLimit = 0)
1950
+ {
1951
+ return cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, blockSizeLimit, cudaOccupancyDefault);
1952
+ }
1953
+
1954
+ /**
1955
+ * \brief Returns grid and block size that achieves maximum potential occupancy for a device function
1956
+ *
1957
+ * Returns in \p *minGridSize and \p *blocksize a suggested grid /
1958
+ * block size pair that achieves the best potential occupancy
1959
+ * (i.e. the maximum number of active warps with the smallest number
1960
+ * of blocks).
1961
+ *
1962
+ * Use \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem if the
1963
+ * amount of per-block dynamic shared memory changes with different
1964
+ * block sizes.
1965
+ *
1966
+ * \param minGridSize - Returned minimum grid size needed to achieve the best potential occupancy
1967
+ * \param blockSize - Returned block size
1968
+ * \param func - Device function symbol
1969
+ * \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes
1970
+ * \param blockSizeLimit - The maximum block size \p func is designed to work with. 0 means no limit.
1971
+ *
1972
+ * \return
1973
+ * ::cudaSuccess,
1974
+ * ::cudaErrorInvalidDevice,
1975
+ * ::cudaErrorInvalidDeviceFunction,
1976
+ * ::cudaErrorInvalidValue,
1977
+ * ::cudaErrorUnknown,
1978
+ * \notefnerr
1979
+ * \note_init_rt
1980
+ * \note_callback
1981
+ *
1982
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags
1983
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor
1984
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
1985
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem
1986
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags
1987
+ * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock
1988
+ */
1989
+ template<class T>
1990
+ static __inline__ __host__ CUDART_DEVICE cudaError_t cudaOccupancyMaxPotentialBlockSize(
1991
+ int *minGridSize,
1992
+ int *blockSize,
1993
+ T func,
1994
+ size_t dynamicSMemSize = 0,
1995
+ int blockSizeLimit = 0)
1996
+ {
1997
+ return cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(minGridSize, blockSize, func, __cudaOccupancyB2DHelper(dynamicSMemSize), blockSizeLimit, cudaOccupancyDefault);
1998
+ }
1999
+
2000
+ /**
2001
+ * \brief Returns dynamic shared memory available per block when launching \p numBlocks blocks on SM.
2002
+ *
2003
+ * Returns in \p *dynamicSmemSize the maximum size of dynamic shared memory to allow \p numBlocks blocks per SM.
2004
+ *
2005
+ * \param dynamicSmemSize - Returned maximum dynamic shared memory
2006
+ * \param func - Kernel function for which occupancy is calculated
2007
+ * \param numBlocks - Number of blocks to fit on SM
2008
+ * \param blockSize - Size of the block
2009
+ *
2010
+ * \return
2011
+ * ::cudaSuccess,
2012
+ * ::cudaErrorInvalidDevice,
2013
+ * ::cudaErrorInvalidDeviceFunction,
2014
+ * ::cudaErrorInvalidValue,
2015
+ * ::cudaErrorUnknown,
2016
+ * \notefnerr
2017
+ * \note_init_rt
2018
+ * \note_callback
2019
+ *
2020
+ * \sa ::cudaOccupancyMaxPotentialBlockSize
2021
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags
2022
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor
2023
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
2024
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem
2025
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags
2026
+ */
2027
+ template<class T>
2028
+ static __inline__ __host__ cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(
2029
+ size_t *dynamicSmemSize,
2030
+ T func,
2031
+ int numBlocks,
2032
+ int blockSize)
2033
+ {
2034
+ return ::cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, (const void*)func, numBlocks, blockSize);
2035
+ }
2036
+
2037
+ /**
2038
+ * \brief Returns grid and block size that achived maximum potential occupancy for a device function with the specified flags
2039
+ *
2040
+ * Returns in \p *minGridSize and \p *blocksize a suggested grid /
2041
+ * block size pair that achieves the best potential occupancy
2042
+ * (i.e. the maximum number of active warps with the smallest number
2043
+ * of blocks).
2044
+ *
2045
+ * The \p flags parameter controls how special cases are handle. Valid flags include:
2046
+ *
2047
+ * - ::cudaOccupancyDefault: keeps the default behavior as
2048
+ * ::cudaOccupancyMaxPotentialBlockSize
2049
+ *
2050
+ * - ::cudaOccupancyDisableCachingOverride: This flag suppresses the default behavior
2051
+ * on platform where global caching affects occupancy. On such platforms, if caching
2052
+ * is enabled, but per-block SM resource usage would result in zero occupancy, the
2053
+ * occupancy calculator will calculate the occupancy as if caching is disabled.
2054
+ * Setting this flag makes the occupancy calculator to return 0 in such cases.
2055
+ * More information can be found about this feature in the "Unified L1/Texture Cache"
2056
+ * section of the Maxwell tuning guide.
2057
+ *
2058
+ * Use \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem if the
2059
+ * amount of per-block dynamic shared memory changes with different
2060
+ * block sizes.
2061
+ *
2062
+ * \param minGridSize - Returned minimum grid size needed to achieve the best potential occupancy
2063
+ * \param blockSize - Returned block size
2064
+ * \param func - Device function symbol
2065
+ * \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes
2066
+ * \param blockSizeLimit - The maximum block size \p func is designed to work with. 0 means no limit.
2067
+ * \param flags - Requested behavior for the occupancy calculator
2068
+ *
2069
+ * \return
2070
+ * ::cudaSuccess,
2071
+ * ::cudaErrorInvalidDevice,
2072
+ * ::cudaErrorInvalidDeviceFunction,
2073
+ * ::cudaErrorInvalidValue,
2074
+ * ::cudaErrorUnknown,
2075
+ * \notefnerr
2076
+ * \note_init_rt
2077
+ * \note_callback
2078
+ *
2079
+ * \sa ::cudaOccupancyMaxPotentialBlockSize
2080
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor
2081
+ * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
2082
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem
2083
+ * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags
2084
+ * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock
2085
+ */
2086
+ template<class T>
2087
+ static __inline__ __host__ CUDART_DEVICE cudaError_t cudaOccupancyMaxPotentialBlockSizeWithFlags(
2088
+ int *minGridSize,
2089
+ int *blockSize,
2090
+ T func,
2091
+ size_t dynamicSMemSize = 0,
2092
+ int blockSizeLimit = 0,
2093
+ unsigned int flags = 0)
2094
+ {
2095
+ return cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(minGridSize, blockSize, func, __cudaOccupancyB2DHelper(dynamicSMemSize), blockSizeLimit, flags);
2096
+ }
2097
+
2098
+ /**
2099
+ * \brief Given the kernel function (\p func) and launch configuration
2100
+ * (\p config), return the maximum cluster size in \p *clusterSize.
2101
+ *
2102
+ * The cluster dimensions in \p config are ignored. If func has a required
2103
+ * cluster size set (see ::cudaFuncGetAttributes),\p *clusterSize will reflect
2104
+ * the required cluster size.
2105
+ *
2106
+ * By default this function will always return a value that's portable on
2107
+ * future hardware. A higher value may be returned if the kernel function
2108
+ * allows non-portable cluster sizes.
2109
+ *
2110
+ * This function will respect the compile time launch bounds.
2111
+ *
2112
+ * \param clusterSize - Returned maximum cluster size that can be launched
2113
+ * for the given kernel function and launch configuration
2114
+ * \param func - Kernel function for which maximum cluster
2115
+ * size is calculated
2116
+ * \param config - Launch configuration for the given kernel function
2117
+ *
2118
+ * \return
2119
+ * ::cudaSuccess,
2120
+ * ::cudaErrorInvalidDeviceFunction,
2121
+ * ::cudaErrorInvalidValue,
2122
+ * ::cudaErrorUnknown,
2123
+ * \notefnerr
2124
+ * \note_init_rt
2125
+ * \note_callback
2126
+ *
2127
+ * \sa
2128
+ * ::cudaFuncGetAttributes
2129
+ */
2130
+ template<class T>
2131
+ static __inline__ __host__ cudaError_t cudaOccupancyMaxPotentialClusterSize(
2132
+ int *clusterSize,
2133
+ T *func,
2134
+ const cudaLaunchConfig_t *config)
2135
+ {
2136
+ return ::cudaOccupancyMaxPotentialClusterSize(clusterSize, (const void*)func, config);
2137
+ }
2138
+
2139
+ /**
2140
+ * \brief Given the kernel function (\p func) and launch configuration
2141
+ * (\p config), return the maximum number of clusters that could co-exist
2142
+ * on the target device in \p *numClusters.
2143
+ *
2144
+ * If the function has required cluster size already set (see
2145
+ * ::cudaFuncGetAttributes), the cluster size from config must either be
2146
+ * unspecified or match the required size.
2147
+ * Without required sizes, the cluster size must be specified in config,
2148
+ * else the function will return an error.
2149
+ *
2150
+ * Note that various attributes of the kernel function may affect occupancy
2151
+ * calculation. Runtime environment may affect how the hardware schedules
2152
+ * the clusters, so the calculated occupancy is not guaranteed to be achievable.
2153
+ *
2154
+ * \param numClusters - Returned maximum number of clusters that
2155
+ * could co-exist on the target device
2156
+ * \param func - Kernel function for which maximum number
2157
+ * of clusters are calculated
2158
+ * \param config - Launch configuration for the given kernel function
2159
+ *
2160
+ * \return
2161
+ * ::cudaSuccess,
2162
+ * ::cudaErrorInvalidDeviceFunction,
2163
+ * ::cudaErrorInvalidValue,
2164
+ * ::cudaErrorInvalidClusterSize,
2165
+ * ::cudaErrorUnknown,
2166
+ * \notefnerr
2167
+ * \note_init_rt
2168
+ * \note_callback
2169
+ *
2170
+ * \sa
2171
+ * ::cudaFuncGetAttributes
2172
+ */
2173
+ template<class T>
2174
+ static __inline__ __host__ cudaError_t cudaOccupancyMaxActiveClusters(
2175
+ int *numClusters,
2176
+ T *func,
2177
+ const cudaLaunchConfig_t *config)
2178
+ {
2179
+ return ::cudaOccupancyMaxActiveClusters(numClusters, (const void*)func, config);
2180
+ }
2181
+
2182
+ #if defined __CUDACC__
2183
+
2184
+ /**
2185
+ * \brief \hl Find out attributes for a given function
2186
+ *
2187
+ * This function obtains the attributes of a function specified via \p entry.
2188
+ * The parameter \p entry must be a pointer to a function that executes
2189
+ * on the device. The parameter specified by \p entry must be declared as a \p __global__
2190
+ * function. The fetched attributes are placed in \p attr. If the specified
2191
+ * function does not exist, then ::cudaErrorInvalidDeviceFunction is returned.
2192
+ *
2193
+ * Note that some function attributes such as
2194
+ * \ref ::cudaFuncAttributes::maxThreadsPerBlock "maxThreadsPerBlock"
2195
+ * may vary based on the device that is currently being used.
2196
+ *
2197
+ * \param attr - Return pointer to function's attributes
2198
+ * \param entry - Function to get attributes of
2199
+ *
2200
+ * \return
2201
+ * ::cudaSuccess,
2202
+ * ::cudaErrorInvalidDeviceFunction
2203
+ * \notefnerr
2204
+ * \note_init_rt
2205
+ * \note_callback
2206
+ *
2207
+ * \ref ::cudaLaunchKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C++ API)",
2208
+ * \ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C++ API)",
2209
+ * \ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) "cudaFuncGetAttributes (C API)",
2210
+ * ::cudaSetDoubleForDevice,
2211
+ * ::cudaSetDoubleForHost
2212
+ */
2213
+ template<class T>
2214
+ static __inline__ __host__ cudaError_t cudaFuncGetAttributes(
2215
+ struct cudaFuncAttributes *attr,
2216
+ T *entry
2217
+ )
2218
+ {
2219
+ return ::cudaFuncGetAttributes(attr, (const void*)entry);
2220
+ }
2221
+
2222
+ /**
2223
+ * \brief \hl Set attributes for a given function
2224
+ *
2225
+ * This function sets the attributes of a function specified via \p entry.
2226
+ * The parameter \p entry must be a pointer to a function that executes
2227
+ * on the device. The parameter specified by \p entry must be declared as a \p __global__
2228
+ * function. The enumeration defined by \p attr is set to the value defined by \p value.
2229
+ * If the specified function does not exist, then ::cudaErrorInvalidDeviceFunction is returned.
2230
+ * If the specified attribute cannot be written, or if the value is incorrect,
2231
+ * then ::cudaErrorInvalidValue is returned.
2232
+ *
2233
+ * Valid values for \p attr are:
2234
+ * - ::cudaFuncAttributeMaxDynamicSharedMemorySize - The requested maximum size in bytes of dynamically-allocated shared memory. The sum of this value and the function attribute ::sharedSizeBytes
2235
+ * cannot exceed the device attribute ::cudaDevAttrMaxSharedMemoryPerBlockOptin. The maximal size of requestable dynamic shared memory may differ by GPU architecture.
2236
+ * - ::cudaFuncAttributePreferredSharedMemoryCarveout - On devices where the L1 cache and shared memory use the same hardware resources,
2237
+ * this sets the shared memory carveout preference, in percent of the total shared memory. See ::cudaDevAttrMaxSharedMemoryPerMultiprocessor.
2238
+ * This is only a hint, and the driver can choose a different ratio if required to execute the function.
2239
+ * - ::cudaFuncAttributeRequiredClusterWidth: The required cluster width in
2240
+ * blocks. The width, height, and depth values must either all be 0 or all be
2241
+ * positive. The validity of the cluster dimensions is checked at launch time.
2242
+ * If the value is set during compile time, it cannot be set at runtime.
2243
+ * Setting it at runtime will return cudaErrorNotPermitted.
2244
+ * - ::cudaFuncAttributeRequiredClusterHeight: The required cluster height in
2245
+ * blocks. The width, height, and depth values must either all be 0 or all be
2246
+ * positive. The validity of the cluster dimensions is checked at launch time.
2247
+ * If the value is set during compile time, it cannot be set at runtime.
2248
+ * Setting it at runtime will return cudaErrorNotPermitted.
2249
+ * - ::cudaFuncAttributeRequiredClusterDepth: The required cluster depth in
2250
+ * blocks. The width, height, and depth values must either all be 0 or all be
2251
+ * positive. The validity of the cluster dimensions is checked at launch time.
2252
+ * If the value is set during compile time, it cannot be set at runtime.
2253
+ * Setting it at runtime will return cudaErrorNotPermitted.
2254
+ * - ::cudaFuncAttributeClusterSchedulingPolicyPreference: The block
2255
+ * scheduling policy of a function. The value type is cudaClusterSchedulingPolicy.
2256
+ *
2257
+ * \param entry - Function to get attributes of
2258
+ * \param attr - Attribute to set
2259
+ * \param value - Value to set
2260
+ *
2261
+ * \return
2262
+ * ::cudaSuccess,
2263
+ * ::cudaErrorInvalidDeviceFunction,
2264
+ * ::cudaErrorInvalidValue
2265
+ * \notefnerr
2266
+ * \note_init_rt
2267
+ * \note_callback
2268
+ *
2269
+ * \ref ::cudaLaunchKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C++ API)",
2270
+ * \ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C++ API)",
2271
+ * \ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) "cudaFuncGetAttributes (C API)",
2272
+ * ::cudaSetDoubleForDevice,
2273
+ * ::cudaSetDoubleForHost
2274
+ */
2275
+ template<class T>
2276
+ static __inline__ __host__ cudaError_t cudaFuncSetAttribute(
2277
+ T *entry,
2278
+ enum cudaFuncAttribute attr,
2279
+ int value
2280
+ )
2281
+ {
2282
+ return ::cudaFuncSetAttribute((const void*)entry, attr, value);
2283
+ }
2284
+
2285
+ /**
2286
+ * \brief Returns the function name for a device entry function pointer.
2287
+ *
2288
+ * Returns in \p **name the function name associated with the symbol \p func .
2289
+ * The function name is returned as a null-terminated string. This API may
2290
+ * return a mangled name if the function is not declared as having C linkage.
2291
+ * If \p **name is NULL, ::cudaErrorInvalidValue is returned. If \p func is
2292
+ * not a device entry function, ::cudaErrorInvalidDeviceFunction is returned.
2293
+ *
2294
+ * \param name - The returned name of the function
2295
+ * \param func - The function pointer to retrieve name for
2296
+ *
2297
+ * \return
2298
+ * ::cudaSuccess,
2299
+ * ::cudaErrorInvalidValue,
2300
+ * ::cudaErrorInvalidDeviceFunction
2301
+ * \notefnerr
2302
+ * \note_init_rt
2303
+ * \note_callback
2304
+ *
2305
+ * \ref ::cudaFuncGetName(const char **name, const void *func) "cudaFuncGetName (C API)"
2306
+ */
2307
+ template<class T>
2308
+ static __inline__ __host__ cudaError_t CUDARTAPI cudaFuncGetName(
2309
+ const char **name,
2310
+ const T *func
2311
+ )
2312
+ {
2313
+ return ::cudaFuncGetName(name, (const void *)func);
2314
+ }
2315
+
2316
+ /**
2317
+ * \brief Get pointer to device kernel that matches entry function \p entryFuncAddr
2318
+ *
2319
+ * Returns in \p kernelPtr the device kernel corresponding to the entry function \p entryFuncAddr.
2320
+ *
2321
+ * \param kernelPtr - Returns the device kernel
2322
+ * \param entryFuncAddr - Address of device entry function to search kernel for
2323
+ *
2324
+ * \return
2325
+ * ::cudaSuccess
2326
+ *
2327
+ * \sa
2328
+ * \ref ::cudaGetKernel(cudaKernel_t *kernelPtr, const void *entryFuncAddr) "cudaGetKernel (C API)"
2329
+ */
2330
+ template<class T>
2331
+ static __inline__ __host__ cudaError_t cudaGetKernel(
2332
+ cudaKernel_t *kernelPtr,
2333
+ const T *entryFuncAddr
2334
+ )
2335
+ {
2336
+ return ::cudaGetKernel(kernelPtr, (const void *)entryFuncAddr);
2337
+ }
2338
+
2339
+ #endif /* __CUDACC__ */
2340
+
2341
+ /** @} */ /* END CUDART_HIGHLEVEL */
2342
+
2343
+ #endif /* __cplusplus && !__CUDACC_RTC__ */
2344
+
2345
+ #if !defined(__CUDACC_RTC__)
2346
+ #if defined(__GNUC__)
2347
+ #if defined(__clang__) || (!defined(__PGIC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
2348
+ #pragma GCC diagnostic pop
2349
+ #endif
2350
+ #elif defined(_MSC_VER)
2351
+ #pragma warning(pop)
2352
+ #endif
2353
+ #endif
2354
+
2355
+ #undef EXCLUDE_FROM_RTC
2356
+ #undef __CUDA_DEPRECATED
2357
+
2358
+ #if defined(__UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_CUDA_RUNTIME_H__)
2359
+ #undef __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__
2360
+ #undef __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_CUDA_RUNTIME_H__
2361
+ #endif
2362
+
2363
+ #endif /* !__CUDA_RUNTIME_H__ */
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cupti_driver_cbid.h ADDED
@@ -0,0 +1,746 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_cuGraphAddNode = 712,
723
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeSetParams = 713,
724
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecNodeSetParams = 714,
725
+ CUPTI_DRIVER_TRACE_CBID_cuMemAdvise_v2 = 715,
726
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync_v2 = 716,
727
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync_v2_ptsz = 717,
728
+ CUPTI_DRIVER_TRACE_CBID_cuFuncGetName = 718,
729
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetName = 719,
730
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCaptureToGraph = 720,
731
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCaptureToGraph_ptsz = 721,
732
+ CUPTI_DRIVER_TRACE_CBID_cuGraphConditionalHandleCreate = 722,
733
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddNode_v2 = 723,
734
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetEdges_v2 = 724,
735
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependencies_v2 = 725,
736
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependentNodes_v2 = 726,
737
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddDependencies_v2 = 727,
738
+ CUPTI_DRIVER_TRACE_CBID_cuGraphRemoveDependencies_v2 = 728,
739
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v3 = 729,
740
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v3_ptsz = 730,
741
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies_v2 = 731,
742
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies_v2_ptsz = 732,
743
+ CUPTI_DRIVER_TRACE_CBID_SIZE = 733,
744
+ CUPTI_DRIVER_TRACE_CBID_FORCE_INT = 0x7fffffff
745
+ } CUpti_driver_api_trace_cbid;
746
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cupti_events.h ADDED
@@ -0,0 +1,1350 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Get the number of domains for a device.
594
+ *
595
+ * Returns the number of domains in \p numDomains for a device.
596
+ * \note \b Thread-safety: this function is thread safe.
597
+ *
598
+ * \param device The CUDA device
599
+ * \param numDomains Returns the number of domains
600
+ *
601
+ * \retval CUPTI_SUCCESS
602
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
603
+ * \retval CUPTI_ERROR_INVALID_DEVICE
604
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numDomains is NULL
605
+ */
606
+ CUptiResult CUPTIAPI cuptiDeviceGetNumEventDomains(CUdevice device,
607
+ uint32_t *numDomains);
608
+
609
+ /**
610
+ * \brief Get the event domains for a device.
611
+ *
612
+ * Returns the event domains IDs in \p domainArray for a device. The
613
+ * size of the \p domainArray buffer is given by \p
614
+ * *arraySizeBytes. The size of the \p domainArray buffer must be at
615
+ * least \p numdomains * sizeof(CUpti_EventDomainID) or else all
616
+ * domains will not be returned. The value returned in \p
617
+ * *arraySizeBytes contains the number of bytes returned in \p
618
+ * domainArray.
619
+ * \note \b Thread-safety: this function is thread safe.
620
+ *
621
+ * \param device The CUDA device
622
+ * \param arraySizeBytes The size of \p domainArray in bytes, and
623
+ * returns the number of bytes written to \p domainArray
624
+ * \param domainArray Returns the IDs of the event domains for the device
625
+ *
626
+ * \retval CUPTI_SUCCESS
627
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
628
+ * \retval CUPTI_ERROR_INVALID_DEVICE
629
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
630
+ * \p domainArray are NULL
631
+ */
632
+ CUptiResult CUPTIAPI cuptiDeviceEnumEventDomains(CUdevice device,
633
+ size_t *arraySizeBytes,
634
+ CUpti_EventDomainID *domainArray);
635
+
636
+ /**
637
+ * \brief Read an event domain attribute.
638
+ *
639
+ * Returns an event domain attribute in \p *value. The size of the \p
640
+ * value buffer is given by \p *valueSize. The value returned in \p
641
+ * *valueSize contains the number of bytes returned in \p value.
642
+ *
643
+ * If the attribute value is a c-string that is longer than \p
644
+ * *valueSize, then only the first \p *valueSize characters will be
645
+ * returned and there will be no terminating null byte.
646
+ * \note \b Thread-safety: this function is thread safe.
647
+ *
648
+ * \param device The CUDA device
649
+ * \param eventDomain ID of the event domain
650
+ * \param attrib The event domain attribute to read
651
+ * \param valueSize The size of the \p value buffer in bytes, and
652
+ * returns the number of bytes written to \p value
653
+ * \param value Returns the attribute's value
654
+ *
655
+ * \retval CUPTI_SUCCESS
656
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
657
+ * \retval CUPTI_ERROR_INVALID_DEVICE
658
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
659
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
660
+ * is NULL, or if \p attrib is not an event domain attribute
661
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
662
+ * attribute values, indicates that the \p value buffer is too small
663
+ * to hold the attribute value.
664
+ */
665
+ CUptiResult CUPTIAPI cuptiDeviceGetEventDomainAttribute(CUdevice device,
666
+ CUpti_EventDomainID eventDomain,
667
+ CUpti_EventDomainAttribute attrib,
668
+ size_t *valueSize,
669
+ void *value);
670
+
671
+ /**
672
+ * \brief Get the number of event domains available on any device.
673
+ *
674
+ * Returns the total number of event domains available on any
675
+ * CUDA-capable device.
676
+ * \note \b Thread-safety: this function is thread safe.
677
+ *
678
+ * \param numDomains Returns the number of domains
679
+ *
680
+ * \retval CUPTI_SUCCESS
681
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numDomains is NULL
682
+ */
683
+ CUptiResult CUPTIAPI cuptiGetNumEventDomains(uint32_t *numDomains);
684
+
685
+ /**
686
+ * \brief Get the event domains available on any device.
687
+ *
688
+ * Returns all the event domains available on any CUDA-capable device.
689
+ * Event domain IDs are returned in \p domainArray. The size of the \p
690
+ * domainArray buffer is given by \p *arraySizeBytes. The size of the
691
+ * \p domainArray buffer must be at least \p numDomains *
692
+ * sizeof(CUpti_EventDomainID) or all domains will not be
693
+ * returned. The value returned in \p *arraySizeBytes contains the
694
+ * number of bytes returned in \p domainArray.
695
+ * \note \b Thread-safety: this function is thread safe.
696
+ *
697
+ * \param arraySizeBytes The size of \p domainArray in bytes, and
698
+ * returns the number of bytes written to \p domainArray
699
+ * \param domainArray Returns all the event domains
700
+ *
701
+ * \retval CUPTI_SUCCESS
702
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
703
+ * \p domainArray are NULL
704
+ */
705
+ CUptiResult CUPTIAPI cuptiEnumEventDomains(size_t *arraySizeBytes,
706
+ CUpti_EventDomainID *domainArray);
707
+
708
+ /**
709
+ * \brief Read an event domain attribute.
710
+ *
711
+ * Returns an event domain attribute in \p *value. The size of the \p
712
+ * value buffer is given by \p *valueSize. The value returned in \p
713
+ * *valueSize contains the number of bytes returned in \p value.
714
+ *
715
+ * If the attribute value is a c-string that is longer than \p
716
+ * *valueSize, then only the first \p *valueSize characters will be
717
+ * returned and there will be no terminating null byte.
718
+ * \note \b Thread-safety: this function is thread safe.
719
+ *
720
+ * \param eventDomain ID of the event domain
721
+ * \param attrib The event domain attribute to read
722
+ * \param valueSize The size of the \p value buffer in bytes, and
723
+ * returns the number of bytes written to \p value
724
+ * \param value Returns the attribute's value
725
+ *
726
+ * \retval CUPTI_SUCCESS
727
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
728
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
729
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
730
+ * is NULL, or if \p attrib is not an event domain attribute
731
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
732
+ * attribute values, indicates that the \p value buffer is too small
733
+ * to hold the attribute value.
734
+ */
735
+ CUptiResult CUPTIAPI cuptiEventDomainGetAttribute(CUpti_EventDomainID eventDomain,
736
+ CUpti_EventDomainAttribute attrib,
737
+ size_t *valueSize,
738
+ void *value);
739
+
740
+ /**
741
+ * \brief Get number of events in a domain.
742
+ *
743
+ * Returns the number of events in \p numEvents for a domain.
744
+ * \note \b Thread-safety: this function is thread safe.
745
+ *
746
+ * \param eventDomain ID of the event domain
747
+ * \param numEvents Returns the number of events in the domain
748
+ *
749
+ * \retval CUPTI_SUCCESS
750
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
751
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
752
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numEvents is NULL
753
+ */
754
+ CUptiResult CUPTIAPI cuptiEventDomainGetNumEvents(CUpti_EventDomainID eventDomain,
755
+ uint32_t *numEvents);
756
+
757
+ /**
758
+ * \brief Get the events in a domain.
759
+ *
760
+ * Returns the event IDs in \p eventArray for a domain. The size of
761
+ * the \p eventArray buffer is given by \p *arraySizeBytes. The size
762
+ * of the \p eventArray buffer must be at least \p numdomainevents *
763
+ * sizeof(CUpti_EventID) or else all events will not be returned. The
764
+ * value returned in \p *arraySizeBytes contains the number of bytes
765
+ * returned in \p eventArray.
766
+ * \note \b Thread-safety: this function is thread safe.
767
+ *
768
+ * \param eventDomain ID of the event domain
769
+ * \param arraySizeBytes The size of \p eventArray in bytes, and
770
+ * returns the number of bytes written to \p eventArray
771
+ * \param eventArray Returns the IDs of the events in the domain
772
+ *
773
+ * \retval CUPTI_SUCCESS
774
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
775
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
776
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or \p
777
+ * eventArray are NULL
778
+ */
779
+ CUptiResult CUPTIAPI cuptiEventDomainEnumEvents(CUpti_EventDomainID eventDomain,
780
+ size_t *arraySizeBytes,
781
+ CUpti_EventID *eventArray);
782
+
783
+ /**
784
+ * \brief Get an event attribute.
785
+ *
786
+ * Returns an event attribute in \p *value. The size of the \p
787
+ * value buffer is given by \p *valueSize. The value returned in \p
788
+ * *valueSize contains the number of bytes returned in \p value.
789
+ *
790
+ * If the attribute value is a c-string that is longer than \p
791
+ * *valueSize, then only the first \p *valueSize characters will be
792
+ * returned and there will be no terminating null byte.
793
+ * \note \b Thread-safety: this function is thread safe.
794
+ *
795
+ * \param event ID of the event
796
+ * \param attrib The event attribute to read
797
+ * \param valueSize The size of the \p value buffer in bytes, and
798
+ * returns the number of bytes written to \p value
799
+ * \param value Returns the attribute's value
800
+ *
801
+ * \retval CUPTI_SUCCESS
802
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
803
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
804
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
805
+ * is NULL, or if \p attrib is not an event attribute
806
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
807
+ * attribute values, indicates that the \p value buffer is too small
808
+ * to hold the attribute value.
809
+ */
810
+ CUptiResult CUPTIAPI cuptiEventGetAttribute(CUpti_EventID event,
811
+ CUpti_EventAttribute attrib,
812
+ size_t *valueSize,
813
+ void *value);
814
+
815
+ /**
816
+ * \brief Find an event by name.
817
+ *
818
+ * Find an event by name and return the event ID in \p *event.
819
+ * \note \b Thread-safety: this function is thread safe.
820
+ *
821
+ * \param device The CUDA device
822
+ * \param eventName The name of the event to find
823
+ * \param event Returns the ID of the found event or undefined if
824
+ * unable to find the event
825
+ *
826
+ * \retval CUPTI_SUCCESS
827
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
828
+ * \retval CUPTI_ERROR_INVALID_DEVICE
829
+ * \retval CUPTI_ERROR_INVALID_EVENT_NAME if unable to find an event
830
+ * with name \p eventName. In this case \p *event is undefined
831
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventName or \p event are NULL
832
+ */
833
+ CUptiResult CUPTIAPI cuptiEventGetIdFromName(CUdevice device,
834
+ const char *eventName,
835
+ CUpti_EventID *event);
836
+
837
+ /**
838
+ * \brief Create a new event group for a context.
839
+ *
840
+ * Creates a new event group for \p context and returns the new group
841
+ * in \p *eventGroup.
842
+ * \note \p flags are reserved for future use and should be set to zero.
843
+ * \note \b Thread-safety: this function is thread safe.
844
+ *
845
+ * \param context The context for the event group
846
+ * \param eventGroup Returns the new event group
847
+ * \param flags Reserved - must be zero
848
+ *
849
+ * \retval CUPTI_SUCCESS
850
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
851
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
852
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY
853
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
854
+ */
855
+ CUptiResult CUPTIAPI cuptiEventGroupCreate(CUcontext context,
856
+ CUpti_EventGroup *eventGroup,
857
+ uint32_t flags);
858
+
859
+ /**
860
+ * \brief Destroy an event group.
861
+ *
862
+ * Destroy an \p eventGroup and free its resources. An event group
863
+ * cannot be destroyed if it is enabled.
864
+ * \note \b Thread-safety: this function is thread safe.
865
+ *
866
+ * \param eventGroup The event group to destroy
867
+ *
868
+ * \retval CUPTI_SUCCESS
869
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
870
+ * \retval CUPTI_ERROR_INVALID_OPERATION if the event group is enabled
871
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if eventGroup is NULL
872
+ */
873
+ CUptiResult CUPTIAPI cuptiEventGroupDestroy(CUpti_EventGroup eventGroup);
874
+
875
+ /**
876
+ * \brief Read an event group attribute.
877
+ *
878
+ * Read an event group attribute and return it in \p *value.
879
+ * \note \b Thread-safety: this function is thread safe but client
880
+ * must guard against simultaneous destruction or modification of \p
881
+ * eventGroup (for example, client must guard against simultaneous
882
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
883
+ * etc.), and must guard against simultaneous destruction of the
884
+ * context in which \p eventGroup was created (for example, client
885
+ * must guard against simultaneous calls to cudaDeviceReset,
886
+ * cuCtxDestroy, etc.).
887
+ *
888
+ * \param eventGroup The event group
889
+ * \param attrib The attribute to read
890
+ * \param valueSize Size of buffer pointed by the value, and
891
+ * returns the number of bytes written to \p value
892
+ * \param value Returns the value of the attribute
893
+ *
894
+ * \retval CUPTI_SUCCESS
895
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
896
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
897
+ * is NULL, or if \p attrib is not an eventgroup attribute
898
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
899
+ * attribute values, indicates that the \p value buffer is too small
900
+ * to hold the attribute value.
901
+ */
902
+ CUptiResult CUPTIAPI cuptiEventGroupGetAttribute(CUpti_EventGroup eventGroup,
903
+ CUpti_EventGroupAttribute attrib,
904
+ size_t *valueSize,
905
+ void *value);
906
+
907
+ /**
908
+ * \brief Write an event group attribute.
909
+ *
910
+ * Write an event group attribute.
911
+ * \note \b Thread-safety: this function is thread safe.
912
+ *
913
+ * \param eventGroup The event group
914
+ * \param attrib The attribute to write
915
+ * \param valueSize The size, in bytes, of the value
916
+ * \param value The attribute value to write
917
+ *
918
+ * \retval CUPTI_SUCCESS
919
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
920
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
921
+ * is NULL, or if \p attrib is not an event group attribute, or if
922
+ * \p attrib is not a writable attribute
923
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT Indicates that
924
+ * the \p value buffer is too small to hold the attribute value.
925
+ */
926
+ CUptiResult CUPTIAPI cuptiEventGroupSetAttribute(CUpti_EventGroup eventGroup,
927
+ CUpti_EventGroupAttribute attrib,
928
+ size_t valueSize,
929
+ void *value);
930
+
931
+ /**
932
+ * \brief Add an event to an event group.
933
+ *
934
+ * Add an event to an event group. The event add can fail for a number of reasons:
935
+ * \li The event group is enabled
936
+ * \li The event does not belong to the same event domain as the
937
+ * events that are already in the event group
938
+ * \li Device limitations on the events that can belong to the same group
939
+ * \li The event group is full
940
+ *
941
+ * \note \b Thread-safety: this function is thread safe.
942
+ *
943
+ * \param eventGroup The event group
944
+ * \param event The event to add to the group
945
+ *
946
+ * \retval CUPTI_SUCCESS
947
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
948
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
949
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY
950
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
951
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p event belongs to a
952
+ * different event domain than the events already in \p eventGroup, or
953
+ * if a device limitation prevents \p event from being collected at
954
+ * the same time as the events already in \p eventGroup
955
+ * \retval CUPTI_ERROR_MAX_LIMIT_REACHED if \p eventGroup is full
956
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
957
+ */
958
+ CUptiResult CUPTIAPI cuptiEventGroupAddEvent(CUpti_EventGroup eventGroup,
959
+ CUpti_EventID event);
960
+
961
+ /**
962
+ * \brief Remove an event from an event group.
963
+ *
964
+ * Remove \p event from the an event group. The event cannot be
965
+ * removed if the event group is enabled.
966
+ * \note \b Thread-safety: this function is thread safe.
967
+ *
968
+ * \param eventGroup The event group
969
+ * \param event The event to remove from the group
970
+ *
971
+ * \retval CUPTI_SUCCESS
972
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
973
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
974
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
975
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
976
+ */
977
+ CUptiResult CUPTIAPI cuptiEventGroupRemoveEvent(CUpti_EventGroup eventGroup,
978
+ CUpti_EventID event);
979
+
980
+ /**
981
+ * \brief Remove all events from an event group.
982
+ *
983
+ * Remove all events from an event group. Events cannot be removed if
984
+ * the event group is enabled.
985
+ * \note \b Thread-safety: this function is thread safe.
986
+ *
987
+ * \param eventGroup The event group
988
+ *
989
+ * \retval CUPTI_SUCCESS
990
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
991
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
992
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
993
+ */
994
+ CUptiResult CUPTIAPI cuptiEventGroupRemoveAllEvents(CUpti_EventGroup eventGroup);
995
+
996
+ /**
997
+ * \brief Zero all the event counts in an event group.
998
+ *
999
+ * Zero all the event counts in an event group.
1000
+ * \note \b Thread-safety: this function is thread safe but client
1001
+ * must guard against simultaneous destruction or modification of \p
1002
+ * eventGroup (for example, client must guard against simultaneous
1003
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
1004
+ * etc.), and must guard against simultaneous destruction of the
1005
+ * context in which \p eventGroup was created (for example, client
1006
+ * must guard against simultaneous calls to cudaDeviceReset,
1007
+ * cuCtxDestroy, etc.).
1008
+ *
1009
+ * \param eventGroup The event group
1010
+ *
1011
+ * \retval CUPTI_SUCCESS
1012
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1013
+ * \retval CUPTI_ERROR_HARDWARE
1014
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
1015
+ */
1016
+ CUptiResult CUPTIAPI cuptiEventGroupResetAllEvents(CUpti_EventGroup eventGroup);
1017
+
1018
+ /**
1019
+ * \brief Enable an event group.
1020
+ *
1021
+ * Enable an event group. Enabling an event group zeros the value of
1022
+ * all the events in the group and then starts collection of those
1023
+ * events.
1024
+ * \note \b Thread-safety: this function is thread safe.
1025
+ *
1026
+ * \param eventGroup The event group
1027
+ *
1028
+ * \retval CUPTI_SUCCESS
1029
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1030
+ * \retval CUPTI_ERROR_HARDWARE
1031
+ * \retval CUPTI_ERROR_NOT_READY if \p eventGroup does not contain any events
1032
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p eventGroup cannot be
1033
+ * enabled due to other already enabled event groups
1034
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
1035
+ * \retval CUPTI_ERROR_HARDWARE_BUSY if another client is profiling
1036
+ * and hardware is busy
1037
+ */
1038
+ CUptiResult CUPTIAPI cuptiEventGroupEnable(CUpti_EventGroup eventGroup);
1039
+
1040
+ /**
1041
+ * \brief Disable an event group.
1042
+ *
1043
+ * Disable an event group. Disabling an event group stops collection
1044
+ * of events contained in the group.
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_INVALID_PARAMETER if \p eventGroup is NULL
1053
+ */
1054
+ CUptiResult CUPTIAPI cuptiEventGroupDisable(CUpti_EventGroup eventGroup);
1055
+
1056
+ /**
1057
+ * \brief Read the value for an event in an event group.
1058
+ *
1059
+ * Read the value for an event in an event group. The event value is
1060
+ * returned in the \p eventValueBuffer buffer. \p
1061
+ * eventValueBufferSizeBytes indicates the size of the \p
1062
+ * eventValueBuffer buffer. The buffer must be at least sizeof(uint64)
1063
+ * if ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is not set
1064
+ * on the group containing the event. The buffer must be at least
1065
+ * (sizeof(uint64) * number of domain instances) if
1066
+ * ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is set on the
1067
+ * group.
1068
+ *
1069
+ * If any instance of an event counter overflows, the value returned
1070
+ * for that event instance will be ::CUPTI_EVENT_OVERFLOW.
1071
+ *
1072
+ * The only allowed value for \p flags is ::CUPTI_EVENT_READ_FLAG_NONE.
1073
+ *
1074
+ * Reading an event from a disabled event group is not allowed. After
1075
+ * being read, an event's value is reset to zero.
1076
+ * \note \b Thread-safety: this function is thread safe but client
1077
+ * must guard against simultaneous destruction or modification of \p
1078
+ * eventGroup (for example, client must guard against simultaneous
1079
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
1080
+ * etc.), and must guard against simultaneous destruction of the
1081
+ * context in which \p eventGroup was created (for example, client
1082
+ * must guard against simultaneous calls to cudaDeviceReset,
1083
+ * cuCtxDestroy, etc.). If \ref cuptiEventGroupResetAllEvents is
1084
+ * called simultaneously with this function, then returned event
1085
+ * values are undefined.
1086
+ *
1087
+ * \param eventGroup The event group
1088
+ * \param flags Flags controlling the reading mode
1089
+ * \param event The event to read
1090
+ * \param eventValueBufferSizeBytes The size of \p eventValueBuffer
1091
+ * in bytes, and returns the number of bytes written to \p
1092
+ * eventValueBuffer
1093
+ * \param eventValueBuffer Returns the event value(s)
1094
+ *
1095
+ * \retval CUPTI_SUCCESS
1096
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1097
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
1098
+ * \retval CUPTI_ERROR_HARDWARE
1099
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is disabled
1100
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup, \p
1101
+ * eventValueBufferSizeBytes or \p eventValueBuffer is NULL
1102
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if size of \p eventValueBuffer
1103
+ * is not sufficient
1104
+ */
1105
+ CUptiResult CUPTIAPI cuptiEventGroupReadEvent(CUpti_EventGroup eventGroup,
1106
+ CUpti_ReadEventFlags flags,
1107
+ CUpti_EventID event,
1108
+ size_t *eventValueBufferSizeBytes,
1109
+ uint64_t *eventValueBuffer);
1110
+
1111
+ /**
1112
+ * \brief Read the values for all the events in an event group.
1113
+ *
1114
+ * Read the values for all the events in an event group. The event
1115
+ * values are returned in the \p eventValueBuffer buffer. \p
1116
+ * eventValueBufferSizeBytes indicates the size of \p
1117
+ * eventValueBuffer. The buffer must be at least (sizeof(uint64) *
1118
+ * number of events in group) if
1119
+ * ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is not set on
1120
+ * the group containing the events. The buffer must be at least
1121
+ * (sizeof(uint64) * number of domain instances * number of events in
1122
+ * group) if ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is
1123
+ * set on the group.
1124
+ *
1125
+ * The data format returned in \p eventValueBuffer is:
1126
+ * - domain instance 0: event0 event1 ... eventN
1127
+ * - domain instance 1: event0 event1 ... eventN
1128
+ * - ...
1129
+ * - domain instance M: event0 event1 ... eventN
1130
+ *
1131
+ * The event order in \p eventValueBuffer is returned in \p
1132
+ * eventIdArray. The size of \p eventIdArray is specified in \p
1133
+ * eventIdArraySizeBytes. The size should be at least
1134
+ * (sizeof(CUpti_EventID) * number of events in group).
1135
+ *
1136
+ * If any instance of any event counter overflows, the value returned
1137
+ * for that event instance will be ::CUPTI_EVENT_OVERFLOW.
1138
+ *
1139
+ * The only allowed value for \p flags is ::CUPTI_EVENT_READ_FLAG_NONE.
1140
+ *
1141
+ * Reading events from a disabled event group is not allowed. After
1142
+ * being read, an event's value is reset to zero.
1143
+ * \note \b Thread-safety: this function is thread safe but client
1144
+ * must guard against simultaneous destruction or modification of \p
1145
+ * eventGroup (for example, client must guard against simultaneous
1146
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
1147
+ * etc.), and must guard against simultaneous destruction of the
1148
+ * context in which \p eventGroup was created (for example, client
1149
+ * must guard against simultaneous calls to cudaDeviceReset,
1150
+ * cuCtxDestroy, etc.). If \ref cuptiEventGroupResetAllEvents is
1151
+ * called simultaneously with this function, then returned event
1152
+ * values are undefined.
1153
+ *
1154
+ * \param eventGroup The event group
1155
+ * \param flags Flags controlling the reading mode
1156
+ * \param eventValueBufferSizeBytes The size of \p eventValueBuffer in
1157
+ * bytes, and returns the number of bytes written to \p
1158
+ * eventValueBuffer
1159
+ * \param eventValueBuffer Returns the event values
1160
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes,
1161
+ * and returns the number of bytes written to \p eventIdArray
1162
+ * \param eventIdArray Returns the IDs of the events in the same order
1163
+ * as the values return in eventValueBuffer.
1164
+ * \param numEventIdsRead Returns the number of event IDs returned
1165
+ * in \p eventIdArray
1166
+ *
1167
+ * \retval CUPTI_SUCCESS
1168
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1169
+ * \retval CUPTI_ERROR_HARDWARE
1170
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is disabled
1171
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup, \p
1172
+ * eventValueBufferSizeBytes, \p eventValueBuffer, \p
1173
+ * eventIdArraySizeBytes, \p eventIdArray or \p numEventIdsRead is
1174
+ * NULL
1175
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if size of \p eventValueBuffer
1176
+ * or \p eventIdArray is not sufficient
1177
+ */
1178
+ CUptiResult CUPTIAPI cuptiEventGroupReadAllEvents(CUpti_EventGroup eventGroup,
1179
+ CUpti_ReadEventFlags flags,
1180
+ size_t *eventValueBufferSizeBytes,
1181
+ uint64_t *eventValueBuffer,
1182
+ size_t *eventIdArraySizeBytes,
1183
+ CUpti_EventID *eventIdArray,
1184
+ size_t *numEventIdsRead);
1185
+
1186
+ /**
1187
+ * \brief For a set of events, get the grouping that indicates the
1188
+ * number of passes and the event groups necessary to collect the
1189
+ * events.
1190
+ *
1191
+ * The number of events that can be collected simultaneously varies by
1192
+ * device and by the type of the events. When events can be collected
1193
+ * simultaneously, they may need to be grouped into multiple event
1194
+ * groups because they are from different event domains. This function
1195
+ * takes a set of events and determines how many passes are required
1196
+ * to collect all those events, and which events can be collected
1197
+ * simultaneously in each pass.
1198
+ *
1199
+ * The CUpti_EventGroupSets returned in \p eventGroupPasses indicates
1200
+ * how many passes are required to collect the events with the \p
1201
+ * numSets field. Within each event group set, the \p sets array
1202
+ * indicates the event groups that should be collected on each pass.
1203
+ * \note \b Thread-safety: this function is thread safe, but client
1204
+ * must guard against another thread simultaneously destroying \p
1205
+ * context.
1206
+ *
1207
+ * \param context The context for event collection
1208
+ * \param eventIdArraySizeBytes Size of \p eventIdArray in bytes
1209
+ * \param eventIdArray Array of event IDs that need to be grouped
1210
+ * \param eventGroupPasses Returns a CUpti_EventGroupSets object that
1211
+ * indicates the number of passes required to collect the events and
1212
+ * the events to collect on each pass
1213
+ *
1214
+ * \retval CUPTI_SUCCESS
1215
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1216
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
1217
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
1218
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventIdArray or
1219
+ * \p eventGroupPasses is NULL
1220
+ */
1221
+ CUptiResult CUPTIAPI cuptiEventGroupSetsCreate(CUcontext context,
1222
+ size_t eventIdArraySizeBytes,
1223
+ CUpti_EventID *eventIdArray,
1224
+ CUpti_EventGroupSets **eventGroupPasses);
1225
+
1226
+ /**
1227
+ * \brief Destroy a event group sets object.
1228
+ *
1229
+ * Destroy a CUpti_EventGroupSets object.
1230
+ * \note \b Thread-safety: this function is thread safe.
1231
+ *
1232
+ * \param eventGroupSets The object to destroy
1233
+ *
1234
+ * \retval CUPTI_SUCCESS
1235
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1236
+ * \retval CUPTI_ERROR_INVALID_OPERATION if any of the event groups
1237
+ * contained in the sets is enabled
1238
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSets is NULL
1239
+ */
1240
+ CUptiResult CUPTIAPI cuptiEventGroupSetsDestroy(CUpti_EventGroupSets *eventGroupSets);
1241
+
1242
+
1243
+ /**
1244
+ * \brief Enable an event group set.
1245
+ *
1246
+ * Enable a set of event groups. Enabling a set of event groups zeros the value of
1247
+ * all the events in all the groups and then starts collection of those events.
1248
+ * \note \b Thread-safety: this function is thread safe.
1249
+ *
1250
+ * \param eventGroupSet The pointer to the event group set
1251
+ *
1252
+ * \retval CUPTI_SUCCESS
1253
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1254
+ * \retval CUPTI_ERROR_HARDWARE
1255
+ * \retval CUPTI_ERROR_NOT_READY if \p eventGroup does not contain any events
1256
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p eventGroup cannot be
1257
+ * enabled due to other already enabled event groups
1258
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSet is NULL
1259
+ * \retval CUPTI_ERROR_HARDWARE_BUSY if other client is profiling and hardware is
1260
+ * busy
1261
+ */
1262
+ CUptiResult CUPTIAPI cuptiEventGroupSetEnable(CUpti_EventGroupSet *eventGroupSet);
1263
+
1264
+ /**
1265
+ * \brief Disable an event group set.
1266
+ *
1267
+ * Disable a set of event groups. Disabling a set of event groups
1268
+ * stops collection of events contained in the groups.
1269
+ * \note \b Thread-safety: this function is thread safe.
1270
+ * \note \b If this call fails, some of the event groups in the set may be disabled
1271
+ * and other event groups may remain enabled.
1272
+ *
1273
+ * \param eventGroupSet The pointer to the event group set
1274
+ * \retval CUPTI_SUCCESS
1275
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
1276
+ * \retval CUPTI_ERROR_HARDWARE
1277
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSet is NULL
1278
+ */
1279
+ CUptiResult CUPTIAPI cuptiEventGroupSetDisable(CUpti_EventGroupSet *eventGroupSet);
1280
+
1281
+ /**
1282
+ * \brief Enable kernel replay mode.
1283
+ *
1284
+ * Set profiling mode for the context to replay mode. In this mode,
1285
+ * any number of events can be collected in one run of the kernel. The
1286
+ * event collection mode will automatically switch to
1287
+ * CUPTI_EVENT_COLLECTION_MODE_KERNEL. In this mode, \ref
1288
+ * cuptiSetEventCollectionMode will return
1289
+ * CUPTI_ERROR_INVALID_OPERATION.
1290
+ * \note \b Kernels might take longer to run if many events are enabled.
1291
+ * \note \b Thread-safety: this function is thread safe.
1292
+ *
1293
+ * \param context The context
1294
+ * \retval CUPTI_SUCCESS
1295
+ */
1296
+ CUptiResult CUPTIAPI cuptiEnableKernelReplayMode(CUcontext context);
1297
+
1298
+ /**
1299
+ * \brief Disable kernel replay mode.
1300
+ *
1301
+ * Set profiling mode for the context to non-replay (default)
1302
+ * mode. Event collection mode will be set to
1303
+ * CUPTI_EVENT_COLLECTION_MODE_KERNEL. All previously enabled
1304
+ * event groups and event group sets will be disabled.
1305
+ * \note \b Thread-safety: this function is thread safe.
1306
+ *
1307
+ * \param context The context
1308
+ * \retval CUPTI_SUCCESS
1309
+ */
1310
+ CUptiResult CUPTIAPI cuptiDisableKernelReplayMode(CUcontext context);
1311
+
1312
+ /**
1313
+ * \brief Function type for getting updates on kernel replay.
1314
+ *
1315
+ * \param kernelName The mangled kernel name
1316
+ * \param numReplaysDone Number of replays done so far
1317
+ * \param customData Pointer of any custom data passed in when subscribing
1318
+ */
1319
+ typedef void (CUPTIAPI *CUpti_KernelReplayUpdateFunc)(
1320
+ const char *kernelName,
1321
+ int numReplaysDone,
1322
+ void *customData);
1323
+
1324
+ /**
1325
+ * \brief Subscribe to kernel replay updates.
1326
+ *
1327
+ * When subscribed, the function pointer passed in will be called each time a
1328
+ * kernel run is finished during kernel replay. Previously subscribed function
1329
+ * pointer will be replaced. Pass in NULL as the function pointer unsubscribes
1330
+ * the update.
1331
+ *
1332
+ * \param updateFunc The update function pointer
1333
+ * \param customData Pointer to any custom data
1334
+ * \retval CUPTI_SUCCESS
1335
+ */
1336
+ CUptiResult CUPTIAPI cuptiKernelReplaySubscribeUpdate(CUpti_KernelReplayUpdateFunc updateFunc, void *customData);
1337
+
1338
+ /** @} */ /* END CUPTI_EVENT_API */
1339
+
1340
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
1341
+ #pragma GCC visibility pop
1342
+ #endif
1343
+
1344
+ #if defined(__cplusplus)
1345
+ }
1346
+ #endif
1347
+
1348
+ #endif /*_CUPTI_EVENTS_H_*/
1349
+
1350
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/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
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/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_*/
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cupti_profiler_target.h ADDED
@@ -0,0 +1,601 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2011-2023 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(_CUPTI_PROFILER_TARGET_H_)
51
+ #define _CUPTI_PROFILER_TARGET_H_
52
+
53
+ #include <cuda.h>
54
+ #include <cupti_result.h>
55
+ #include <stddef.h>
56
+ #include <stdint.h>
57
+
58
+ #ifdef __cplusplus
59
+ extern "C" {
60
+ #endif
61
+
62
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
63
+ #pragma GCC visibility push(default)
64
+ #endif
65
+
66
+ /**
67
+ * \defgroup CUPTI_PROFILER_API CUPTI Profiling API
68
+ * Functions, types, and enums that implement the CUPTI Profiling API.
69
+ * @{
70
+ */
71
+ #ifndef CUPTI_PROFILER_STRUCT_SIZE
72
+ #define CUPTI_PROFILER_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
73
+ #endif
74
+
75
+ /**
76
+ * \brief Profiler range attribute
77
+ *
78
+ * A metric enabled in the session's configuration is collected separately per unique range-stack in the pass.
79
+ * This is an attribute to collect metrics around each kernel in a profiling session or in an user defined range.
80
+ */
81
+ typedef enum
82
+ {
83
+ /**
84
+ * Invalid value
85
+ */
86
+ CUPTI_Range_INVALID,
87
+ /**
88
+ * Ranges are auto defined around each kernel in a profiling session
89
+ */
90
+ CUPTI_AutoRange,
91
+ /**
92
+ * A range in which metric data to be collected is defined by the user
93
+ */
94
+ CUPTI_UserRange,
95
+ /**
96
+ * Range count
97
+ */
98
+ CUPTI_Range_COUNT,
99
+ } CUpti_ProfilerRange;
100
+
101
+ /**
102
+ * \brief Profiler replay attribute
103
+ *
104
+ * For metrics which require multipass collection, a replay of the GPU kernel(s) is required.
105
+ * This is an attribute which specify how the replay of the kernel(s) to be measured is done.
106
+ */
107
+ typedef enum
108
+ {
109
+ /**
110
+ * Invalid Value
111
+ */
112
+ CUPTI_Replay_INVALID,
113
+ /**
114
+ * Replay is done by CUPTI user around the process
115
+ */
116
+ CUPTI_ApplicationReplay,
117
+ /**
118
+ * Replay is done around kernel implicitly by CUPTI
119
+ */
120
+ CUPTI_KernelReplay,
121
+ /**
122
+ * Replay is done by CUPTI user within a process
123
+ */
124
+ CUPTI_UserReplay,
125
+ /**
126
+ * Replay count
127
+ */
128
+ CUPTI_Replay_COUNT,
129
+ } CUpti_ProfilerReplayMode;
130
+
131
+ /**
132
+ * \brief Default parameter for cuptiProfilerInitialize
133
+ */
134
+ typedef struct CUpti_Profiler_Initialize_Params
135
+ {
136
+ size_t structSize; //!< [in] CUpti_Profiler_Initialize_Params_STRUCT_SIZE
137
+ void* pPriv; //!< [in] assign to NULL
138
+
139
+ } CUpti_Profiler_Initialize_Params;
140
+ #define CUpti_Profiler_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Initialize_Params, pPriv)
141
+
142
+ /**
143
+ * \brief Default parameter for cuptiProfilerDeInitialize
144
+ */
145
+ typedef struct CUpti_Profiler_DeInitialize_Params
146
+ {
147
+ size_t structSize; //!< [in] CUpti_Profiler_DeInitialize_Params_STRUCT_SIZE
148
+ void* pPriv; //!< [in] assign to NULL
149
+
150
+ } CUpti_Profiler_DeInitialize_Params;
151
+ #define CUpti_Profiler_DeInitialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_DeInitialize_Params, pPriv)
152
+
153
+ /**
154
+ * \brief Initializes the profiler interface
155
+ *
156
+ * Loads the required libraries in the process address space.
157
+ * Sets up the hooks with the CUDA driver.
158
+ */
159
+ CUptiResult CUPTIAPI cuptiProfilerInitialize(CUpti_Profiler_Initialize_Params *pParams);
160
+
161
+ /**
162
+ * \brief DeInitializes the profiler interface
163
+ */
164
+ CUptiResult CUPTIAPI cuptiProfilerDeInitialize(CUpti_Profiler_DeInitialize_Params *pParams);
165
+
166
+ /**
167
+ * \brief Input parameter to define the counterDataImage
168
+ */
169
+ typedef struct CUpti_Profiler_CounterDataImageOptions
170
+ {
171
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImageOptions_Params_STRUCT_SIZE
172
+ void* pPriv; //!< [in] assign to NULL
173
+
174
+ const uint8_t* pCounterDataPrefix; /**< [in] Address of CounterDataPrefix generated from NVPW_CounterDataBuilder_GetCounterDataPrefix().
175
+ Must be align(8).*/
176
+ size_t counterDataPrefixSize; //!< [in] Size of CounterDataPrefix generated from NVPW_CounterDataBuilder_GetCounterDataPrefix().
177
+ uint32_t maxNumRanges; //!< [in] Maximum number of ranges that can be profiled
178
+ uint32_t maxNumRangeTreeNodes; //!< [in] Maximum number of RangeTree nodes; must be >= maxNumRanges
179
+ uint32_t maxRangeNameLength; //!< [in] Maximum string length of each RangeName, including the trailing NULL character
180
+ } CUpti_Profiler_CounterDataImageOptions;
181
+ #define CUpti_Profiler_CounterDataImageOptions_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImageOptions, maxRangeNameLength)
182
+
183
+ /**
184
+ * \brief Params for cuptiProfilerCounterDataImageCalculateSize
185
+ */
186
+ typedef struct CUpti_Profiler_CounterDataImage_CalculateSize_Params
187
+ {
188
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImage_CalculateSize_Params_STRUCT_SIZE
189
+ void* pPriv; //!< [in] assign to NULL
190
+
191
+ size_t sizeofCounterDataImageOptions; //!< [in] CUpti_Profiler_CounterDataImageOptions_STRUCT_SIZE
192
+ const CUpti_Profiler_CounterDataImageOptions* pOptions; //!< [in] Pointer to Counter Data Image Options
193
+ size_t counterDataImageSize; //!< [out]
194
+ } CUpti_Profiler_CounterDataImage_CalculateSize_Params;
195
+ #define CUpti_Profiler_CounterDataImage_CalculateSize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImage_CalculateSize_Params, counterDataImageSize)
196
+
197
+ /**
198
+ * \brief Params for cuptiProfilerCounterDataImageInitialize
199
+ */
200
+ typedef struct CUpti_Profiler_CounterDataImage_Initialize_Params
201
+ {
202
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImage_Initialize_Params_STRUCT_SIZE
203
+ void* pPriv; //!< [in] assign to NULL
204
+
205
+ size_t sizeofCounterDataImageOptions; //!< [in] CUpti_Profiler_CounterDataImageOptions_STRUCT_SIZE
206
+ const CUpti_Profiler_CounterDataImageOptions* pOptions; //!< [in] Pointer to Counter Data Image Options
207
+ size_t counterDataImageSize; //!< [in] Size calculated from cuptiProfilerCounterDataImageCalculateSize
208
+ uint8_t* pCounterDataImage; //!< [in] The buffer to be initialized.
209
+ } CUpti_Profiler_CounterDataImage_Initialize_Params;
210
+ #define CUpti_Profiler_CounterDataImage_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImage_Initialize_Params, pCounterDataImage)
211
+
212
+ /**
213
+ * \brief A CounterData image allocates space for values for each counter for each range.
214
+ *
215
+ * User borne the resposibility of managing the counterDataImage allocations.
216
+ * CounterDataPrefix contains meta data about the metrics that will be stored in counterDataImage.
217
+ * Use these APIs to calculate the allocation size and initialize counterData image.
218
+ */
219
+ CUptiResult 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 Profiler API types
554
+ */
555
+ typedef enum
556
+ {
557
+ CUPTI_PROFILER_RANGE_PROFILING = 0, //!< CUPTI APIs for range based profiling (cuptiProfiler*)
558
+ CUPTI_PROFILER_PC_SAMPLING, //!< CUPTI APIs collecting pc sampling data (cuptiPcSampling*)
559
+ CUPTI_PROFILER_SASS_METRICS, //!< CUPTI APIs collecting SASS metrics data (cuptiSassMetrics*)
560
+ CUPTI_PROFILER_UNKNOWN
561
+ } CUpti_Profiler_API;
562
+
563
+ /**
564
+ * \brief Params for cuptiProfilerDeviceSupported
565
+ */
566
+ typedef struct
567
+ {
568
+ size_t structSize; //!< [in] Must be CUpti_Profiler_DeviceSupported_Params_STRUCT_SIZE
569
+ void *pPriv; //!< [in] assign to NULL
570
+ CUdevice cuDevice; //!< [in] if NULL, the current CUcontext is used
571
+
572
+ 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.
573
+
574
+ CUpti_Profiler_Support_Level architecture; //!< [out] SUPPORTED if the device architecture level supports the Profiling API (Compute Capability >= 7.0), UNSUPPORTED otherwise
575
+ CUpti_Profiler_Support_Level sli; //!< [out] SUPPORTED if SLI is not enabled, UNSUPPORTED otherwise
576
+ 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
577
+ CUpti_Profiler_Support_Level confidentialCompute; //!< [out] SUPPORTED if confidential compute is not enabled, UNSUPPORTED otherwise
578
+ CUpti_Profiler_Support_Level cmp; //!< [out] SUPPORTED if not NVIDIA Crypto Mining Processors (CMP), UNSUPPORTED otherwise
579
+ CUpti_Profiler_Support_Level wsl; //!< [out] SUPPORTED if WSL supported, UNSUPPORTED otherwise
580
+ CUpti_Profiler_API api; //!< [in] the CUPTI API type for which device support will be checked
581
+ } CUpti_Profiler_DeviceSupported_Params;
582
+ #define CUpti_Profiler_DeviceSupported_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_DeviceSupported_Params, api)
583
+
584
+ /**
585
+ * \brief Query device compatibility with Profiling API
586
+ *
587
+ * Use this call to determine whether a compute device and configuration are compatible with the Profiling API.
588
+ * If the configuration does not support profiling, one of several flags will indicate why.
589
+ */
590
+ CUptiResult CUPTIAPI cuptiProfilerDeviceSupported(CUpti_Profiler_DeviceSupported_Params *pParams);
591
+
592
+ /** @} */ /* END CUPTI_METRIC_API */
593
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
594
+ #pragma GCC visibility pop
595
+ #endif
596
+
597
+ #ifdef __cplusplus
598
+ } /* extern "C" */
599
+ #endif
600
+
601
+ #endif /*_CUPTI_PROFILER_TARGET_H_*/
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cupti_sass_metrics.h ADDED
@@ -0,0 +1,409 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2023 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+
50
+ #if !defined(_CUPTI_SASS_METRICS_H_)
51
+ #define _CUPTI_SASS_METRICS_H_
52
+
53
+ #include <cuda.h>
54
+ #include <cupti_result.h>
55
+ #include <cupti_profiler_target.h>
56
+
57
+ #ifdef __cplusplus
58
+ extern "C" {
59
+ #endif
60
+
61
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
62
+ #pragma GCC visibility push(default)
63
+ #endif
64
+
65
+ /**
66
+ * \defgroup CUPTI_SASS_METRICS_API CUPTI SASS Metrics API
67
+ * Functions, types, and enums that implement the CUPTI SASS Metrics API.
68
+ * @{
69
+ */
70
+
71
+ typedef enum
72
+ {
73
+ /// SASS metric data will be collected at GPU level.
74
+ /// In CUpti_SassMetricsGetDataProperties_Params struct the numOfInstances will be equal to 1
75
+ CUPTI_SASS_METRICS_OUTPUT_GRANULARITY_GPU = 0,
76
+
77
+ /// SASS metric data will be collected at SM level
78
+ /// In CUpti_SassMetricsGetDataProperties_Params struct the numOfInstances will be equal to number of SMs in the GPU
79
+ CUPTI_SASS_METRICS_OUTPUT_GRANULARITY_SM = 1,
80
+
81
+ /// SASS metric data will be collected at SM sub-partition level
82
+ /// In CUpti_SassMetricsGetDataProperties_Params struct the numOfInstances will be equal to number of SM sub-partitions in the GPU
83
+ CUPTI_SASS_METRICS_OUTPUT_GRANULARITY_SMSP = 2,
84
+
85
+ CUPTI_SASS_METRICS_OUTPUT_GRANULARITY_INVALID
86
+ } CUpti_SassMetrics_OutputGranularity;
87
+
88
+ typedef struct CUpti_SassMetrics_MetricDetails
89
+ {
90
+ /// unique ID for the SASS metric
91
+ uint64_t metricId;
92
+ /// metric name
93
+ const char* pMetricName;
94
+ /// metric description
95
+ const char* pMetricDescription;
96
+ } CUpti_SassMetrics_MetricDetails;
97
+
98
+ typedef struct CUpti_SassMetrics_GetNumOfMetrics_Params
99
+ {
100
+ /// [in] should be equal to CUpti_SassMetrics_GetNumOfMetrics_Params_STRUCT_SIZE
101
+ size_t structSize;
102
+ /// [in] assign to NULL
103
+ void* pPriv;
104
+ /// [in] chip name for which metrics will be queried
105
+ const char* pChipName;
106
+ /// [out] number of metrics supported for the queried chip
107
+ size_t numOfMetrics;
108
+ } CUpti_SassMetrics_GetNumOfMetrics_Params;
109
+
110
+ #define CUpti_SassMetrics_GetNumOfMetrics_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetrics_GetNumOfMetrics_Params, numOfMetrics)
111
+
112
+ /**
113
+ * \brief Get the number of supported SASS metrics for the chip.
114
+ *
115
+ * \param Refer \ref CUpti_SassMetrics_GetNumOfMetrics_Params
116
+ *
117
+ * \retval CUPTI_SUCCESS
118
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
119
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric collection
120
+ */
121
+ CUptiResult CUPTIAPI cuptiSassMetricsGetNumOfMetrics(CUpti_SassMetrics_GetNumOfMetrics_Params* pParams);
122
+
123
+ typedef struct CUpti_SassMetrics_GetMetrics_Params
124
+ {
125
+ /// [in] should be equal to CUpti_SassMetrics_GetMetrics_Params_STRUCT_SIZE
126
+ size_t structSize;
127
+ /// [in] assign to NULL
128
+ void* pPriv;
129
+ /// [in] chip name for which metrics will be queried
130
+ const char* pChipName;
131
+ /// [in] number of metrics supported for the queried chip (can be queried using cuptiSassMetricsGetNumOfMetrics())
132
+ size_t numOfMetrics;
133
+ /// [out] list of metrics supported for queried chip
134
+ CUpti_SassMetrics_MetricDetails* pMetricsList;
135
+ } CUpti_SassMetrics_GetMetrics_Params;
136
+ #define CUpti_SassMetrics_GetMetrics_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetrics_GetMetrics_Params, pMetricsList)
137
+
138
+ /**
139
+ * \brief Get the list of all supported SASS metrics for the chip.
140
+ *
141
+ * \param Refer \ref CUpti_SassMetrics_GetMetrics_Params
142
+ *
143
+ * \retval CUPTI_SUCCESS
144
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
145
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric collection
146
+ */
147
+ CUptiResult CUPTIAPI cuptiSassMetricsGetMetrics(CUpti_SassMetrics_GetMetrics_Params* pParams);
148
+
149
+ typedef struct CUpti_SassMetrics_GetProperties_Params
150
+ {
151
+ /// [in] should be equal to CUpti_SassMetrics_GetProperties_Params_STRUCT_SIZE
152
+ size_t structSize;
153
+ /// [in] assign to NULL
154
+ void* pPriv;
155
+ /// [in] chip name for which metric will be queried
156
+ const char* pChipName;
157
+ /// [in] metric name
158
+ const char* pMetricName;
159
+ /// [out] returns the metric ID and the metric description
160
+ CUpti_SassMetrics_MetricDetails metric;
161
+ } CUpti_SassMetrics_GetProperties_Params;
162
+ #define CUpti_SassMetrics_GetProperties_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetrics_GetProperties_Params, metric)
163
+
164
+ /**
165
+ * \brief Get metric properties for the queried metric.
166
+ * For a given metric the results will be put in CUpti_SassMetrics_MetricDetails which
167
+ * stores metric ID, description of the metric.
168
+ *
169
+ * \param Refer \ref CUpti_SassMetrics_GetProperties_Params
170
+ *
171
+ * \retval CUPTI_SUCCESS
172
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
173
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
174
+ */
175
+ CUptiResult CUPTIAPI cuptiSassMetricsGetProperties(CUpti_SassMetrics_GetProperties_Params *pParams);
176
+
177
+ typedef struct CUpti_SassMetrics_Config
178
+ {
179
+ /// [in] unique id for the SASS metric, can be queried using cuptiSassMetricsGetProperties()
180
+ uint64_t metricId;
181
+ /// [in] CUpti_SassMetrics_OutputGranularity
182
+ uint8_t outputGranularity;
183
+ } CUpti_SassMetrics_Config;
184
+
185
+ typedef struct CUpti_SassMetricsSetConfig_Params
186
+ {
187
+ /// [in] equal to CUpti_SassMetricsSetConfig_Params_STRUCT_SIZE
188
+ size_t structSize;
189
+ /// [in] assign to NULL
190
+ void* pPriv;
191
+ /// [in] num of metric configs, will be equal to number of metrics queried
192
+ size_t numOfMetricConfig;
193
+ /// [in] list of metric config generated for given sass metrics
194
+ CUpti_SassMetrics_Config* pConfigs;
195
+ /// [in] device index for which config will be set, user can call this once for
196
+ /// the device on which the the SASS metric data will be collected
197
+ uint32_t deviceIndex;
198
+ } CUpti_SassMetricsSetConfig_Params;
199
+ #define CUpti_SassMetricsSetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsSetConfig_Params, deviceIndex)
200
+
201
+ /**
202
+ * \brief Set config for the SASS metric data collection for a device.
203
+ * User need to call this API before calling any of the SASS metric data collection APIs.
204
+ * Each set config API call need to be followed by cuptiSassPatchingUnSetConfig API
205
+ * before calling the cuptiSassMetricsSetConfig() API again for the same device.
206
+ *
207
+ * \param Refer \ref CUpti_SassMetricsSetConfig_Params
208
+ *
209
+ * \retval CUPTI_SUCCESS
210
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
211
+ * \retval CUPTI_ERROR_INVALID_CONTEXT if any cuda context has not been created prior to this API call
212
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this is called multiple times for the device without calling unset config API
213
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
214
+ */
215
+ CUptiResult CUPTIAPI cuptiSassMetricsSetConfig(CUpti_SassMetricsSetConfig_Params *pParams);
216
+
217
+ typedef struct CUpti_SassMetricsUnsetConfig_Params
218
+ {
219
+ /// [in] equal to CUpti_SassMetricsUnsetConfig_Params_STRUCT_SIZE
220
+ size_t structSize;
221
+ /// [in] assign to NULL
222
+ void* pPriv;
223
+ /// [in] device index for which SASS metric data collection config will get reset, user need to call this API for
224
+ /// all the devices on which the the SASS metric data collection have been configured.
225
+ uint32_t deviceIndex;
226
+ } CUpti_SassMetricsUnsetConfig_Params;
227
+ #define CUpti_SassMetricsUnsetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsUnsetConfig_Params, deviceIndex)
228
+
229
+ /**
230
+ * \brief Unset config API will reset the SASS metric data collection configuration for the device.
231
+ * Once this API called CUPTI will deallocate all the memory allocated and remove all
232
+ * the configuration for SASS metric data collection. User can only call this API for a device where
233
+ * cuptiSassMetricsSetConfig() API has been called earlier for the device.
234
+ *
235
+ * \param Refer \ref CUpti_SassMetricsSetConfig_Params
236
+ *
237
+ * \retval CUPTI_SUCCESS
238
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
239
+ * \retval CUPTI_ERROR_INVALID_CONTEXT if any cuda context has not been created prior to this API call
240
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this is called multiple times for the device without calling set config API
241
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
242
+ */
243
+ CUptiResult CUPTIAPI cuptiSassMetricsUnsetConfig(CUpti_SassMetricsUnsetConfig_Params *pParams);
244
+
245
+ typedef struct CUpti_SassMetricsEnable_Params
246
+ {
247
+ /// [in] equal to CUpti_SassMetricsEnable_Params_STRUCT_SIZE
248
+ size_t structSize;
249
+ /// [in] assign to NULL
250
+ void* pPriv;
251
+ /// [in] CUDA context on which SASS metric data collection will be enabled.
252
+ /// If set NULL, default context will be consider for SASS metric data collection.
253
+ CUcontext ctx;
254
+ /// [in] if false, all the functions will patched regardless of their execution with cuptiSassMetricsEnable() API call.
255
+ /// when this parameter is set to true, metric data collection for the function will be done at the very first execution in the enable/disble
256
+ /// range.
257
+ uint8_t enableLazyPatching;
258
+ } CUpti_SassMetricsEnable_Params;
259
+ #define CUpti_SassMetricsEnable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsEnable_Params, enableLazyPatching)
260
+
261
+ /**
262
+ * \brief Sass metric data collection enable API will mark the start of a range, between which kernel
263
+ * will be profiled for SASS metrics.
264
+ *
265
+ * \param Refer \ref CUpti_SassMetricsEnable_Params
266
+ *
267
+ * \retval CUPTI_SUCCESS
268
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
269
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
270
+ * \retval CUPTI_ERROR_INVALID_CONTEXT if any cuda context has not been created prior to this API call
271
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called multiple times for a cuda context without calling
272
+ * cuptiSassMetricsDisable() API or called before cuptiSassMetricsSetConfig() API call.
273
+ */
274
+ CUptiResult CUPTIAPI cuptiSassMetricsEnable(CUpti_SassMetricsEnable_Params* pParams);
275
+
276
+ typedef struct CUpti_SassMetricsDisable_Params
277
+ {
278
+ /// [in] equal to CUpti_SassMetricsDisable_Params_STRUCT_SIZE
279
+ size_t structSize;
280
+ /// [in] assign to NULL
281
+ void* pPriv;
282
+ /// [in] CUDA context on which SASS metric data collection will be disabled.
283
+ /// If set NULL, default context will be consider for SASS metric data collection.
284
+ CUcontext ctx;
285
+ /// [out] Num of dropped SASS records will be equal to numOfPatchedInstructions * numOfInstances.
286
+ /// Number of dropped records will be zero when data is flushed prior to calling the disable API.
287
+ size_t numOfDroppedRecords;
288
+ } CUpti_SassMetricsDisable_Params;
289
+ #define CUpti_SassMetricsDisable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsDisable_Params, numOfDroppedRecords)
290
+
291
+ /**
292
+ * \brief SASS metric data collection disable API will mark the end of a range, any kernel launched after this
293
+ * API call will not be profiled for the SASS metrics.
294
+ *
295
+ * \param Refer \ref CUpti_SassMetricsDisable_Params
296
+ *
297
+ * \retval CUPTI_SUCCESS
298
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
299
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
300
+ * \retval CUPTI_ERROR_INVALID_CONTEXT if any cuda context has not been created prior to this API call
301
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called multiple times for a cuda context without calling
302
+ * cuptiSassMetricsEnable() API or called before cuptiSassMetricsSetConfig() API call.
303
+ */
304
+ CUptiResult CUPTIAPI cuptiSassMetricsDisable(CUpti_SassMetricsDisable_Params* pParams);
305
+
306
+ typedef struct CUpti_SassMetricsGetDataProperties_Params
307
+ {
308
+ /// [in] equal to CUpti_SassMetricsGetDataProperties_Params_STRUCT_SIZE
309
+ size_t structSize;
310
+ /// [in] assign to NULL
311
+ void* pPriv;
312
+ /// [in] CUDA context on which SASS metric data collection was enabled.
313
+ /// If set NULL, default context will be consider for SASS metric data collection.
314
+ CUcontext ctx;
315
+ /// [out] total number of SASS records has been collected
316
+ size_t numOfPatchedInstructionRecords;
317
+ /// [out] number of instances for each metric value per instruction.
318
+ /// This will depend on CUpti_SassPatching_OutputGranularity level set for the metric config.
319
+ size_t numOfInstances;
320
+ } CUpti_SassMetricsGetDataProperties_Params;
321
+
322
+ #define CUpti_SassMetricsGetDataProperties_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsGetDataProperties_Params, numOfInstances)
323
+ /**
324
+ * \brief SASS metric data properties API will give the data regarding number of instances of a metric
325
+ * value and number of SASS instruction data has been collected. The number of instances of a metric
326
+ * will vary as per user set the output granularity level with CUpti_SassMetrics_OutputGranularity value.
327
+ * User need to allocate memory for retriving the SASS data using cuptiSassMetricsFlushData() API.
328
+ *
329
+ * \param Refer \ref CUpti_SassMetricsGetDataProperties_Params
330
+ *
331
+ * \retval CUPTI_SUCCESS
332
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
333
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
334
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called outside the enable/disable range.
335
+ */
336
+ CUptiResult CUPTIAPI cuptiSassMetricsGetDataProperties(CUpti_SassMetricsGetDataProperties_Params* pParams);
337
+
338
+ typedef struct CUpti_SassMetrics_InstanceValue
339
+ {
340
+ // unique id of the metric
341
+ uint64_t metricId;
342
+ // metric value
343
+ uint64_t value;
344
+ } CUpti_SassMetrics_InstanceValue;
345
+ #define CUpti_SassMetrics_InstanceValue_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetrics_InstanceValue, value)
346
+
347
+ typedef struct CUpti_SassMetrics_Data
348
+ {
349
+ /// [in] equal to CUpti_SassMetricsFlushData_Params_STRUCT_SIZE
350
+ size_t structSize;
351
+ /// [in] assign to NULL
352
+ void* pPriv;
353
+ /// [out] Unique cubin id
354
+ uint32_t cubinCrc;
355
+ /// [out] function's unique symbol index in the module.
356
+ uint32_t functionIndex;
357
+ /// [out] The function name
358
+ const char* functionName;
359
+ /// [out] pc offset for the function in a module
360
+ uint32_t pcOffset;
361
+ /// [out] array of size equal to number of instances per metric, which contains the metric ID and metric value.
362
+ CUpti_SassMetrics_InstanceValue* pInstanceValues;
363
+ } CUpti_SassMetrics_Data;
364
+
365
+ typedef struct CUpti_SassMetricsFlushData_Params
366
+ {
367
+ /// [in] equal to CUpti_SassMetricsFlushData_Params_STRUCT_SIZE
368
+ size_t structSize;
369
+ /// [in] assign to NULL
370
+ void* pPriv;
371
+ /// [in] CUDA context on which SASS metric data collection was enabled.
372
+ /// If set NULL, default context will be consider for SASS metric data collection.
373
+ CUcontext ctx;
374
+ /// [in] number of patched instruction record will be retrived, user can call cuptiSassMetricsGetDataProperties()
375
+ /// for getting total number of records available.
376
+ size_t numOfPatchedInstructionRecords;
377
+ /// [in] number of patched instruction record instances for a metric, user can call cuptiSassMetricsGetDataProperties()
378
+ /// for getting total number of instances for each record per metric available.
379
+ size_t numOfInstances;
380
+ /// [out]
381
+ CUpti_SassMetrics_Data* pMetricsData;
382
+ } CUpti_SassMetricsFlushData_Params;
383
+ #define CUpti_SassMetricsFlushData_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsFlushData_Params, numOfInstances)
384
+
385
+ /**
386
+ * \brief Flush SASS metrics data from CUPTI internal buffer to the user buffer.
387
+ * User needs to allocate the buffer for retrieving the data. The number of records collected
388
+ * can be queried using the API cuptiSassMetricsGetDataProperties().
389
+ *
390
+ * \param Refer \ref CUpti_SassMetricsFlushData_Params
391
+ *
392
+ * \retval CUPTI_SUCCESS
393
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
394
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection.
395
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called outside the enable/disable range.
396
+ */
397
+ CUptiResult CUPTIAPI cuptiSassMetricsFlushData(CUpti_SassMetricsFlushData_Params* pParams);
398
+
399
+ /** @} */ /* END CUPTI_SASS_METRICS_API */
400
+
401
+ #if defined(__GNUC__) && defined(CUPTI_LIB)
402
+ #pragma GCC visibility pop
403
+ #endif
404
+
405
+ #ifdef __cplusplus
406
+ } /* extern "C" */
407
+ #endif
408
+
409
+ #endif // _CUPTI_SASS_METRICS_H_
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/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
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/curand_discrete.h ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Copyright 2010-2014 NVIDIA Corporation. All rights reserved.
2
+ *
3
+ * NOTICE TO LICENSEE:
4
+ *
5
+ * The source code and/or documentation ("Licensed Deliverables") are
6
+ * subject to NVIDIA intellectual property rights under U.S. and
7
+ * international Copyright laws.
8
+ *
9
+ * The Licensed Deliverables contained herein are PROPRIETARY and
10
+ * CONFIDENTIAL to NVIDIA and are being provided under the terms and
11
+ * conditions of a form of NVIDIA software license agreement by and
12
+ * between NVIDIA and Licensee ("License Agreement") or electronically
13
+ * accepted by Licensee. Notwithstanding any terms or conditions to
14
+ * the contrary in the License Agreement, reproduction or disclosure
15
+ * of the Licensed Deliverables to any third party without the express
16
+ * written consent of NVIDIA is prohibited.
17
+ *
18
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
19
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
20
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. THEY ARE
21
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
22
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
23
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
24
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
25
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
26
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
27
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
28
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
29
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
30
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
31
+ * OF THESE LICENSED DELIVERABLES.
32
+ *
33
+ * U.S. Government End Users. These Licensed Deliverables are a
34
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
35
+ * 1995), consisting of "commercial computer software" and "commercial
36
+ * computer software documentation" as such terms are used in 48
37
+ * C.F.R. 12.212 (SEPT 1995) and are provided to the U.S. Government
38
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
39
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
40
+ * U.S. Government End Users acquire the Licensed Deliverables with
41
+ * only those rights set forth herein.
42
+ *
43
+ * Any use of the Licensed Deliverables in individual and commercial
44
+ * software must include, in the user documentation and internal
45
+ * comments to the code, the above Disclaimer and U.S. Government End
46
+ * Users Notice.
47
+ */
48
+
49
+ #if !defined(CURANDDISCRETE_H_)
50
+ #define CURANDDISCRETE_H_
51
+
52
+ struct curandDistributionShift_st {
53
+ curandDistribution_t probability;
54
+ curandDistribution_t host_probability;
55
+ unsigned int shift;
56
+ unsigned int length;
57
+ unsigned int host_gen;
58
+ };
59
+
60
+ struct curandHistogramM2_st {
61
+ curandHistogramM2V_t V;
62
+ curandHistogramM2V_t host_V;
63
+ curandHistogramM2K_t K;
64
+ curandHistogramM2K_t host_K;
65
+ unsigned int host_gen;
66
+ };
67
+
68
+
69
+ struct curandDistributionM2Shift_st {
70
+ curandHistogramM2_t histogram;
71
+ curandHistogramM2_t host_histogram;
72
+ unsigned int shift;
73
+ unsigned int length;
74
+ unsigned int host_gen;
75
+ };
76
+
77
+ struct curandDiscreteDistribution_st {
78
+ curandDiscreteDistribution_t self_host_ptr;
79
+ curandDistributionM2Shift_t M2;
80
+ curandDistributionM2Shift_t host_M2;
81
+ double stddev;
82
+ double mean;
83
+ curandMethod_t method;
84
+ unsigned int host_gen;
85
+ };
86
+
87
+ #endif // !defined(CURANDDISCRETE_H_)
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/curand_mrg32k3a.h ADDED
The diff for this file is too large to render. See raw diff
 
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/curand_mtgp32.h ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2010-2014 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
+ #ifndef CURAND_MTGP32_H
51
+ #define CURAND_MTGP32_H
52
+ /*
53
+ * @file curand_mtgp32.h
54
+ *
55
+ * @brief Mersenne Twister for Graphic Processors (mtgp32), which
56
+ * generates 32-bit unsigned integers and single precision floating
57
+ * point numbers based on IEEE 754 format.
58
+ *
59
+ * @author Mutsuo Saito (Hiroshima University)
60
+ * @author Makoto Matsumoto (Hiroshima University)
61
+ *
62
+ */
63
+ /*
64
+ * Copyright (c) 2009, 2010 Mutsuo Saito, Makoto Matsumoto and Hiroshima
65
+ * University. All rights reserved.
66
+ * Copyright (c) 2011 Mutsuo Saito, Makoto Matsumoto, Hiroshima
67
+ * University and University of Tokyo. All rights reserved.
68
+ *
69
+ * Redistribution and use in source and binary forms, with or without
70
+ * modification, are permitted provided that the following conditions are
71
+ * met:
72
+ *
73
+ * * Redistributions of source code must retain the above copyright
74
+ * notice, this list of conditions and the following disclaimer.
75
+ * * Redistributions in binary form must reproduce the above
76
+ * copyright notice, this list of conditions and the following
77
+ * disclaimer in the documentation and/or other materials provided
78
+ * with the distribution.
79
+ * * Neither the name of the Hiroshima University nor the names of
80
+ * its contributors may be used to endorse or promote products
81
+ * derived from this software without specific prior written
82
+ * permission.
83
+ *
84
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
85
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
86
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
87
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
88
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
89
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
90
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
91
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
92
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
93
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
94
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
95
+ */
96
+
97
+
98
+ #define MTGPDC_MEXP 11213
99
+ #define MTGPDC_N 351
100
+ #define MTGPDC_FLOOR_2P 256
101
+ #define MTGPDC_CEIL_2P 512
102
+ #define MTGPDC_PARAM_TABLE mtgp32dc_params_fast_11213
103
+ #define MTGP32_STATE_SIZE 1024
104
+ #define MTGP32_STATE_MASK 1023
105
+ #define CURAND_NUM_MTGP32_PARAMS 200
106
+ #define MEXP 11213
107
+ #define THREAD_NUM MTGPDC_FLOOR_2P
108
+ #define LARGE_SIZE (THREAD_NUM * 3)
109
+ #define TBL_SIZE 16
110
+
111
+ /**
112
+ * \addtogroup DEVICE Device API
113
+ *
114
+ * @{
115
+ */
116
+
117
+ /*
118
+ * \struct MTGP32_PARAMS_FAST_T
119
+ * MTGP32 parameters.
120
+ * Some element is redundant to keep structure simple.
121
+ *
122
+ * \b pos is a pick up position which is selected to have good
123
+ * performance on graphic processors. 3 < \b pos < Q, where Q is a
124
+ * maximum number such that the size of status array - Q is a power of
125
+ * 2. For example, when \b mexp is 44497, size of 32-bit status array
126
+ * is 696, and Q is 184, then \b pos is between 4 and 183. This means
127
+ * 512 parallel calculations is allowed when \b mexp is 44497.
128
+ *
129
+ * \b poly_sha1 is SHA1 digest of the characteristic polynomial of
130
+ * state transition function. SHA1 is calculated based on printing
131
+ * form of the polynomial. This is important when we use parameters
132
+ * generated by the dynamic creator which
133
+ *
134
+ * \b mask This is a mask to make the dimension of state space have
135
+ * just Mersenne Prime. This is redundant.
136
+ */
137
+
138
+ struct mtgp32_params_fast;
139
+
140
+ struct mtgp32_params_fast {
141
+ int mexp; /*< Mersenne exponent. This is redundant. */
142
+ int pos; /*< pick up position. */
143
+ int sh1; /*< shift value 1. 0 < sh1 < 32. */
144
+ int sh2; /*< shift value 2. 0 < sh2 < 32. */
145
+ unsigned int tbl[16]; /*< a small matrix. */
146
+ unsigned int tmp_tbl[16]; /*< a small matrix for tempering. */
147
+ unsigned int flt_tmp_tbl[16]; /*< a small matrix for tempering and
148
+ converting to float. */
149
+ unsigned int mask; /*< This is a mask for state space */
150
+ unsigned char poly_sha1[21]; /*< SHA1 digest */
151
+ };
152
+
153
+ /** \cond UNHIDE_TYPEDEFS */
154
+ typedef struct mtgp32_params_fast mtgp32_params_fast_t;
155
+ /** \endcond */
156
+
157
+ /*
158
+ * Generator Parameters.
159
+ */
160
+ struct mtgp32_kernel_params;
161
+ struct mtgp32_kernel_params {
162
+ unsigned int pos_tbl[CURAND_NUM_MTGP32_PARAMS];
163
+ unsigned int param_tbl[CURAND_NUM_MTGP32_PARAMS][TBL_SIZE];
164
+ unsigned int temper_tbl[CURAND_NUM_MTGP32_PARAMS][TBL_SIZE];
165
+ unsigned int single_temper_tbl[CURAND_NUM_MTGP32_PARAMS][TBL_SIZE];
166
+ unsigned int sh1_tbl[CURAND_NUM_MTGP32_PARAMS];
167
+ unsigned int sh2_tbl[CURAND_NUM_MTGP32_PARAMS];
168
+ unsigned int mask[1];
169
+ };
170
+
171
+ /** \cond UNHIDE_TYPEDEFS */
172
+ typedef struct mtgp32_kernel_params mtgp32_kernel_params_t;
173
+ /** \endcond */
174
+
175
+
176
+
177
+ /*
178
+ * kernel I/O
179
+ * This structure must be initialized before first use.
180
+ */
181
+
182
+ /* MTGP (Mersenne Twister) RNG */
183
+ /* This generator uses the Mersenne Twister algorithm of
184
+ * http://arxiv.org/abs/1005.4973v2
185
+ * Has period 2^11213.
186
+ */
187
+
188
+ /**
189
+ * CURAND MTGP32 state
190
+ */
191
+ struct curandStateMtgp32;
192
+
193
+ struct curandStateMtgp32 {
194
+ unsigned int s[MTGP32_STATE_SIZE];
195
+ int offset;
196
+ int pIdx;
197
+ mtgp32_kernel_params_t * k;
198
+ };
199
+
200
+ /*
201
+ * CURAND MTGP32 state
202
+ */
203
+ /** \cond UNHIDE_TYPEDEFS */
204
+ typedef struct curandStateMtgp32 curandStateMtgp32_t;
205
+ /** \endcond */
206
+
207
+ /** @} */
208
+
209
+ #endif
210
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/curand_mtgp32dc_p_11213.h ADDED
The diff for this file is too large to render. See raw diff
 
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/curand_normal_static.h ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Copyright 2010-2014 NVIDIA Corporation. All rights reserved.
2
+ *
3
+ * NOTICE TO LICENSEE:
4
+ *
5
+ * The source code and/or documentation ("Licensed Deliverables") are
6
+ * subject to NVIDIA intellectual property rights under U.S. and
7
+ * international Copyright laws.
8
+ *
9
+ * The Licensed Deliverables contained herein are PROPRIETARY and
10
+ * CONFIDENTIAL to NVIDIA and are being provided under the terms and
11
+ * conditions of a form of NVIDIA software license agreement by and
12
+ * between NVIDIA and Licensee ("License Agreement") or electronically
13
+ * accepted by Licensee. Notwithstanding any terms or conditions to
14
+ * the contrary in the License Agreement, reproduction or disclosure
15
+ * of the Licensed Deliverables to any third party without the express
16
+ * written consent of NVIDIA is prohibited.
17
+ *
18
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
19
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
20
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. THEY ARE
21
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
22
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
23
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
24
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
25
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
26
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
27
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
28
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
29
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
30
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
31
+ * OF THESE LICENSED DELIVERABLES.
32
+ *
33
+ * U.S. Government End Users. These Licensed Deliverables are a
34
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
35
+ * 1995), consisting of "commercial computer software" and "commercial
36
+ * computer software documentation" as such terms are used in 48
37
+ * C.F.R. 12.212 (SEPT 1995) and are provided to the U.S. Government
38
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
39
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
40
+ * U.S. Government End Users acquire the Licensed Deliverables with
41
+ * only those rights set forth herein.
42
+ *
43
+ * Any use of the Licensed Deliverables in individual and commercial
44
+ * software must include, in the user documentation and internal
45
+ * comments to the code, the above Disclaimer and U.S. Government End
46
+ * Users Notice.
47
+ */
48
+ #ifndef CURAND_NORMAL_STATIC_H
49
+ #define CURAND_NORMAL_STATIC_H
50
+
51
+ #define QUALIFIERS_STATIC __host__ __device__ __forceinline__
52
+
53
+ #include <nv/target>
54
+ #if defined(HOST_HAVE_ERFCINVF)
55
+ #define IF_DEVICE_OR_HAVE_ERFCINVF(t, f) _NV_BLOCK_EXPAND(t)
56
+ #else
57
+ #define IF_DEVICE_OR_HAVE_ERFCINVF(t, f) NV_IF_ELSE_TARGET(NV_IS_DEVICE, t, f)
58
+ #endif
59
+
60
+ QUALIFIERS_STATIC float _curand_normal_icdf(unsigned int x)
61
+ {
62
+ IF_DEVICE_OR_HAVE_ERFCINVF(
63
+ float s = CURAND_SQRT2;
64
+ // Mirror to avoid loss of precision
65
+ if(x > 0x80000000UL) {
66
+ x = 0xffffffffUL - x;
67
+ s = -s;
68
+ }
69
+ float p = x * CURAND_2POW32_INV + (CURAND_2POW32_INV/2.0f);
70
+ // p is in (0, 0.5], 2p is in (0, 1]
71
+ return s * erfcinvf(2.0f * p);
72
+ ,
73
+ x++; //suppress warnings
74
+ return 0.0f;
75
+ )
76
+ }
77
+
78
+ QUALIFIERS_STATIC float _curand_normal_icdf(unsigned long long x)
79
+ {
80
+ IF_DEVICE_OR_HAVE_ERFCINVF(
81
+ unsigned int t = (unsigned int)(x >> 32);
82
+ float s = CURAND_SQRT2;
83
+ // Mirror to avoid loss of precision
84
+ if(t > 0x80000000UL) {
85
+ t = 0xffffffffUL - t;
86
+ s = -s;
87
+ }
88
+ float p = t * CURAND_2POW32_INV + (CURAND_2POW32_INV/2.0f);
89
+ // p is in (0 - 0.5] 2p is in (0 - 1]
90
+ return s * erfcinvf(2.0f * p);
91
+ ,
92
+ x++;
93
+ return 0.0f;
94
+ )
95
+ }
96
+
97
+ QUALIFIERS_STATIC double _curand_normal_icdf_double(unsigned int x)
98
+ {
99
+ IF_DEVICE_OR_HAVE_ERFCINVF(
100
+ double s = CURAND_SQRT2_DOUBLE;
101
+ // Mirror to avoid loss of precision
102
+ if(x > 0x80000000UL) {
103
+ x = 0xffffffffUL - x;
104
+ s = -s;
105
+ }
106
+ double p = x * CURAND_2POW32_INV_DOUBLE + (CURAND_2POW32_INV_DOUBLE/2.0);
107
+ // p is in (0 - 0.5] 2p is in (0 - 1]
108
+ return s * erfcinv(2.0 * p);
109
+ ,
110
+ x++;
111
+ return 0.0;
112
+ )
113
+ }
114
+
115
+ QUALIFIERS_STATIC double _curand_normal_icdf_double(unsigned long long x)
116
+ {
117
+ IF_DEVICE_OR_HAVE_ERFCINVF(
118
+ double s = CURAND_SQRT2_DOUBLE;
119
+ x >>= 11;
120
+ // Mirror to avoid loss of precision
121
+ if(x > 0x10000000000000UL) {
122
+ x = 0x1fffffffffffffUL - x;
123
+ s = -s;
124
+ }
125
+ double p = x * CURAND_2POW53_INV_DOUBLE + (CURAND_2POW53_INV_DOUBLE/2.0);
126
+ // p is in (0 - 0.5] 2p is in (0 - 1]
127
+ return s * erfcinv(2.0 * p);
128
+ ,
129
+ x++;
130
+ return 0.0;
131
+ )
132
+ }
133
+ #undef QUALIFIERS_STATIC
134
+ #endif
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cusolverDn.h ADDED
The diff for this file is too large to render. See raw diff
 
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/cusolverMg.h ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2019 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(CUSOLVERMG_H_)
51
+ #define CUSOLVERMG_H_
52
+
53
+ #include <stdint.h>
54
+ #include "cusolverDn.h"
55
+
56
+ #if defined(__cplusplus)
57
+ extern "C" {
58
+ #endif /* __cplusplus */
59
+
60
+ struct cusolverMgContext;
61
+ typedef struct cusolverMgContext *cusolverMgHandle_t;
62
+
63
+ /**
64
+ * \beief This enum decides how 1D device Ids (or process ranks) get mapped to
65
+ * a 2D grid.
66
+ */
67
+ typedef enum {
68
+
69
+ CUDALIBMG_GRID_MAPPING_ROW_MAJOR = 1,
70
+ CUDALIBMG_GRID_MAPPING_COL_MAJOR = 0
71
+
72
+ } cusolverMgGridMapping_t;
73
+
74
+ /** \brief Opaque structure of the distributed grid */
75
+ typedef void *cudaLibMgGrid_t;
76
+ /** \brief Opaque structure of the distributed matrix descriptor */
77
+ typedef void *cudaLibMgMatrixDesc_t;
78
+
79
+ cusolverStatus_t CUSOLVERAPI cusolverMgCreate(cusolverMgHandle_t *handle);
80
+
81
+ cusolverStatus_t CUSOLVERAPI cusolverMgDestroy(cusolverMgHandle_t handle);
82
+
83
+ cusolverStatus_t CUSOLVERAPI cusolverMgDeviceSelect(
84
+ cusolverMgHandle_t handle,
85
+ int nbDevices,
86
+ int deviceId[]);
87
+
88
+ /**
89
+ * \brief Allocates resources related to the shared memory device grid.
90
+ * \param[out] grid the opaque data strcuture that holds the grid
91
+ * \param[in] numRowDevices number of devices in the row
92
+ * \param[in] numColDevices number of devices in the column
93
+ * \param[in] deviceId This array of size height * width stores the
94
+ * device-ids of the 2D grid; each entry must correspond to a valid
95
+ * gpu or to -1 (denoting CPU). \param[in] mapping whether the 2D grid is in
96
+ * row/column major \returns the status code
97
+ */
98
+ cusolverStatus_t CUSOLVERAPI cusolverMgCreateDeviceGrid(
99
+ cudaLibMgGrid_t * grid,
100
+ int32_t numRowDevices,
101
+ int32_t numColDevices,
102
+ const int32_t deviceId[],
103
+ cusolverMgGridMapping_t mapping);
104
+
105
+ /**
106
+ * \brief Releases the allocated resources related to the distributed grid.
107
+ * \param[in] grid the opaque data strcuture that holds the distributed grid
108
+ * \returns the status code
109
+ */
110
+ cusolverStatus_t CUSOLVERAPI cusolverMgDestroyGrid(cudaLibMgGrid_t grid);
111
+
112
+ /**
113
+ * \brief Allocates resources related to the distributed matrix descriptor.
114
+ * \param[out] desc the opaque data strcuture that holds the descriptor
115
+ * \param[in] numRows number of total rows
116
+ * \param[in] numCols number of total columns
117
+ * \param[in] rowBlockSize row block size
118
+ * \param[in] colBlockSize column block size
119
+ * \param[in] dataType the data type of each element in cudaDataType
120
+ * \param[in] grid the opaque data structure of the distributed grid
121
+ * \returns the status code
122
+ */
123
+ cusolverStatus_t CUSOLVERAPI cusolverMgCreateMatrixDesc(
124
+ cudaLibMgMatrixDesc_t *desc,
125
+ int64_t numRows,
126
+ int64_t numCols,
127
+ int64_t rowBlockSize,
128
+ int64_t colBlockSize,
129
+ cudaDataType dataType,
130
+ const cudaLibMgGrid_t grid);
131
+
132
+ /**
133
+ * \brief Releases the allocated resources related to the distributed matrix
134
+ * descriptor. \param[in] desc the opaque data strcuture that holds the
135
+ * descriptor \returns the status code
136
+ */
137
+ cusolverStatus_t CUSOLVERAPI
138
+ cusolverMgDestroyMatrixDesc(cudaLibMgMatrixDesc_t desc);
139
+
140
+ cusolverStatus_t CUSOLVERAPI cusolverMgSyevd_bufferSize(
141
+ cusolverMgHandle_t handle,
142
+ cusolverEigMode_t jobz,
143
+ cublasFillMode_t uplo,
144
+ int N,
145
+ void * array_d_A[],
146
+ int IA,
147
+ int JA,
148
+ cudaLibMgMatrixDesc_t descrA,
149
+ void * W,
150
+ cudaDataType dataTypeW,
151
+ cudaDataType computeType,
152
+ int64_t * lwork);
153
+
154
+ cusolverStatus_t CUSOLVERAPI cusolverMgSyevd(
155
+ cusolverMgHandle_t handle,
156
+ cusolverEigMode_t jobz,
157
+ cublasFillMode_t uplo,
158
+ int N,
159
+ void * array_d_A[],
160
+ int IA,
161
+ int JA,
162
+ cudaLibMgMatrixDesc_t descrA,
163
+ void * W,
164
+ cudaDataType dataTypeW,
165
+ cudaDataType computeType,
166
+ void * array_d_work[],
167
+ int64_t lwork,
168
+ int * info);
169
+
170
+ cusolverStatus_t CUSOLVERAPI cusolverMgGetrf_bufferSize(
171
+ cusolverMgHandle_t handle,
172
+ int M,
173
+ int N,
174
+ void * array_d_A[],
175
+ int IA,
176
+ int JA,
177
+ cudaLibMgMatrixDesc_t descrA,
178
+ int * array_d_IPIV[],
179
+ cudaDataType computeType,
180
+ int64_t * lwork);
181
+
182
+ cusolverStatus_t CUSOLVERAPI cusolverMgGetrf(
183
+ cusolverMgHandle_t handle,
184
+ int M,
185
+ int N,
186
+ void * array_d_A[],
187
+ int IA,
188
+ int JA,
189
+ cudaLibMgMatrixDesc_t descrA,
190
+ int * array_d_IPIV[],
191
+ cudaDataType computeType,
192
+ void * array_d_work[],
193
+ int64_t lwork,
194
+ int * info);
195
+
196
+ cusolverStatus_t CUSOLVERAPI cusolverMgGetrs_bufferSize(
197
+ cusolverMgHandle_t handle,
198
+ cublasOperation_t TRANS,
199
+ int N,
200
+ int NRHS,
201
+ void * array_d_A[],
202
+ int IA,
203
+ int JA,
204
+ cudaLibMgMatrixDesc_t descrA,
205
+ int * array_d_IPIV[],
206
+ void * array_d_B[],
207
+ int IB,
208
+ int JB,
209
+ cudaLibMgMatrixDesc_t descrB,
210
+ cudaDataType computeType,
211
+ int64_t * lwork);
212
+
213
+ cusolverStatus_t CUSOLVERAPI cusolverMgGetrs(
214
+ cusolverMgHandle_t handle,
215
+ cublasOperation_t TRANS,
216
+ int N,
217
+ int NRHS,
218
+ void * array_d_A[],
219
+ int IA,
220
+ int JA,
221
+ cudaLibMgMatrixDesc_t descrA,
222
+ int * array_d_IPIV[],
223
+ void * array_d_B[],
224
+ int IB,
225
+ int JB,
226
+ cudaLibMgMatrixDesc_t descrB,
227
+ cudaDataType computeType,
228
+ void * array_d_work[],
229
+ int64_t lwork,
230
+ int * info);
231
+
232
+ cusolverStatus_t CUSOLVERAPI cusolverMgPotrf_bufferSize(
233
+ cusolverMgHandle_t handle,
234
+ cublasFillMode_t uplo,
235
+ int N,
236
+ void * array_d_A[],
237
+ int IA,
238
+ int JA,
239
+ cudaLibMgMatrixDesc_t descrA,
240
+ cudaDataType computeType,
241
+ int64_t * lwork);
242
+
243
+ cusolverStatus_t CUSOLVERAPI cusolverMgPotrf(
244
+ cusolverMgHandle_t handle,
245
+ cublasFillMode_t uplo,
246
+ int N,
247
+ void * array_d_A[],
248
+ int IA,
249
+ int JA,
250
+ cudaLibMgMatrixDesc_t descrA,
251
+ cudaDataType computeType,
252
+ void * array_d_work[],
253
+ int64_t lwork,
254
+ int * h_info);
255
+
256
+ cusolverStatus_t CUSOLVERAPI cusolverMgPotrs_bufferSize(
257
+ cusolverMgHandle_t handle,
258
+ cublasFillMode_t uplo,
259
+ int n,
260
+ int nrhs,
261
+ void * array_d_A[],
262
+ int IA,
263
+ int JA,
264
+ cudaLibMgMatrixDesc_t descrA,
265
+ void * array_d_B[],
266
+ int IB,
267
+ int JB,
268
+ cudaLibMgMatrixDesc_t descrB,
269
+ cudaDataType computeType,
270
+ int64_t * lwork);
271
+
272
+ cusolverStatus_t CUSOLVERAPI cusolverMgPotrs(
273
+ cusolverMgHandle_t handle,
274
+ cublasFillMode_t uplo,
275
+ int n,
276
+ int nrhs,
277
+ void * array_d_A[],
278
+ int IA,
279
+ int JA,
280
+ cudaLibMgMatrixDesc_t descrA,
281
+ void * array_d_B[],
282
+ int IB,
283
+ int JB,
284
+ cudaLibMgMatrixDesc_t descrB,
285
+ cudaDataType computeType,
286
+ void * array_d_work[],
287
+ int64_t lwork,
288
+ int * h_info);
289
+
290
+ cusolverStatus_t CUSOLVERAPI cusolverMgPotri_bufferSize(
291
+ cusolverMgHandle_t handle,
292
+ cublasFillMode_t uplo,
293
+ int N,
294
+ void * array_d_A[],
295
+ int IA,
296
+ int JA,
297
+ cudaLibMgMatrixDesc_t descrA,
298
+ cudaDataType computeType,
299
+ int64_t * lwork);
300
+
301
+ cusolverStatus_t CUSOLVERAPI cusolverMgPotri(
302
+ cusolverMgHandle_t handle,
303
+ cublasFillMode_t uplo,
304
+ int N,
305
+ void * array_d_A[],
306
+ int IA,
307
+ int JA,
308
+ cudaLibMgMatrixDesc_t descrA,
309
+ cudaDataType computeType,
310
+ void * array_d_work[],
311
+ int64_t lwork,
312
+ int * h_info);
313
+
314
+ #if defined(__cplusplus)
315
+ }
316
+ #endif /* __cplusplus */
317
+
318
+ #endif // CUSOLVERMG_H_
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/device_double_functions.h ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 1993-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(__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__)
51
+ #if defined(_MSC_VER)
52
+ #pragma message("device_double_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead.")
53
+ #else
54
+ #warning "device_double_functions.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead."
55
+ #endif
56
+ #define __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__
57
+ #define __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_DEVICE_DOUBLE_FUNCTIONS_H_WRAPPER__
58
+ #endif
59
+
60
+ #include "crt/device_double_functions.h"
61
+
62
+ #if defined(__UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_DEVICE_DOUBLE_FUNCTIONS_H_WRAPPER__)
63
+ #undef __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__
64
+ #undef __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_DEVICE_DOUBLE_FUNCTIONS_H_WRAPPER__
65
+ #endif
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/driver_types.h ADDED
The diff for this file is too large to render. See raw diff
 
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/generated_cuda_vdpau_interop_meta.h ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is generated. Any changes you make will be lost during the next clean build.
2
+
3
+ // CUDA public interface, for type definitions and api function prototypes
4
+ #include "cuda_vdpau_interop.h"
5
+
6
+ // *************************************************************************
7
+ // Definitions of structs to hold parameters for each function
8
+ // *************************************************************************
9
+
10
+ // Currently used parameter trace structures
11
+ typedef struct cudaVDPAUGetDevice_v3020_params_st {
12
+ int *device;
13
+ VdpDevice vdpDevice;
14
+ VdpGetProcAddress *vdpGetProcAddress;
15
+ } cudaVDPAUGetDevice_v3020_params;
16
+
17
+ typedef struct cudaVDPAUSetVDPAUDevice_v3020_params_st {
18
+ int device;
19
+ VdpDevice vdpDevice;
20
+ VdpGetProcAddress *vdpGetProcAddress;
21
+ } cudaVDPAUSetVDPAUDevice_v3020_params;
22
+
23
+ typedef struct cudaGraphicsVDPAURegisterVideoSurface_v3020_params_st {
24
+ struct cudaGraphicsResource **resource;
25
+ VdpVideoSurface vdpSurface;
26
+ unsigned int flags;
27
+ } cudaGraphicsVDPAURegisterVideoSurface_v3020_params;
28
+
29
+ typedef struct cudaGraphicsVDPAURegisterOutputSurface_v3020_params_st {
30
+ struct cudaGraphicsResource **resource;
31
+ VdpOutputSurface vdpSurface;
32
+ unsigned int flags;
33
+ } cudaGraphicsVDPAURegisterOutputSurface_v3020_params;
34
+
35
+ // Parameter trace structures for removed functions
36
+
37
+
38
+ // End of parameter trace structures
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/generated_cudart_removed_meta.h ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is generated. Any changes you make will be lost during the next clean build.
2
+
3
+ // CUDA public interface, for type definitions and api function prototypes
4
+ #include "cudart_removed.h"
5
+
6
+ // *************************************************************************
7
+ // Definitions of structs to hold parameters for each function
8
+ // *************************************************************************
9
+
10
+ // Currently used parameter trace structures
11
+ typedef struct cudaStreamDestroy_v3020_params_st {
12
+ cudaStream_t stream;
13
+ } cudaStreamDestroy_v3020_params;
14
+
15
+ typedef struct cudaOccupancyMaxActiveBlocksPerMultiprocessor_v6000_params_st {
16
+ int *numBlocks;
17
+ const void *func;
18
+ size_t numDynamicSmemBytes;
19
+ } cudaOccupancyMaxActiveBlocksPerMultiprocessor_v6000_params;
20
+
21
+ typedef struct cudaConfigureCall_v3020_params_st {
22
+ dim3 gridDim;
23
+ dim3 blockDim;
24
+ size_t sharedMem __dv;
25
+ cudaStream_t stream __dv;
26
+ } cudaConfigureCall_v3020_params;
27
+
28
+ typedef struct cudaSetupArgument_v3020_params_st {
29
+ const void *arg;
30
+ size_t size;
31
+ size_t offset;
32
+ } cudaSetupArgument_v3020_params;
33
+
34
+ typedef struct cudaLaunch_v3020_params_st {
35
+ const void *func;
36
+ } cudaLaunch_v3020_params;
37
+
38
+ typedef struct cudaLaunch_ptsz_v7000_params_st {
39
+ const void *func;
40
+ } cudaLaunch_ptsz_v7000_params;
41
+
42
+ typedef struct cudaStreamSetFlags_v10200_params_st {
43
+ cudaStream_t hStream;
44
+ unsigned int flags;
45
+ } cudaStreamSetFlags_v10200_params;
46
+
47
+ typedef struct cudaStreamSetFlags_ptsz_v10200_params_st {
48
+ cudaStream_t hStream;
49
+ unsigned int flags;
50
+ } cudaStreamSetFlags_ptsz_v10200_params;
51
+
52
+ typedef struct cudaProfilerInitialize_v4000_params_st {
53
+ const char *configFile;
54
+ const char *outputFile;
55
+ cudaOutputMode_t outputMode;
56
+ } cudaProfilerInitialize_v4000_params;
57
+
58
+ typedef struct cudaThreadSetLimit_v3020_params_st {
59
+ enum cudaLimit limit;
60
+ size_t value;
61
+ } cudaThreadSetLimit_v3020_params;
62
+
63
+ typedef struct cudaThreadGetLimit_v3020_params_st {
64
+ size_t *pValue;
65
+ enum cudaLimit limit;
66
+ } cudaThreadGetLimit_v3020_params;
67
+
68
+ typedef struct cudaThreadGetCacheConfig_v3020_params_st {
69
+ enum cudaFuncCache *pCacheConfig;
70
+ } cudaThreadGetCacheConfig_v3020_params;
71
+
72
+ typedef struct cudaThreadSetCacheConfig_v3020_params_st {
73
+ enum cudaFuncCache cacheConfig;
74
+ } cudaThreadSetCacheConfig_v3020_params;
75
+
76
+ typedef struct cudaSetDoubleForDevice_v3020_params_st {
77
+ double *d;
78
+ } cudaSetDoubleForDevice_v3020_params;
79
+
80
+ typedef struct cudaSetDoubleForHost_v3020_params_st {
81
+ double *d;
82
+ } cudaSetDoubleForHost_v3020_params;
83
+
84
+ typedef struct cudaCreateTextureObject_v2_v11080_params_st {
85
+ cudaTextureObject_t *pTexObject;
86
+ const struct cudaResourceDesc *pResDesc;
87
+ const struct cudaTextureDesc *pTexDesc;
88
+ const struct cudaResourceViewDesc *pResViewDesc;
89
+ } cudaCreateTextureObject_v2_v11080_params;
90
+
91
+ typedef struct cudaGetTextureObjectTextureDesc_v2_v11080_params_st {
92
+ struct cudaTextureDesc *pTexDesc;
93
+ cudaTextureObject_t texObject;
94
+ } cudaGetTextureObjectTextureDesc_v2_v11080_params;
95
+
96
+ typedef struct cudaBindTexture_v3020_params_st {
97
+ size_t *offset;
98
+ const struct textureReference *texref;
99
+ const void *devPtr;
100
+ const struct cudaChannelFormatDesc *desc;
101
+ size_t size __dv;
102
+ } cudaBindTexture_v3020_params;
103
+
104
+ typedef struct cudaBindTexture2D_v3020_params_st {
105
+ size_t *offset;
106
+ const struct textureReference *texref;
107
+ const void *devPtr;
108
+ const struct cudaChannelFormatDesc *desc;
109
+ size_t width;
110
+ size_t height;
111
+ size_t pitch;
112
+ } cudaBindTexture2D_v3020_params;
113
+
114
+ typedef struct cudaBindTextureToArray_v3020_params_st {
115
+ const struct textureReference *texref;
116
+ cudaArray_const_t array;
117
+ const struct cudaChannelFormatDesc *desc;
118
+ } cudaBindTextureToArray_v3020_params;
119
+
120
+ typedef struct cudaBindTextureToMipmappedArray_v5000_params_st {
121
+ const struct textureReference *texref;
122
+ cudaMipmappedArray_const_t mipmappedArray;
123
+ const struct cudaChannelFormatDesc *desc;
124
+ } cudaBindTextureToMipmappedArray_v5000_params;
125
+
126
+ typedef struct cudaUnbindTexture_v3020_params_st {
127
+ const struct textureReference *texref;
128
+ } cudaUnbindTexture_v3020_params;
129
+
130
+ typedef struct cudaGetTextureAlignmentOffset_v3020_params_st {
131
+ size_t *offset;
132
+ const struct textureReference *texref;
133
+ } cudaGetTextureAlignmentOffset_v3020_params;
134
+
135
+ typedef struct cudaGetTextureReference_v3020_params_st {
136
+ const struct textureReference **texref;
137
+ const void *symbol;
138
+ } cudaGetTextureReference_v3020_params;
139
+
140
+ typedef struct cudaBindSurfaceToArray_v3020_params_st {
141
+ const struct surfaceReference *surfref;
142
+ cudaArray_const_t array;
143
+ const struct cudaChannelFormatDesc *desc;
144
+ } cudaBindSurfaceToArray_v3020_params;
145
+
146
+ typedef struct cudaGetSurfaceReference_v3020_params_st {
147
+ const struct surfaceReference **surfref;
148
+ const void *symbol;
149
+ } cudaGetSurfaceReference_v3020_params;
150
+
151
+ typedef struct cudaGraphInstantiate_v10000_params_st {
152
+ cudaGraphExec_t *pGraphExec;
153
+ cudaGraph_t graph;
154
+ cudaGraphNode_t *pErrorNode;
155
+ char *pLogBuffer;
156
+ size_t bufferSize;
157
+ } cudaGraphInstantiate_v10000_params;
158
+
159
+ // Parameter trace structures for removed functions
160
+
161
+
162
+ // End of parameter trace structures
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/host_config.h ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 1993-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(__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__)
51
+ #if defined(_MSC_VER)
52
+ #pragma message("host_config.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead.")
53
+ #else
54
+ #warning "host_config.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead."
55
+ #endif
56
+ #define __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__
57
+ #define __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_HOST_CONFIG_H_WRAPPER__
58
+ #endif
59
+
60
+ #include "crt/host_config.h"
61
+
62
+ #if defined(__UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_HOST_CONFIG_H_WRAPPER__)
63
+ #undef __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__
64
+ #undef __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_HOST_CONFIG_H_WRAPPER__
65
+ #endif
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/library_types.h ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 1993-2015 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(__LIBRARY_TYPES_H__)
51
+ #define __LIBRARY_TYPES_H__
52
+
53
+
54
+
55
+ typedef enum cudaDataType_t
56
+ {
57
+ CUDA_R_16F = 2, /* real as a half */
58
+ CUDA_C_16F = 6, /* complex as a pair of half numbers */
59
+ CUDA_R_16BF = 14, /* real as a nv_bfloat16 */
60
+ CUDA_C_16BF = 15, /* complex as a pair of nv_bfloat16 numbers */
61
+ CUDA_R_32F = 0, /* real as a float */
62
+ CUDA_C_32F = 4, /* complex as a pair of float numbers */
63
+ CUDA_R_64F = 1, /* real as a double */
64
+ CUDA_C_64F = 5, /* complex as a pair of double numbers */
65
+ CUDA_R_4I = 16, /* real as a signed 4-bit int */
66
+ CUDA_C_4I = 17, /* complex as a pair of signed 4-bit int numbers */
67
+ CUDA_R_4U = 18, /* real as a unsigned 4-bit int */
68
+ CUDA_C_4U = 19, /* complex as a pair of unsigned 4-bit int numbers */
69
+ CUDA_R_8I = 3, /* real as a signed 8-bit int */
70
+ CUDA_C_8I = 7, /* complex as a pair of signed 8-bit int numbers */
71
+ CUDA_R_8U = 8, /* real as a unsigned 8-bit int */
72
+ CUDA_C_8U = 9, /* complex as a pair of unsigned 8-bit int numbers */
73
+ CUDA_R_16I = 20, /* real as a signed 16-bit int */
74
+ CUDA_C_16I = 21, /* complex as a pair of signed 16-bit int numbers */
75
+ CUDA_R_16U = 22, /* real as a unsigned 16-bit int */
76
+ CUDA_C_16U = 23, /* complex as a pair of unsigned 16-bit int numbers */
77
+ CUDA_R_32I = 10, /* real as a signed 32-bit int */
78
+ CUDA_C_32I = 11, /* complex as a pair of signed 32-bit int numbers */
79
+ CUDA_R_32U = 12, /* real as a unsigned 32-bit int */
80
+ CUDA_C_32U = 13, /* complex as a pair of unsigned 32-bit int numbers */
81
+ CUDA_R_64I = 24, /* real as a signed 64-bit int */
82
+ CUDA_C_64I = 25, /* complex as a pair of signed 64-bit int numbers */
83
+ CUDA_R_64U = 26, /* real as a unsigned 64-bit int */
84
+ CUDA_C_64U = 27, /* complex as a pair of unsigned 64-bit int numbers */
85
+ CUDA_R_8F_E4M3 = 28, /* real as a nv_fp8_e4m3 */
86
+ CUDA_R_8F_E5M2 = 29, /* real as a nv_fp8_e5m2 */
87
+ } cudaDataType;
88
+
89
+
90
+ typedef enum libraryPropertyType_t
91
+ {
92
+ MAJOR_VERSION,
93
+ MINOR_VERSION,
94
+ PATCH_LEVEL
95
+ } libraryPropertyType;
96
+
97
+
98
+ #ifndef __cplusplus
99
+ typedef enum cudaDataType_t cudaDataType_t;
100
+ typedef enum libraryPropertyType_t libraryPropertyType_t;
101
+ #endif
102
+
103
+ #endif /* !__LIBRARY_TYPES_H__ */
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/math_constants.h ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 1993-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(__MATH_CONSTANTS_H__)
51
+ #define __MATH_CONSTANTS_H__
52
+
53
+ /* single precision constants */
54
+ #define CUDART_INF_F __int_as_float(0x7f800000U)
55
+ #define CUDART_NAN_F __int_as_float(0x7fffffffU)
56
+ #define CUDART_MIN_DENORM_F __int_as_float(0x00000001U)
57
+ #define CUDART_MAX_NORMAL_F __int_as_float(0x7f7fffffU)
58
+ #define CUDART_NEG_ZERO_F __int_as_float(0x80000000U)
59
+ #define CUDART_ZERO_F 0.0F
60
+ #define CUDART_ONE_F 1.0F
61
+ #define CUDART_SQRT_HALF_F 0.707106781F
62
+ #define CUDART_SQRT_HALF_HI_F 0.707106781F
63
+ #define CUDART_SQRT_HALF_LO_F 1.210161749e-08F
64
+ #define CUDART_SQRT_TWO_F 1.414213562F
65
+ #define CUDART_THIRD_F 0.333333333F
66
+ #define CUDART_PIO4_F 0.785398163F
67
+ #define CUDART_PIO2_F 1.570796327F
68
+ #define CUDART_3PIO4_F 2.356194490F
69
+ #define CUDART_2_OVER_PI_F 0.636619772F
70
+ #define CUDART_SQRT_2_OVER_PI_F 0.797884561F
71
+ #define CUDART_PI_F 3.141592654F
72
+ #define CUDART_L2E_F 1.442695041F
73
+ #define CUDART_L2T_F 3.321928094F
74
+ #define CUDART_LG2_F 0.301029996F
75
+ #define CUDART_LGE_F 0.434294482F
76
+ #define CUDART_LN2_F 0.693147181F
77
+ #define CUDART_LNT_F 2.302585093F
78
+ #define CUDART_LNPI_F 1.144729886F
79
+ #define CUDART_TWO_TO_M126_F 1.175494351e-38F
80
+ #define CUDART_TWO_TO_126_F 8.507059173e37F
81
+ #define CUDART_NORM_HUGE_F 3.402823466e38F
82
+ #define CUDART_TWO_TO_23_F 8388608.0F
83
+ #define CUDART_TWO_TO_24_F 16777216.0F
84
+ #define CUDART_TWO_TO_31_F 2147483648.0F
85
+ #define CUDART_TWO_TO_32_F 4294967296.0F
86
+ #define CUDART_REMQUO_BITS_F 3U
87
+ #define CUDART_REMQUO_MASK_F (~((~0U)<<CUDART_REMQUO_BITS_F))
88
+ #define CUDART_TRIG_PLOSS_F 105615.0F
89
+
90
+ /* double precision constants */
91
+ #define CUDART_INF __longlong_as_double(0x7ff0000000000000ULL)
92
+ #define CUDART_NAN __longlong_as_double(0xfff8000000000000ULL)
93
+ #define CUDART_NEG_ZERO __longlong_as_double(0x8000000000000000ULL)
94
+ #define CUDART_MIN_DENORM __longlong_as_double(0x0000000000000001ULL)
95
+ #define CUDART_ZERO 0.0
96
+ #define CUDART_ONE 1.0
97
+ #define CUDART_SQRT_TWO 1.4142135623730951e+0
98
+ #define CUDART_SQRT_HALF 7.0710678118654757e-1
99
+ #define CUDART_SQRT_HALF_HI 7.0710678118654757e-1
100
+ #define CUDART_SQRT_HALF_LO (-4.8336466567264567e-17)
101
+ #define CUDART_THIRD 3.3333333333333333e-1
102
+ #define CUDART_TWOTHIRD 6.6666666666666667e-1
103
+ #define CUDART_PIO4 7.8539816339744828e-1
104
+ #define CUDART_PIO4_HI 7.8539816339744828e-1
105
+ #define CUDART_PIO4_LO 3.0616169978683830e-17
106
+ #define CUDART_PIO2 1.5707963267948966e+0
107
+ #define CUDART_PIO2_HI 1.5707963267948966e+0
108
+ #define CUDART_PIO2_LO 6.1232339957367660e-17
109
+ #define CUDART_3PIO4 2.3561944901923448e+0
110
+ #define CUDART_2_OVER_PI 6.3661977236758138e-1
111
+ #define CUDART_PI 3.1415926535897931e+0
112
+ #define CUDART_PI_HI 3.1415926535897931e+0
113
+ #define CUDART_PI_LO 1.2246467991473532e-16
114
+ #define CUDART_SQRT_2PI 2.5066282746310007e+0
115
+ #define CUDART_SQRT_2PI_HI 2.5066282746310007e+0
116
+ #define CUDART_SQRT_2PI_LO (-1.8328579980459167e-16)
117
+ #define CUDART_SQRT_PIO2 1.2533141373155003e+0
118
+ #define CUDART_SQRT_PIO2_HI 1.2533141373155003e+0
119
+ #define CUDART_SQRT_PIO2_LO (-9.1642899902295834e-17)
120
+ #define CUDART_SQRT_2OPI 7.9788456080286536e-1
121
+ #define CUDART_L2E 1.4426950408889634e+0
122
+ #define CUDART_L2E_HI 1.4426950408889634e+0
123
+ #define CUDART_L2E_LO 2.0355273740931033e-17
124
+ #define CUDART_L2T 3.3219280948873622e+0
125
+ #define CUDART_LG2 3.0102999566398120e-1
126
+ #define CUDART_LG2_HI 3.0102999566398120e-1
127
+ #define CUDART_LG2_LO (-2.8037281277851704e-18)
128
+ #define CUDART_LGE 4.3429448190325182e-1
129
+ #define CUDART_LGE_HI 4.3429448190325182e-1
130
+ #define CUDART_LGE_LO 1.09831965021676510e-17
131
+ #define CUDART_LN2 6.9314718055994529e-1
132
+ #define CUDART_LN2_HI 6.9314718055994529e-1
133
+ #define CUDART_LN2_LO 2.3190468138462996e-17
134
+ #define CUDART_LNT 2.3025850929940459e+0
135
+ #define CUDART_LNT_HI 2.3025850929940459e+0
136
+ #define CUDART_LNT_LO (-2.1707562233822494e-16)
137
+ #define CUDART_LNPI 1.1447298858494002e+0
138
+ #define CUDART_LN2_X_1024 7.0978271289338397e+2
139
+ #define CUDART_LN2_X_1025 7.1047586007394398e+2
140
+ #define CUDART_LN2_X_1075 7.4513321910194122e+2
141
+ #define CUDART_LG2_X_1024 3.0825471555991675e+2
142
+ #define CUDART_LG2_X_1075 3.2360724533877976e+2
143
+ #define CUDART_TWO_TO_23 8388608.0
144
+ #define CUDART_TWO_TO_52 4503599627370496.0
145
+ #define CUDART_TWO_TO_53 9007199254740992.0
146
+ #define CUDART_TWO_TO_54 18014398509481984.0
147
+ #define CUDART_TWO_TO_M54 5.5511151231257827e-17
148
+ #define CUDART_TWO_TO_M1022 2.22507385850720140e-308
149
+ #define CUDART_TRIG_PLOSS 2147483648.0
150
+ #define CUDART_DBL2INT_CVT 6755399441055744.0
151
+
152
+ #endif /* !__MATH_CONSTANTS_H__ */
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/nvml/include/nppi.h ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Copyright 2009-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ *
3
+ * NOTICE TO LICENSEE:
4
+ *
5
+ * The source code and/or documentation ("Licensed Deliverables") are
6
+ * subject to NVIDIA intellectual property rights under U.S. and
7
+ * international Copyright laws.
8
+ *
9
+ * The Licensed Deliverables contained herein are PROPRIETARY and
10
+ * CONFIDENTIAL to NVIDIA and are being provided under the terms and
11
+ * conditions of a form of NVIDIA software license agreement by and
12
+ * between NVIDIA and Licensee ("License Agreement") or electronically
13
+ * accepted by Licensee. Notwithstanding any terms or conditions to
14
+ * the contrary in the License Agreement, reproduction or disclosure
15
+ * of the Licensed Deliverables to any third party without the express
16
+ * written consent of NVIDIA is prohibited.
17
+ *
18
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
19
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
20
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. THEY ARE
21
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
22
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
23
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
24
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
25
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
26
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
27
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
28
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
29
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
30
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
31
+ * OF THESE LICENSED DELIVERABLES.
32
+ *
33
+ * U.S. Government End Users. These Licensed Deliverables are a
34
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
35
+ * 1995), consisting of "commercial computer software" and "commercial
36
+ * computer software documentation" as such terms are used in 48
37
+ * C.F.R. 12.212 (SEPT 1995) and are provided to the U.S. Government
38
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
39
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
40
+ * U.S. Government End Users acquire the Licensed Deliverables with
41
+ * only those rights set forth herein.
42
+ *
43
+ * Any use of the Licensed Deliverables in individual and commercial
44
+ * software must include, in the user documentation and internal
45
+ * comments to the code, the above Disclaimer and U.S. Government End
46
+ * Users Notice.
47
+ */
48
+ #ifndef NV_NPPI_H
49
+ #define NV_NPPI_H
50
+
51
+ /**
52
+ * \file nppi.h
53
+ * NPP Image Processing Functionality.
54
+ */
55
+
56
+ #include "nppdefs.h"
57
+
58
+ #ifdef __cplusplus
59
+ #ifdef NPP_PLUS
60
+ using namespace nppPlusV;
61
+ #else
62
+ extern "C" {
63
+ #endif
64
+ #endif
65
+
66
+ /** @defgroup nppi NPP Image Processing
67
+ * The set of image processing functions available in the library.
68
+ * @{
69
+ */
70
+ #ifdef NPP_PLUS
71
+
72
+ #include "nppPlus/nppiPlus_support_functions.h"
73
+ #include "nppPlus/nppiPlus_data_exchange_and_initialization.h"
74
+ #include "nppPlus/nppiPlus_arithmetic_and_logical_operations.h"
75
+ #include "nppPlus/nppiPlus_color_conversion.h"
76
+ #include "nppPlus/nppiPlus_threshold_and_compare_operations.h"
77
+ #include "nppPlus/nppiPlus_morphological_operations.h"
78
+ #include "nppPlus/nppiPlus_filtering_functions.h"
79
+ #include "nppPlus/nppiPlus_statistics_functions.h"
80
+ #include "nppPlus/nppiPlus_linear_transforms.h"
81
+ #include "nppPlus/nppiPlus_geometry_transforms.h"
82
+
83
+ #else
84
+
85
+ #include "nppi_support_functions.h"
86
+ #include "nppi_data_exchange_and_initialization.h"
87
+ #include "nppi_arithmetic_and_logical_operations.h"
88
+ #include "nppi_color_conversion.h"
89
+ #include "nppi_threshold_and_compare_operations.h"
90
+ #include "nppi_morphological_operations.h"
91
+ #include "nppi_filtering_functions.h"
92
+ #include "nppi_statistics_functions.h"
93
+ #include "nppi_linear_transforms.h"
94
+ #include "nppi_geometry_transforms.h"
95
+
96
+ #endif
97
+
98
+ /** @} end of Image Processing module */
99
+
100
+ #ifdef __cplusplus
101
+ #ifndef NPP_PLUS
102
+ } /* extern "C" */
103
+ #endif
104
+ #endif
105
+
106
+ #endif /* NV_NPPI_H */