MIOpen icon indicating copy to clipboard operation
MIOpen copied to clipboard

GTest improvements

Open CAHEK7 opened this issue 1 year ago • 3 comments

It's an umbrella ticket for better tracking of GTest improvement activity ordered by priority.

The tickets under the different checkboxes are independent and can be done in-parallel, while tickets under the same checkbox must be done sequential and in a predefined order.

  • [ ] Switch to the new testing scheme using gtest_parrallel as a main test driver instead of ctest 1) https://github.com/ROCm/MIOpen/issues/3132 2) https://github.com/ROCm/MIOpen/issues/3133 3) https://github.com/ROCm/MIOpen/issues/3134
  • [x] https://github.com/ROCm/MIOpen/issues/3148
  • [ ] https://github.com/ROCm/MIOpen/issues/3135
  • [ ] https://github.com/ROCm/MIOpen/issues/3141
  • [ ] https://github.com/ROCm/MIOpen/issues/3136
  • [ ] https://github.com/ROCm/MIOpen/issues/3137

CAHEK7 avatar Jul 23 '24 22:07 CAHEK7

Recommend to add to the list of investigation:

why skipping a test is taking so long? It does not make sense to spend 3 seconds just to skip a test IMHO

379/8695 Test  #381: Full/GPU_Adam_FP16.AdamFloat16TestFw/adam_w input:1 lr:0.001 beta1:0.9 beta2:0.999 weight_decay:0 eps:1e-06 amsgrad:0 maximize:1 ..................................................................................................................................................................................................................................................................................................***Skipped   3.05 sec

junliume avatar Aug 08 '24 04:08 junliume

Recommend to add to the list of investigation:

why skipping a test is taking so long? It does not make sense to spend 3 seconds just to skip a test IMHO

379/8695 Test  #381: Full/GPU_Adam_FP16.AdamFloat16TestFw/adam_w input:1 lr:0.001 beta1:0.9 beta2:0.999 weight_decay:0 eps:1e-06 amsgrad:0 maximize:1 ..................................................................................................................................................................................................................................................................................................***Skipped   3.05 sec

@junliume because they initialize the buffers and skip the test. We have A LOT of similar issues.

It is already described in https://github.com/ROCm/MIOpen/wiki/GTest-development#early-skip

Exit from the test as early as possible. Any test skipping functionality must reside in void SetUp() override. For example, right now 198 AddLayerNorm tests take around 20s to skip, but if we move skip routine at the beginning of the SetUp, it takes 1ms

It happened because initially we've added this evil patter to all GTESTS and even for our "smoke" tests, we initialize ALL the buffers for most of the tests disabled by MIOPEN_TEST_ALL or restricted by the particular data type, because most of the tests check MIOPEN_TEST_ALL and MIOPEN_FLOAT inside the test body right after all the initialization.

CAHEK7 avatar Aug 08 '24 14:08 CAHEK7

Thank you for the detailed explanation @CAHEK7

we've added this evil patter to all GTESTS and even for our "smoke" tests

Let's discuss further on ways to resolve these issues :)

junliume avatar Aug 09 '24 06:08 junliume

Closing since MIOpen is being migrated to ROCm/rocm-libraries. Please re-open there if you believe this is still an issue.

JonathanLichtnerAMD avatar Jul 29 '25 01:07 JonathanLichtnerAMD