Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sycl/test-e2e/Adapters/interop-cuda-experimental.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ int main() {
// Create new context
CUcontext curr_ctx, cu_ctx;
CUDA_CHECK(cuCtxGetCurrent(&curr_ctx));
#if CUDA_VERSION >= 13000
CUDA_CHECK(cuCtxCreate(&cu_ctx, nullptr, CU_CTX_MAP_HOST, cu_dev));
#else
CUDA_CHECK(cuCtxCreate(&cu_ctx, CU_CTX_MAP_HOST, cu_dev));
#endif
CUDA_CHECK(cuCtxSetCurrent(curr_ctx));

auto sycl_ctx = sycl::make_context<sycl::backend::ext_oneapi_cuda>(cu_ctx);
Expand Down
5 changes: 5 additions & 0 deletions unified-runtime/test/adapters/cuda/context_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ TEST_P(cudaUrContextCreateTest, CreateWithChildThread) {
TEST_P(cudaUrContextCreateTest, ContextLifetimeExisting) {
// start by setting up a CUDA context on the thread
CUcontext original;
#if CUDA_VERSION >= 13000
ASSERT_SUCCESS_CUDA(
cuCtxCreate(&original, nullptr, CU_CTX_MAP_HOST, device->get()));
#else
ASSERT_SUCCESS_CUDA(cuCtxCreate(&original, CU_CTX_MAP_HOST, device->get()));
#endif

// ensure the CUDA context is active
CUcontext current = nullptr;
Expand Down
Loading