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 3
3
// See LICENSE.TXT
4
4
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5
5
6
+ #include " device.hpp"
6
7
#include " event.hpp"
7
8
#include " fixtures.h"
8
9
#include " raii.h"
@@ -15,7 +16,10 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(cudaEventTest);
15
16
// initialized. In the Cuda adapter, an event can have nullptr command queue
16
17
// because the interop API does not associate a UR-owned queue with the event.
17
18
TEST_P (cudaEventTest, GetQueueFromEventCreatedWithNativeHandle) {
19
+ CUcontext cuda_ctx = device->getNativeContext ();
20
+ EXPECT_NE (cuda_ctx, nullptr );
18
21
RAIICUevent cuda_event;
22
+ ASSERT_SUCCESS_CUDA (cuCtxSetCurrent (cuda_ctx));
19
23
ASSERT_SUCCESS_CUDA (cuEventCreate (cuda_event.ptr (), CU_EVENT_DEFAULT));
20
24
21
25
auto native_event = reinterpret_cast <ur_native_handle_t >(cuda_event.get ());
You can’t perform that action at this time.
0 commit comments