Skip to content

Commit

Permalink
Fix the Cuda adapter specific GetQueueFromEventCreatedWithNativeHandl…
Browse files Browse the repository at this point in the history
…e event test
  • Loading branch information
GeorgeWeb committed Jun 13, 2024
1 parent e95d4ff commit 33e1852
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/adapters/cuda/event_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// See LICENSE.TXT
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include "device.hpp"
#include "event.hpp"
#include "fixtures.h"
#include "raii.h"
Expand All @@ -15,7 +16,10 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(cudaEventTest);
// initialized. In the Cuda adapter, an event can have nullptr command queue
// because the interop API does not associate a UR-owned queue with the event.
TEST_P(cudaEventTest, GetQueueFromEventCreatedWithNativeHandle) {
CUcontext cuda_ctx = device->getNativeContext();
EXPECT_NE(cuda_ctx, nullptr);
RAIICUevent cuda_event;
ASSERT_SUCCESS_CUDA(cuCtxSetCurrent(cuda_ctx));
ASSERT_SUCCESS_CUDA(cuEventCreate(cuda_event.ptr(), CU_EVENT_DEFAULT));

auto native_event = reinterpret_cast<ur_native_handle_t>(cuda_event.get());
Expand Down

0 comments on commit 33e1852

Please sign in to comment.