Skip to content

Commit 3814d56

Browse files
committed
Add an additional libsyclinterface test for peer access to self
1 parent 27162a8 commit 3814d56

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

libsyclinterface/tests/test_sycl_peer_access.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,17 @@ TEST_P(TestDPCTLPeerAccess, ChkPeerAccess)
104104
}
105105
}
106106

107+
TEST_P(TestDPCTLPeerAccess, ChkPeerAccessToSelf)
108+
{
109+
auto D0 = DPCTLDeviceVector_GetAt(DV, 0);
110+
ASSERT_TRUE(D1 != nullptr);
111+
bool canEnable = false;
112+
EXPECT_NO_FATAL_FAILURE(canEnable = DPCTLDevice_CanAccessPeer(
113+
D0, D0, DPCTLPeerAccessType::access_supported));
114+
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_EnablePeerAccess(D0, D0));
115+
EXPECT_NO_FATAL_FAILURE(DPCTLDevice_DisablePeerAccess(D0, D0));
116+
}
117+
107118
INSTANTIATE_TEST_SUITE_P(DPCTLDeviceFns,
108119
TestDPCTLPeerAccess,
109120
::testing::Values("level_zero", "cuda", "hip"));

0 commit comments

Comments
 (0)