Skip to content

Commit c3796ce

Browse files
authored
[hip-tests] Introduce new mechanism for tagging and disabling tests - Part 5 (#3993)
## Motivation Since the number of unit test cases is constantly growing, the execution time is also increasing. Specific tests are suited for non standard testing and there is no need to run them in the regular PSDB. Add a mechanism to easily disable/enable tests and easily categorize them. Part 5 covers test name changes for following groups: - module tests - multiThread tests - occupancy tests - p2p tests - printf tests - rtc tests - stream tests - streamperthread tests - surface tests - synchronization tests - texture tests - threadfence tests - vector_types tests - virtualMemoryManagement tests - vulkan_interop tests - warp tests ## Technical Details Explained in the ticket in the document attached. ## JIRA ID SWDEV-567112 ## Test Plan Ensure build passes. All enabled tests pass, all disabled tests are not run ## Test Result Local build passed, local enabled tests pass, disabled are not run ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
1 parent 1ce7ea2 commit c3796ce

File tree

272 files changed

+843
-951
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+843
-951
lines changed

projects/hip-tests/catch/config/configs/unit/module.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ module:
3939
<<: *level_2
4040
# Below tests tests fail in PSDB
4141
disabled: [nvidia_windows]
42-
Unit_hipModuleLoadDataEx_Negative_Image_Is_An_Empty_String:
43-
<<: *level_2
44-
# Note: Following two tests disabled due to defect - EXSWHTEC-153
45-
disabled: [amd_windows]
4642
Unit_hipGetFuncBySymbol_PositiveTest: *level_2
4743
Unit_hipGetFuncBySymbol_NegativeTests: *level_2
4844
Unit_hipGetFuncBySymbol_InChildProcess: *level_2
@@ -79,10 +75,6 @@ module:
7975
<<: *level_2
8076
# Below tests tests fail in PSDB
8177
disabled: [nvidia_windows]
82-
Unit_hipModuleLoadData_Negative_Image_Is_An_Empty_String:
83-
<<: *level_2
84-
# Note: Following two tests disabled due to defect - EXSWHTEC-153
85-
disabled: [amd_windows]
8678
Unit_hipModuleLoadData_Functional: *level_2
8779
Unit_hipModuleLoad_Positive_Basic:
8880
<<: *level_2

projects/hip-tests/catch/config/configs/unit/stream.yaml

Lines changed: 2 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -58,94 +58,9 @@ stream:
5858
<<: *level_2
5959
# Below tests fail in stress test on 30/06/23
6060
disabled: [amd_wsl]
61-
Unit_hipStreamValue_Wait32_Blocking_Mask_Gte:
62-
<<: *level_2
63-
# SWDEV-347670 - blocking tests have TDR, causing hangs
64-
disabled: [amd_windows, amd_wsl]
65-
Unit_hipStreamValue_Wait32_NonBlocking_Mask_Gte: *level_2
66-
Unit_hipStreamValue_Wait32_Blocking_Mask_Eq_1:
67-
<<: *level_2
68-
# (amd_windows) SWDEV-347670 - blocking tests have TDR, causing hangs
69-
# (amd_wsl) Below tests fail in stress test on 30/06/23
70-
disabled: [amd_windows, amd_wsl]
71-
Unit_hipStreamValue_Wait32_NonBlocking_Mask_Eq_1: *level_2
72-
Unit_hipStreamValue_Wait32_Blocking_Mask_Eq_2:
73-
<<: *level_2
74-
# SWDEV-347670 - blocking tests have TDR, causing hangs
75-
disabled: [amd_windows, amd_wsl]
76-
Unit_hipStreamValue_Wait32_NonBlocking_Mask_Eq_2: *level_2
77-
Unit_hipStreamValue_Wait32_Blocking_Mask_And:
78-
<<: *level_2
79-
# SWDEV-347670 - blocking tests have TDR, causing hangs
80-
disabled: [amd_windows, amd_wsl]
81-
Unit_hipStreamValue_Wait32_NonBlocking_Mask_And: *level_2
82-
Unit_hipStreamValue_Wait32_Blocking_NoMask_Eq:
83-
<<: *level_2
84-
# SWDEV-347670 - blocking tests have TDR, causing hangs
85-
disabled: [amd_windows, amd_wsl]
86-
Unit_hipStreamValue_Wait32_NonBlocking_NoMask_Eq: *level_2
87-
Unit_hipStreamValue_Wait32_Blocking_NoMask_Gte:
88-
<<: *level_2
89-
# SWDEV-347670 - blocking tests have TDR, causing hangs
90-
disabled: [amd_windows, amd_wsl]
91-
Unit_hipStreamValue_Wait32_NonBlocking_NoMask_Gte: *level_2
92-
Unit_hipStreamValue_Wait32_Blocking_NoMask_And:
93-
<<: *level_2
94-
# SWDEV-347670 - blocking tests have TDR, causing hangs
95-
disabled: [amd_windows, amd_wsl]
96-
Unit_hipStreamValue_Wait32_NonBlocking_NoMask_And: *level_2
97-
Unit_hipStreamValue_Wait32_Blocking_NoMask_Nor:
98-
<<: *level_2
99-
# SWDEV-347670 - blocking tests have TDR, causing hangs
100-
disabled: [amd_windows, amd_wsl]
101-
Unit_hipStreamValue_Wait32_NonBlocking_NoMask_Nor: *level_2
102-
Unit_hipStreamValue_Wait64_Blocking_Mask_Gte_1:
103-
<<: *level_2
104-
# SWDEV-347670 - blocking tests have TDR, causing hangs
105-
disabled: [amd_windows, amd_wsl]
106-
Unit_hipStreamValue_Wait64_NonBlocking_Mask_Gte_1: *level_2
107-
Unit_hipStreamValue_Wait64_Blocking_Mask_Gte_2:
108-
<<: *level_2
109-
# SWDEV-347670 - blocking tests have TDR, causing hangs
110-
disabled: [amd_windows, amd_wsl]
111-
Unit_hipStreamValue_Wait64_NonBlocking_Mask_Gte_2: *level_2
112-
Unit_hipStreamValue_Wait64_Blocking_Mask_Eq_1:
113-
<<: *level_2
114-
# SWDEV-347670 - blocking tests have TDR, causing hangs
115-
disabled: [amd_windows, amd_wsl]
116-
Unit_hipStreamValue_Wait64_NonBlocking_Mask_Eq_1: *level_2
117-
Unit_hipStreamValue_Wait64_Blocking_Mask_Eq_2:
118-
<<: *level_2
119-
# SWDEV-347670 - blocking tests have TDR, causing hangs
120-
disabled: [amd_windows, amd_wsl]
121-
Unit_hipStreamValue_Wait64_NonBlocking_Mask_Eq_2: *level_2
122-
Unit_hipStreamValue_Wait64_Blocking_Mask_And:
123-
<<: *level_2
124-
# SWDEV-347670 - blocking tests have TDR, causing hangs
125-
disabled: [amd_windows, amd_wsl]
126-
Unit_hipStreamValue_Wait64_NonBlocking_Mask_And: *level_2
127-
Unit_hipStreamValue_Wait64_Blocking_NoMask_Gte:
128-
<<: *level_2
129-
# SWDEV-347670 - blocking tests have TDR, causing hangs
130-
disabled: [amd_windows, amd_wsl]
131-
Unit_hipStreamValue_Wait64_NonBlocking_NoMask_Gte: *level_2
132-
Unit_hipStreamValue_Wait64_Blocking_NoMask_Eq:
133-
<<: *level_2
134-
# SWDEV-347670 - blocking tests have TDR, causing hangs
135-
disabled: [amd_windows, amd_wsl]
136-
Unit_hipStreamValue_Wait64_NonBlocking_NoMask_Eq: *level_2
137-
Unit_hipStreamValue_Wait64_Blocking_NoMask_And:
138-
<<: *level_2
139-
# SWDEV-347670 - blocking tests have TDR, causing hangs
140-
disabled: [amd_windows, amd_wsl]
141-
Unit_hipStreamValue_Wait64_NonBlocking_NoMask_And: *level_2
142-
Unit_hipStreamValue_Wait64_Blocking_NoMask_Nor:
143-
<<: *level_2
144-
disabled: [amd_windows, amd_wsl]
145-
Unit_hipStreamValue_Wait64_NonBlocking_NoMask_Nor: *level_2
61+
Unit_hipStreamValue_Wait_Blocking: *level_2
14662
Unit_hipStreamValue_Negative_InvalidMemory: *level_2
147-
Unit_hipStreamValue_Negative_UninitializedStream: *level_2
148-
Unit_hipStreamValue_Negative_InvalidFlag: *level_2
63+
Unit_hipStreamValue_Negative_StreamAndFlag: *level_2
14964
Unit_hipStreamWriteValue_Default: *level_2
15065
Unit_hipStreamWaitValue_Default: *level_2
15166
Unit_hipStreamSynchronize_EmptyStream: *level_2
@@ -302,5 +217,4 @@ stream:
302217
Unit_hipStreamCopyAttributes_Basic: *level_2
303218
Unit_hipStreamCopyAttributes_Negative: *level_2
304219
Unit_hipStreamCopyAttributes_WithAllSyncPolicyValues: *level_2
305-
Unit_hipStreamValue_Negative_StreamAndFlag: *level_2
306220
Unit_hipStreamValue_Wait_Blocking: *level_2

projects/hip-tests/catch/unit/module/hipDrvLaunchKernelEx.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static constexpr auto kernel_name = "cooperativeKernelEx";
4646
* ------------------------
4747
* - HIP_VERSION >= 6.5
4848
*/
49-
TEST_CASE("Unit_hipDrvLaunchKernelEx_NegTsts") {
49+
TEST_CASE(Unit_hipDrvLaunchKernelEx_NegTsts) {
5050
if (!DeviceAttributesSupport(0, hipDeviceAttributeCooperativeLaunch)) {
5151
HipTest::HIP_SKIP_TEST("CooperativeLaunch not supported");
5252
return;
@@ -216,7 +216,7 @@ bool runTestDrvLaunch(const char* testName, std::string kernelFunc, int totalThr
216216
* ------------------------
217217
* - HIP_VERSION >= 6.5
218218
*/
219-
TEST_CASE("Unit_hipDrvLaunchKernelEx_Functional") {
219+
TEST_CASE(Unit_hipDrvLaunchKernelEx_Functional) {
220220
if (!DeviceAttributesSupport(0, hipDeviceAttributeCooperativeLaunch)) {
221221
HipTest::HIP_SKIP_TEST("CooperativeLaunch not supported");
222222
return;
@@ -239,7 +239,7 @@ TEST_CASE("Unit_hipDrvLaunchKernelEx_Functional") {
239239
* ------------------------
240240
* - HIP_VERSION >= 6.5
241241
*/
242-
TEST_CASE("Unit_hipDrvLaunchKernelEx_With_Different_Kernels") {
242+
TEST_CASE(Unit_hipDrvLaunchKernelEx_With_Different_Kernels) {
243243
CTX_CREATE();
244244
if (!DeviceAttributesSupport(0, hipDeviceAttributeCooperativeLaunch)) {
245245
HipTest::HIP_SKIP_TEST("CooperativeLaunch not supported");
@@ -319,7 +319,7 @@ TEST_CASE("Unit_hipDrvLaunchKernelEx_With_Different_Kernels") {
319319
* ------------------------
320320
* - HIP_VERSION >= 6.5
321321
*/
322-
TEST_CASE("Unit_hipDrvLaunchKernelEx_With_CooperativeKernelWithArgs") {
322+
TEST_CASE(Unit_hipDrvLaunchKernelEx_With_CooperativeKernelWithArgs) {
323323
CTX_CREATE();
324324
if (!DeviceAttributesSupport(0, hipDeviceAttributeCooperativeLaunch)) {
325325
HipTest::HIP_SKIP_TEST("CooperativeLaunch not supported");
@@ -395,7 +395,7 @@ TEST_CASE("Unit_hipDrvLaunchKernelEx_With_CooperativeKernelWithArgs") {
395395
* ------------------------
396396
* - HIP_VERSION >= 6.5
397397
*/
398-
TEST_CASE("Unit_hipDrvLaunchKernelEx_With_MaxBlockDims") {
398+
TEST_CASE(Unit_hipDrvLaunchKernelEx_With_MaxBlockDims) {
399399
CTX_CREATE();
400400
if (!DeviceAttributesSupport(0, hipDeviceAttributeCooperativeLaunch)) {
401401
HipTest::HIP_SKIP_TEST("CooperativeLaunch not supported");

projects/hip-tests/catch/unit/module/hipExtLaunchKernelGGL.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ bool KernelTimeExecution() {
184184
return testStatus;
185185
}
186186

187-
TEST_CASE("Unit_hipExtLaunchKernelGGL_Functional") {
187+
TEST_CASE(Unit_hipExtLaunchKernelGGL_Functional) {
188188
bool testStatus = true;
189189
// Disabled the concurency test as the firmware does not support concurrency
190190
// in the same stream

projects/hip-tests/catch/unit/module/hipExtLaunchMultiKernelMultiDevFunctional.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ __global__ void vector_square(float* C_d, float* A_d, size_t N) {
5353
}
5454
}
5555

56-
TEST_CASE("Unit_hipExtLaunchMultiKernelMultiDevice_Functional", "[multigpu]") {
56+
TEST_CASE(Unit_hipExtLaunchMultiKernelMultiDevice_Functional) {
5757
constexpr int MAX_GPUS = 8;
5858
float *A_d[MAX_GPUS], *C_d[MAX_GPUS];
5959
float *A_h, *C_h;

projects/hip-tests/catch/unit/module/hipExtModuleLaunchKernel.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static bool searchRegExpr(const std::regex& expr, const char* filename) {
9494
* ------------------------
9595
* - HIP_VERSION >= 5.7
9696
*/
97-
TEST_CASE("Unit_hipExtModuleLaunchKernel_CheckCodeObjAttr") {
97+
TEST_CASE(Unit_hipExtModuleLaunchKernel_CheckCodeObjAttr) {
9898
// Open copyKernel.s and read the file
9999
const std::regex regexp("uniform_work_group_size\\s*:\\s*[0-1]");
100100
REQUIRE(true == searchRegExpr(regexp, "copyKernel.s"));
@@ -115,7 +115,7 @@ TEST_CASE("Unit_hipExtModuleLaunchKernel_CheckCodeObjAttr") {
115115
* ------------------------
116116
* - HIP_VERSION >= 5.7
117117
*/
118-
TEST_CASE("Unit_hipExtModuleLaunchKernel_NonUniformWorkGroup") {
118+
TEST_CASE(Unit_hipExtModuleLaunchKernel_NonUniformWorkGroup) {
119119
// first check if uniform_work_group_size = 1.
120120
const std::regex regexp("uniform_work_group_size\\s*:\\s*1");
121121
if (false == searchRegExpr(regexp, "copyKernel.s")) {
@@ -185,7 +185,7 @@ TEST_CASE("Unit_hipExtModuleLaunchKernel_NonUniformWorkGroup") {
185185
* ------------------------
186186
* - HIP_VERSION >= 5.7
187187
*/
188-
TEST_CASE("Unit_hipExtModuleLaunchKernel_UniformWorkGroup") {
188+
TEST_CASE(Unit_hipExtModuleLaunchKernel_UniformWorkGroup) {
189189
size_t arraylength = totalWorkGroups * localWorkSize;
190190
size_t sizeBytes{arraylength * sizeof(int)};
191191
// Get module and function from module
@@ -251,7 +251,7 @@ TEST_CASE("Unit_hipExtModuleLaunchKernel_UniformWorkGroup") {
251251
HIP_CHECK(hipModuleUnload(Module));
252252
}
253253

254-
TEST_CASE("Unit_hipExtModuleLaunchKernel_Positive_Parameters") {
254+
TEST_CASE(Unit_hipExtModuleLaunchKernel_Positive_Parameters) {
255255
ModuleLaunchKernelPositiveParameters<hipExtModuleLaunchKernel>();
256256
auto mg = ModuleGuard::InitModule("launch_kernel_module.code");
257257
SECTION("Pass only start event") {
@@ -277,7 +277,7 @@ TEST_CASE("Unit_hipExtModuleLaunchKernel_Positive_Parameters") {
277277
}
278278
}
279279

280-
TEST_CASE("Unit_hipExtModuleLaunchKernel_Negative_Parameters", "[multigpu]") {
280+
TEST_CASE(Unit_hipExtModuleLaunchKernel_Negative_Parameters) {
281281
ModuleLaunchKernelNegativeParameters<hipExtModuleLaunchKernel>(true);
282282
}
283283
/**
@@ -744,7 +744,7 @@ bool ModuleLaunchKernel::Module_WorkGroup_Test() {
744744
return testStatus;
745745
}
746746

747-
TEST_CASE("Unit_hipExtModuleLaunchKernel_Functional") {
747+
TEST_CASE(Unit_hipExtModuleLaunchKernel_Functional) {
748748
bool testStatus = true;
749749
ModuleLaunchKernel kernelLaunch;
750750
testStatus &= kernelLaunch.ExtModule_Negative_tests();

projects/hip-tests/catch/unit/module/hipFuncGetAttribute.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static hipModule_t GetModule() {
3232
return mg.module();
3333
}
3434

35-
TEST_CASE("Unit_hipFuncGetAttribute_Positive_Basic") {
35+
TEST_CASE(Unit_hipFuncGetAttribute_Positive_Basic) {
3636
hipFunction_t kernel = GetKernel(GetModule(), "GlobalKernel");
3737

3838
int value;
@@ -70,7 +70,7 @@ TEST_CASE("Unit_hipFuncGetAttribute_Positive_Basic") {
7070
}
7171
}
7272

73-
TEST_CASE("Unit_hipFuncGetAttribute_Negative_Parameters") {
73+
TEST_CASE(Unit_hipFuncGetAttribute_Negative_Parameters) {
7474
hipFunction_t kernel = GetKernel(GetModule(), "GlobalKernel");
7575

7676
int value;

projects/hip-tests/catch/unit/module/hipFuncGetAttributes.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ __global__ void getAttrFn(float* px, float* py) {
4545
*py = *py + *px;
4646
}
4747

48-
TEST_CASE("Unit_hipFuncGetAttributes_basic") {
48+
TEST_CASE(Unit_hipFuncGetAttributes_basic) {
4949
hipFuncAttributes attr{};
5050

5151
auto r = hipFuncGetAttributes(&attr, reinterpret_cast<const void*>(&getAttrFn));

projects/hip-tests/catch/unit/module/hipFuncSetAttribute.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ __global__ void fn(float* px, float* py) {
4545
*py = *py + *px;
4646
}
4747

48-
TEST_CASE("Unit_hipFuncSetAttribute_Basic") {
48+
TEST_CASE(Unit_hipFuncSetAttribute_Basic) {
4949
HIP_CHECK(hipFuncSetAttribute(reinterpret_cast<const void*>(&fn),
5050
hipFuncAttributeMaxDynamicSharedMemorySize, 0));
5151
HIP_CHECK(hipFuncSetAttribute(reinterpret_cast<const void*>(&fn),

projects/hip-tests/catch/unit/module/hipFuncSetSharedMemConfig.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ __global__ void ReverseSeq(int* A, int* B, int N) {
4747
* ------------------------
4848
* - HIP_VERSION >= 5.6
4949
*/
50-
TEST_CASE("Unit_hipFuncSetSharedMemConfig_functional") {
50+
TEST_CASE(Unit_hipFuncSetSharedMemConfig_functional) {
5151
int *Ah = NULL, *RAh = NULL, NELMTS = 128;
5252
int *Ad = NULL, *RAd = NULL;
5353
Ah = reinterpret_cast<int*>(malloc(NELMTS * sizeof(int)));

0 commit comments

Comments
 (0)