Skip to content

Comments

[DFT] Rearrange DFT compute tests so unimplemented always skips#311

Merged
FMarno merged 2 commits intouxlfoundation:developfrom
FMarno:skip_unimplemented_tests
May 9, 2023
Merged

[DFT] Rearrange DFT compute tests so unimplemented always skips#311
FMarno merged 2 commits intouxlfoundation:developfrom
FMarno:skip_unimplemented_tests

Conversation

@FMarno
Copy link
Contributor

@FMarno FMarno commented May 1, 2023

Description

Since #288, MKLGPU now fails the REAL_REAL tests because the descriptor commit throws (due to not supporting REAL_REAL for COMPLEX_STORAGE). I've rearranged the tests so they always skip when something is not implemented.

To reproduce run the tests with the MKLGPU backend. The complex-to-complex *real_real* test will fail.

Fixes # (GitHub issue)

Checklist

All Submissions

  • Do all unit tests pass locally? Attach a log.
  • Have you formatted the code using clang-format?

Bug fixes

  • Have you added relevant regression tests?
  • Have you included information on how to reproduce the issue (either in a
    GitHub issue or in this PR)?

Copy link
Contributor

@hjabird hjabird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code itself looks good, but I don't understand the need to move from return test_skipped to GTEST_SKIP.

The original use of test_skipped seems more consistent with the tests from the other backends (eg. here). Can you comment on why GTEST_SKIP is needed in something that seems otherwise functionally equivalent?

@FMarno
Copy link
Contributor Author

FMarno commented May 1, 2023

mklgpu_run.log

@FMarno
Copy link
Contributor Author

FMarno commented May 1, 2023

The code itself looks good, but I don't understand the need to move from return test_skipped to GTEST_SKIP.

The original use of test_skipped seems more consistent with the tests from the other backends (eg. here). Can you comment on why GTEST_SKIP is needed in something that seems otherwise functionally equivalent?

test_skipped and EXPECT_TRUEORSKIP are oneMKL specific and will internally call GTEST_SKIP. Since the catch occurs at the top level of the test I would have to do EXPECT_TRUEORSKIP(test_skipped) but I just went straight to the GTEST_SKIP.

@FMarno
Copy link
Contributor Author

FMarno commented May 2, 2023

mklgpu_run.log
Updated log

@anantsrivastava30
Copy link
Contributor

Do you also think you can move

    if constexpr (domain == oneapi::mkl::dft::domain::REAL) {
        std::cout << "skipping real split tests as they are not supported" << std::endl;
        return test_skipped;
    }

this bit from the real_real test and skip the REAL domain from the compute_tests.cpp as a part of this PR

@anantsrivastava30
Copy link
Contributor

Please attach the CPU logs as well

@FMarno
Copy link
Contributor Author

FMarno commented May 2, 2023

Do you also think you can move

    if constexpr (domain == oneapi::mkl::dft::domain::REAL) {
        std::cout << "skipping real split tests as they are not supported" << std::endl;
        return test_skipped;
    }

this bit from the real_real test and skip the REAL domain from the compute_tests.cpp as a part of this PR

I would rather save that for a separate PR, I need to convince myself that its impossible for that to be implemented. Also I see it as a separate issue.
I did have the same thought though so most of the work is done here https://github.com/oneapi-src/oneMKL/compare/develop...FMarno:oneMKL:no_real_real_real2complex?expand=1

@FMarno
Copy link
Contributor Author

FMarno commented May 2, 2023

Please attach the CPU logs as well

mklcpu_run.log
mklcpu log

@anantsrivastava30
Copy link
Contributor

anantsrivastava30 commented May 2, 2023

this time around the logs have this :

977/977 Test #977: dft/EXAMPLE/CT/complex_fwd_buffer_mklcpu .........................................................................................................................................   Passed    0.30 sec

100% tests passed, 0 tests failed out of 977

Total Test time (real) = 260.39 sec

The following tests did not run:
	140 - DFT/RT/ComputeTestSuite/ComputeTests_real_real_in_place.REAL_SINGLE_in_place_real_real_buffer/sizes_8_batches_1_11th_Gen_Intel_R__Core_TM__i9_11900K___3_50GHz (Skipped)
...
...

but previously the behavior was to show these as passed but in the full logs (sample is from running ctest as well

1937 968/968 Test #1943: DFT/CT/DescriptorCommitTestSuite/DescriptorCommitTests.DescriptorCommitTestsComplexDouble/Intel_R__Core_TM__i7_6770HQ_CPU___2_60GHz .........................................   Passed    0.81 sec
1938
1939 100% tests passed, 0 tests failed out of 968
<EOF>

old LastTest.log:

 3660 [ RUN      ] ComputeTestSuite/ComputeTests_real_real_in_place.REAL_SINGLE_in_place_real_real_buffer/sizes_8_batches_1_Intel_R__Core_TM__i7_6770HQ_CPU___2_60GHz
 3661 skipping real split tests as they are not supported
 3662 [  SKIPPED ] ComputeTestSuite/ComputeTests_real_real_in_place.REAL_SINGLE_in_place_real_real_buffer/sizes_8_batches_1_Intel_R__Core_TM__i7_6770HQ_CPU___2_60GHz (78 ms)
 3663 [----------] 1 test from ComputeTestSuite/ComputeTests_real_real_in_place (78 ms total)
 3664
 3665 [----------] Global test environment tear-down
 3666 [==========] 1 test from 1 test suite ran. (78 ms total)
 3667 [  PASSED  ] 0 tests.

what attributes this change in behavior ?

@FMarno
Copy link
Contributor Author

FMarno commented May 2, 2023

The test log is from a run of ctest. the example you gave will have come from directly running test_main_dft_ct or test_main_dft_rt

@FMarno
Copy link
Contributor Author

FMarno commented May 5, 2023

@anantsrivastava30 are you satisfied with this answer? Is there anything you would like clarified/changed for this to be approved?

@anantsrivastava30
Copy link
Contributor

@anantsrivastava30 are you satisfied with this answer? Is there anything you would like clarified/changed for this to be approved?

I updated my initial question to indicate that I am running tests using ctest as well, and I see this huge tail at the end of every ctest run telling me that : these 100 odd tests did not run, I would have preferred that information to stay in the logs.

I however do not see that as a huge concern and every thing else looks good.

Copy link
Contributor

@anantsrivastava30 anantsrivastava30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@FMarno FMarno merged commit 004b2d4 into uxlfoundation:develop May 9, 2023
@FMarno
Copy link
Contributor Author

FMarno commented May 9, 2023

@anantsrivastava30 Thanks for clarifying. Unfortunately I don't see the same behaviour on develop (sha 4c7e7eb). I always see 977 tests running with the real to complex "real_real" tests being skipped.

@FMarno FMarno deleted the skip_unimplemented_tests branch May 9, 2023 10:26
FMarno added a commit that referenced this pull request May 9, 2023
* [DFT] Rearrange DFT compute tests so unimplemented always skips (#311)

* rearrange tests so unimplemented always skips

* wait to wait_and_throw, detect skipped tests

* Initial cuFFT integration

Currently only has support for inplace complex-to-complex single precision transforms

* throw from host task directly

* remove detail namespace where possible

* format

* update after rebase

* style change

* Implemented all cufft execution functions

* Increase the relative error margin so cufft backend passes tests

* Fix swapped input and output strides

* fix compile-time tests for cufft

* fix macro typo

* fix non cuda build and increase test accuracy error margin

* update README

* format with clang-format-10

* enable recommit in cuda backend

* change cuda context after call to cufftDestroy

* update dft example cmake

* update example readme

* typo in ENABLE_CUFFT_BACKEND description

* Update help text for the various backends

* use the correct copyright headers

* Fix cmake comment

* fix binary name in example

* Add an exception for when the user tries to scale with cufft

* fix warnings

* removed forward_scale in runtime example for cufft

* avoid creating plans with invalid strides
normallytangent pushed a commit to normallytangent/oneMKL that referenced this pull request Aug 6, 2024
…oundation#311)

* rearrange tests so unimplemented always skips

* wait to wait_and_throw, detect skipped tests
normallytangent pushed a commit to normallytangent/oneMKL that referenced this pull request Aug 6, 2024
…on#284)

* [DFT] Rearrange DFT compute tests so unimplemented always skips (uxlfoundation#311)

* rearrange tests so unimplemented always skips

* wait to wait_and_throw, detect skipped tests

* Initial cuFFT integration

Currently only has support for inplace complex-to-complex single precision transforms

* throw from host task directly

* remove detail namespace where possible

* format

* update after rebase

* style change

* Implemented all cufft execution functions

* Increase the relative error margin so cufft backend passes tests

* Fix swapped input and output strides

* fix compile-time tests for cufft

* fix macro typo

* fix non cuda build and increase test accuracy error margin

* update README

* format with clang-format-10

* enable recommit in cuda backend

* change cuda context after call to cufftDestroy

* update dft example cmake

* update example readme

* typo in ENABLE_CUFFT_BACKEND description

* Update help text for the various backends

* use the correct copyright headers

* Fix cmake comment

* fix binary name in example

* Add an exception for when the user tries to scale with cufft

* fix warnings

* removed forward_scale in runtime example for cufft

* avoid creating plans with invalid strides
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants