-
Allison Vacanti authored
Issue #399 reported that we were missing several test cases in CUB that were ifdef'd out. This patch enables most of those tests, though CDP tests are not added here. Some other deficiencies were addressed as they were noticed, for instance, adding value_types other than unsigned char to test_block_histogram. The way we split up tests into "BENCHMARK", "MINIMAL", and "THOROUGH" variants wasn't well suited for regression testing, as a lot of redundant code paths were generated between the various test executables. These have been removed, leaving only the "THOROUGH" tests, which should capture all test cases. Benchmarks should go into the new `thrust_benchmark` project. Some tests also took an excessively long time to build, especially after enabling the missing test cases from #399. This patch adds a new mechanism that allows a test to include a comment such as: ``` // %PARAM% TEST_FOO foo 0:1:2 // %PARAM% TEST_BAR bar 4:8 ``` CMake will parse these out, and generate multiple test executables for each combination of parameters, e.g: ``` cub.test.baz.foo_0.bar_4 -DTEST_FOO=0 -DTEST_BAR=4 cub.test.baz.foo_0.bar_8 -DTEST_FOO=0 -DTEST_BAR=8 cub.test.baz.foo_1.bar_4 -DTEST_FOO=1 -DTEST_BAR=4 cub.test.baz.foo_1.bar_8 -DTEST_FOO=1 -DTEST_BAR=8 cub.test.baz.foo_2.bar_4 -DTEST_FOO=2 -DTEST_BAR=4 cub.test.baz.foo_2.bar_8 -DTEST_FOO=2 -DTEST_BAR=8 ``` This can be used to quickly split up problematically large tests. See the note at the top of cub/test/CMakeLists.txt for more details. The PrintNinjaBuildTimes.cmake file from Thrust was used to identify tests that needed to be split. Several tests were testing Thrust APIs. This isn't necessary, as Thrust has it's own test suite. These tests have been removed. This isn't needed for regression testing and has been removed. Some of the other command line options could also be removed now that benchmarking isn't handled by these regression tests, but this is a start. Extended testing revealed that the cub::BlockHistogram algorithm's behavior is undefined when input values are outside of [0, BINS). Added this info to the algorithm docs. * test_device_histogram from 15m -> 35s. * test_device_run_length_encode from 7m -> 3s. * test_device_scan tests from <3m -> <4s. # Conflicts: # test/test_device_radix_sort.cu # Conflicts: # test/test_device_radix_sort.cu
2f450143
After you've reviewed these contribution guidelines, you'll be all set to
contribute to this project.