Skip to content

Commit

Permalink
Merge pull request #2182 from omarahmed1111/fix-success-with-unowned-…
Browse files Browse the repository at this point in the history
…native-handle-tests

Fix successWithUnOwnedNativeHandle tests
  • Loading branch information
omarahmed1111 authored Oct 11, 2024
2 parents d864091 + f76bdae commit 7dab221
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 31 deletions.
1 change: 0 additions & 1 deletion test/conformance/context/context_adapter_level_zero.match
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
{{NONDETERMINISTIC}}
urContextCreateWithNativeHandleTest.SuccessWithUnOwnedNativeHandle/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
urContextSetExtendedDeleterTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
12 changes: 0 additions & 12 deletions test/conformance/context/urContextCreateWithNativeHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ TEST_P(urContextCreateWithNativeHandleTest, SuccessWithOwnedNativeHandle) {
UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urContextCreateWithNativeHandle(
native_context, adapter, 1, &device, &props, &ctx));
ASSERT_NE(ctx, nullptr);

uint32_t ref_count = 0;
ASSERT_SUCCESS(urContextGetInfo(ctx, UR_CONTEXT_INFO_REFERENCE_COUNT,
sizeof(uint32_t), &ref_count, nullptr));
ASSERT_EQ(ref_count, 1);
}

TEST_P(urContextCreateWithNativeHandleTest, SuccessWithUnOwnedNativeHandle) {
Expand All @@ -66,13 +61,6 @@ TEST_P(urContextCreateWithNativeHandleTest, SuccessWithUnOwnedNativeHandle) {
UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urContextCreateWithNativeHandle(
native_context, adapter, 1, &device, &props, &ctx));
ASSERT_NE(ctx, nullptr);

uint32_t ref_count = 0;
ASSERT_SUCCESS(urContextGetInfo(ctx, UR_CONTEXT_INFO_REFERENCE_COUNT,
sizeof(uint32_t), &ref_count, nullptr));
ASSERT_EQ(ref_count, 2);

ASSERT_SUCCESS(urContextRelease(ctx));
}

TEST_P(urContextCreateWithNativeHandleTest, InvalidNullHandleAdapter) {
Expand Down
1 change: 0 additions & 1 deletion test/conformance/device/device_adapter_cuda.match
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
{{NONDETERMINISTIC}}
urDeviceCreateWithNativeHandleTest.SuccessWithUnOwnedNativeHandle
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
1 change: 0 additions & 1 deletion test/conformance/device/device_adapter_hip.match
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
{{NONDETERMINISTIC}}
urDeviceCreateWithNativeHandleTest.SuccessWithUnOwnedNativeHandle
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
1 change: 0 additions & 1 deletion test/conformance/device/device_adapter_level_zero.match
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
{{NONDETERMINISTIC}}
urDeviceCreateWithNativeHandleTest.SuccessWithUnOwnedNativeHandle
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
1 change: 0 additions & 1 deletion test/conformance/device/device_adapter_level_zero_v2.match
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{NONDETERMINISTIC}}
urDeviceCreateWithNativeHandleTest.SuccessWithUnOwnedNativeHandle
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_GLOBAL_MEM_FREE
2 changes: 0 additions & 2 deletions test/conformance/device/device_adapter_opencl.match

This file was deleted.

12 changes: 0 additions & 12 deletions test/conformance/device/urDeviceCreateWithNativeHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ TEST_F(urDeviceCreateWithNativeHandleTest, SuccessWithOwnedNativeHandle) {
UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceCreateWithNativeHandle(
native_handle, adapter, &props, &dev));
ASSERT_NE(dev, nullptr);

uint32_t ref_count = 0;
ASSERT_SUCCESS(urDeviceGetInfo(dev, UR_DEVICE_INFO_REFERENCE_COUNT,
sizeof(uint32_t), &ref_count, nullptr));

ASSERT_EQ(ref_count, 1);
}
}

Expand All @@ -66,12 +60,6 @@ TEST_F(urDeviceCreateWithNativeHandleTest, SuccessWithUnOwnedNativeHandle) {
UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceCreateWithNativeHandle(
native_handle, adapter, &props, &dev));
ASSERT_NE(dev, nullptr);

uint32_t ref_count = 0;
ASSERT_SUCCESS(urDeviceGetInfo(dev, UR_DEVICE_INFO_REFERENCE_COUNT,
sizeof(uint32_t), &ref_count, nullptr));

ASSERT_EQ(ref_count, 2);
}
}

Expand Down

0 comments on commit 7dab221

Please sign in to comment.