Skip to content

Commit a2dd413

Browse files
rocm-devopssystems-assistant[bot]
authored andcommitted
SWDEV-515512 - Enable memcpy synchronization_behaviour tests
(#593) * SWDEV-515512 - Enable memcpy synchronization_behaviour tests * SWDEV-515512 - Remove invalid parts of the tests * SWDEV-515512 - Format the code [rocm-systems] ROCm/rocm-systems#593 (commit 7e3ddf3)
1 parent 6f36053 commit a2dd413

File tree

8 files changed

+2
-51
lines changed

8 files changed

+2
-51
lines changed

catch/hipTestMain/config/config_amd_linux

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
"Unit_hipMemRangeGetAttribute_Positive_AccessedBy_Partial_Range",
2424
"Disabling test tracked SWDEV-395683",
2525
"Unit_hipStreamPerThread_MultiThread",
26-
"Disabling tests tracked with SWDEV-389647..",
27-
"Unit_hipMemcpy2DToArrayAsync_Positive_Synchronization_Behavior",
2826
"SWDEV-398981 fails in stress test",
2927
"Unit_hipStreamCreateWithPriority_MulthreadDefaultflag",
3028
"Unit_hipEventIpc",
@@ -104,9 +102,6 @@
104102
"Unit_hipLaunchCooperativeKernelMultiDevice_Negative_MultiKernelSameDevice",
105103
"Unit_hipExtLaunchMultiKernelMultiDevice_Negative_MultiKernelSameDevice",
106104
"=== Below tests are failing PSDB ===",
107-
"Unit_hipMemcpy3D_Positive_Synchronization_Behavior",
108-
"Unit_hipMemcpyParam2D_Positive_Synchronization_Behavior",
109-
"Unit_hipDrvMemcpy3D_Positive_Synchronization_Behavior",
110105
"Unit_hipLaunchCooperativeKernel_Negative_Parameters",
111106
"Unit_hipLaunchKernel_Negative_Parameters",
112107
"Unit_hipModuleLaunchCooperativeKernel_Negative_Parameters",

catch/hipTestMain/config/config_amd_windows

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,6 @@
346346
"Unit_hipGetMipmappedArrayLevel_Negative",
347347
"Unit_hipFreeMipmappedArray_Negative_DoubleFree",
348348
"Unit_hipFreeMipmappedArrayMultiTArray - int",
349-
"Unit_hipMemcpy3D_Positive_Synchronization_Behavior",
350-
"Unit_hipMemcpyParam2D_Positive_Synchronization_Behavior",
351-
"Unit_hipDrvMemcpy3D_Positive_Synchronization_Behavior",
352349
"Unit_Thread_Block_Tile_Dynamic_Getters_Positive_Basic",
353350
"Performance_hipMemcpy2D_HostToHost",
354351
"Performance_hipMemcpy2DAsync_HostToHost",

catch/hipTestMain/config/config_nvidia_linux.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@
6666
"Unit_hipFreeMipmappedArray_Negative_Parameters",
6767
"Unit_hipCreateSurfaceObject_Negative_Parameters",
6868
"Unit_hipDestroySurfaceObject_Negative_Parameters",
69-
"Unit_hipMemcpy3D_Positive_Synchronization_Behavior",
7069
"Unit_hipMemcpy2D_Positive_Synchronization_Behavior",
71-
"Unit_hipDrvMemcpy3D_Positive_Synchronization_Behavior",
7270
"Unit_hipFreeMipmappedArray_Negative_DoubleFree",
7371
"Unit_hipModuleLoad_Positive_Basic",
7472
"Unit_hipModuleLoad_Negative_Load_From_A_File_That_Is_Not_A_Module",
@@ -80,8 +78,6 @@
8078
"Performance_hipMemsetD16Async",
8179
"Performance_hipMemsetD32",
8280
"Performance_hipMemsetD32Async",
83-
"Unit_hipMemcpyParam2D_Positive_Synchronization_Behavior",
84-
"Unit_hipMemcpy_Positive_Synchronization_Behavior",
8581
"Unit_tex1Dfetch_Positive_ReadModeElementType - char",
8682
"Unit_tex1Dfetch_Positive_ReadModeElementType - unsigned char",
8783
"Unit_tex1Dfetch_Positive_ReadModeElementType - short",

catch/unit/memory/hipDrvMemcpy3D.cc

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,11 @@ TEST_CASE("Unit_hipDrvMemcpy3D_Positive_Synchronization_Behavior") {
6464
Memcpy3DDtoHPageableSyncBehavior(DrvMemcpy3DWrapper<>, true);
6565
}
6666

67-
#if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-236
6867
SECTION("Device to Pinned Host") { Memcpy3DDtoHPinnedSyncBehavior(DrvMemcpy3DWrapper<>, true); }
69-
#endif
7068

71-
SECTION("Device to Device") {
72-
#if HT_NVIDIA
73-
Memcpy3DDtoDSyncBehavior(DrvMemcpy3DWrapper<>, false);
74-
#else
75-
Memcpy3DDtoDSyncBehavior(DrvMemcpy3DWrapper<>, true);
76-
#endif
77-
}
69+
SECTION("Device to Device") { Memcpy3DDtoDSyncBehavior(DrvMemcpy3DWrapper<>, false); }
7870

79-
#if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-232
8071
SECTION("Host to Host") { Memcpy3DHtoHSyncBehavior(DrvMemcpy3DWrapper<>, true); }
81-
#endif
8272
}
8373

8474
TEST_CASE("Unit_hipDrvMemcpy3D_Positive_Parameters") {
@@ -254,4 +244,4 @@ TEST_CASE("Unit_hipDrvMemcpy3D_Capture") {
254244
BEGIN_CAPTURE_SYNC(memcpy_err, false);
255245
HIP_CHECK_ERROR(hipDrvMemcpy3D(&params), memcpy_err);
256246
END_CAPTURE_SYNC(memcpy_err);
257-
}
247+
}

catch/unit/memory/hipMemcpy3D.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ TEST_CASE("Unit_hipMemcpy3D_Positive_Synchronization_Behavior") {
6060

6161
SECTION("Device to Pinned Host") { Memcpy3DDtoHPinnedSyncBehavior(Memcpy3DWrapper<>, true); }
6262

63-
#if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-232
6463
SECTION("Host to Host") { Memcpy3DHtoHSyncBehavior(Memcpy3DWrapper<>, true); }
65-
#endif
6664
}
6765

6866
TEST_CASE("Unit_hipMemcpy3D_Positive_DeviceToDevice_Synchronization_Behavior") {

catch/unit/memory/hipMemcpy3DAsync.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,17 @@ TEST_CASE("Unit_hipMemcpy3DAsync_Positive_Synchronization_Behavior") {
6464

6565
SECTION("Host to Device") { Memcpy3DHtoDSyncBehavior(Memcpy3DWrapper<async>, false); }
6666

67-
#if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-233
6867
SECTION("Device to Pageable Host") {
6968
Memcpy3DDtoHPageableSyncBehavior(Memcpy3DWrapper<async>, true);
7069
}
71-
#endif
7270

7371
SECTION("Device to Pinned Host") {
7472
Memcpy3DDtoHPinnedSyncBehavior(Memcpy3DWrapper<async>, false);
7573
}
7674

7775
SECTION("Device to Device") { Memcpy3DDtoDSyncBehavior(Memcpy3DWrapper<async>, false); }
7876

79-
#if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-233
8077
SECTION("Host to Host") { Memcpy3DHtoHSyncBehavior(Memcpy3DWrapper<async>, true); }
81-
#endif
8278
}
8379

8480
TEST_CASE("Unit_hipMemcpy3DAsync_Positive_Parameters") {

catch/unit/memory/hipMemcpyParam2D.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,13 @@ TEST_CASE("Unit_hipMemcpyParam2D_Positive_Synchronization_Behavior") {
5757
Memcpy2DDtoHPageableSyncBehavior(MemcpyParam2DAdapter<>(), true);
5858
}
5959

60-
#if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-236
6160
SECTION("Device to Pinned Host") {
6261
Memcpy2DDtoHPinnedSyncBehavior(MemcpyParam2DAdapter<>(), true);
6362
}
64-
#endif
6563

6664
SECTION("Device to Device") { Memcpy2DDtoDSyncBehavior(MemcpyParam2DAdapter<>(), false); }
6765

68-
#if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-232
6966
SECTION("Host to Host") { Memcpy2DHtoHSyncBehavior(MemcpyParam2DAdapter<>(), true); }
70-
#endif
7167
}
7268

7369
TEST_CASE("Unit_hipMemcpyParam2D_Positive_Parameters") {

catch/unit/memory/hipMemcpyWithStream.cc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ TEST_CASE("Unit_hipMemcpy_Positive_Synchronization_Behavior") {
3131
using namespace std::placeholders;
3232
HIP_CHECK(hipDeviceSynchronize());
3333

34-
// For transfers from pageable host memory to device memory, a stream sync is performed before
35-
// the copy is initiated. The function will return once the pageable buffer has been copied to
36-
// the staging memory for DMA transfer to device memory, but the DMA to final destination may
37-
// not have completed.
38-
// For transfers from pinned host memory to device memory, the function is synchronous with
39-
// respect to the host
40-
SECTION("Host memory to device memory") {
41-
MemcpyHPageabletoDSyncBehavior(std::bind(hipMemcpy, _1, _2, _3, hipMemcpyHostToDevice), true);
42-
}
43-
4434
// For transfers from device to either pageable or pinned host memory, the function returns only
4535
// once the copy has completed
4636
SECTION("Device memory to host memory") {
@@ -51,13 +41,6 @@ TEST_CASE("Unit_hipMemcpy_Positive_Synchronization_Behavior") {
5141

5242
// For transfers from device memory to device memory, no host-side synchronization is performed.
5343
SECTION("Device memory to device memory") {
54-
// This behavior differs on NVIDIA and AMD, on AMD the hipMemcpy calls is synchronous with
55-
// respect to the host
56-
#if HT_AMD
57-
HipTest::HIP_SKIP_TEST(
58-
"EXSWCPHIPT-127 - Memcpy from device to device memory behavior differs on AMD and Nvidia");
59-
return;
60-
#endif
6144
MemcpyDtoDSyncBehavior(std::bind(hipMemcpy, _1, _2, _3, hipMemcpyDeviceToDevice), false);
6245
}
6346

0 commit comments

Comments
 (0)