SWDEV-527806 - p2p checks for Atomic tests (#502)

[ROCm/hip-tests commit: a82f042ca1]
此提交包含在:
GunaShekar, Ajay
2025-07-30 09:20:59 -07:00
提交者 GitHub
父節點 3766537ced
當前提交 36c3328b23
共有 2 個檔案被更改,包括 22 行新增0 行删除
+11
查看文件
@@ -397,6 +397,17 @@ void AtomicExchMultipleDeviceMultipleKernelAndHostTest(const unsigned int num_de
if (kernel_count > 1) {
for (auto i = 0u; i < num_devices; ++i) {
int canAccess = 0;
for (auto j = 0u; j < num_devices; ++j) {
if (i != j) {
HIP_CHECK(hipDeviceCanAccessPeer(&canAccess, i, j));
if(canAccess == 0) {
std::string msg = "P2P access check failed between dev1:" + std::to_string(i) + ",dev2:" + std::to_string(j);
HipTest::HIP_SKIP_TEST(msg.c_str());
return;
}
}
}
int concurrent_kernels = 0;
HIP_CHECK(hipDeviceGetAttribute(&concurrent_kernels, hipDeviceAttributeConcurrentKernels, i));
if (!concurrent_kernels) {
+11
查看文件
@@ -424,6 +424,17 @@ void MultipleDeviceMultipleKernelTest(const unsigned int num_devices,
if (kernel_count > 1) {
for (auto i = 0u; i < num_devices; ++i) {
int canAccess = 0;
for (auto j = 0u; j < num_devices; ++j) {
if (i != j) {
HIP_CHECK(hipDeviceCanAccessPeer(&canAccess, i, j));
if(canAccess == 0) {
std::string msg = "P2P access check failed between dev1:" + std::to_string(i) + ",dev2:" + std::to_string(j);
HipTest::HIP_SKIP_TEST(msg.c_str());
return;
}
}
}
int concurrent_kernels = 0;
HIP_CHECK(hipDeviceGetAttribute(&concurrent_kernels, hipDeviceAttributeConcurrentKernels, i));
if (!concurrent_kernels) {