File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 33// See LICENSE.TXT
44// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55
6+ #include " device.hpp"
67#include " event.hpp"
78#include " fixtures.h"
89#include " raii.h"
@@ -15,7 +16,10 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(cudaEventTest);
1516// initialized. In the Cuda adapter, an event can have nullptr command queue
1617// because the interop API does not associate a UR-owned queue with the event.
1718TEST_P (cudaEventTest, GetQueueFromEventCreatedWithNativeHandle) {
19+ CUcontext cuda_ctx = device->getNativeContext ();
20+ EXPECT_NE (cuda_ctx, nullptr );
1821 RAIICUevent cuda_event;
22+ ASSERT_SUCCESS_CUDA (cuCtxSetCurrent (cuda_ctx));
1923 ASSERT_SUCCESS_CUDA (cuEventCreate (cuda_event.ptr (), CU_EVENT_DEFAULT));
2024
2125 auto native_event = reinterpret_cast <ur_native_handle_t >(cuda_event.get ());
You can’t perform that action at this time.
0 commit comments