cudnn-frontend
cudnn-frontend copied to clipboard
CUDNN_FRONTEND_BUILD_UNIT_TESTS option is broken
When I configure with -DCUDNN_FRONTEND_BUILD_UNIT_TESTS=ON
, I get
CMake Error at CMakeLists.txt:49 (add_subdirectory):
The source directory
/path/to/cudnn-frontend/1.1.0/test
does not contain a CMakeLists.txt file.
Is the test/
directory supposed to have some content that comes from somewhere else?
Hi @iskunk ,
Thanks for reporting this. At this point the UNIT_TESTS are internally being used to test. Hence we do not support that switch publicly. Rather we have tests in the samples/cpp
folder which are user facing and more informative.
Let us know, if you have any particular need for UNIT_TESTS and/or any samples that you would like to be added.
Thanks
In that case, I would suggest naming the switch something like CUDNN_FRONTEND_BUILD_INTERNAL_TESTS
, along with appropriate description/comment verbiage, to make clear that it is not intended for use outside of Nvidia. It is common for OSS projects to provide unit tests, and an option to build/run them, so the current situation looks like an oversight to a third party.
Assuming that the samples
program is intended to be the test suite for external users, I would also suggest adding this bit to samples/CMakeLists.txt
:
add_custom_target(test COMMAND samples "\\*")
This way, running make test
will invoke the test suite, per convention, returning an error if anything fails. (AFAICT, passing in a literal asterisk is how one requests all tests to be run? Please correct me if not.)