Skip to content

Commit

Permalink
[UR][CUDA] Use new variant of the enableCUDATracing function (#12521)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pasaulais committed Feb 1, 2024
1 parent af448b0 commit e402523
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sycl/plugins/cuda/pi_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
#include <sycl/detail/pi.hpp>

// Forward declarations
void enableCUDATracing();
struct cuda_tracing_context_t_;

void enableCUDATracing(cuda_tracing_context_t_ *ctx);
void disableCUDATracing(cuda_tracing_context_t_ *ctx);
cuda_tracing_context_t_ *createCUDATracingContext();
void freeCUDATracingContext(cuda_tracing_context_t_ *Ctx);

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

enableCUDATracing();
cuda_tracing_context_t_ *Ctx = createCUDATracingContext();
enableCUDATracing(Ctx);

// Forward calls to CUDA RT.
#define _PI_API(api) \
Expand Down

0 comments on commit e402523

Please sign in to comment.