Skip to content

Commit e402523

Browse files
author
Pierre-Andre Saulais
authored
[UR][CUDA] Use new variant of the enableCUDATracing function (#12521)
oneapi-src/unified-runtime#1070 and #11952 introduced a new variant of the `enableCUDATracing` function that takes a context pointer parameter, replacing the parameterless variant of that function. The older variant will be removed from UR once this PR is merged.
1 parent af448b0 commit e402523

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717
#include <sycl/detail/pi.hpp>
1818

1919
// Forward declarations
20-
void enableCUDATracing();
20+
struct cuda_tracing_context_t_;
21+
22+
void enableCUDATracing(cuda_tracing_context_t_ *ctx);
23+
void disableCUDATracing(cuda_tracing_context_t_ *ctx);
24+
cuda_tracing_context_t_ *createCUDATracingContext();
25+
void freeCUDATracingContext(cuda_tracing_context_t_ *Ctx);
2126

2227
//-- PI API implementation
2328
extern "C" {
@@ -1237,7 +1242,8 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
12371242
std::memset(&(PluginInit->PiFunctionTable), 0,
12381243
sizeof(PluginInit->PiFunctionTable));
12391244

1240-
enableCUDATracing();
1245+
cuda_tracing_context_t_ *Ctx = createCUDATracingContext();
1246+
enableCUDATracing(Ctx);
12411247

12421248
// Forward calls to CUDA RT.
12431249
#define _PI_API(api) \

0 commit comments

Comments
 (0)