Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upReduce compile-time issues #376
Conversation
gnzlbg
added some commits
Mar 16, 2018
gnzlbg
requested a review
from
alexcrichton
Mar 16, 2018
gnzlbg
added some commits
Mar 16, 2018
This comment has been minimized.
This comment has been minimized.
|
Nice! I'm personally always a fan though of staying as close to I think that may bring the compile times down to a reasonable level for the portable intrinsics to be unconditionally compiled when testing coresimd? |
This comment has been minimized.
This comment has been minimized.
The problems aren't really the intrinsics, the problem is the tests for the portable vector types. Right now all APIs are implemented via macros for all types, and these macros also add the tests for each type. This way when we add a new API or a new vector type, tests are automatically added for all cases, and this catches a lot of errors. We could just put the tests of the portable vector types into a coresimd/tests/ subdirectory, with one vector size per file, but then we need to manually add the tests for each vector type there. If we could automate that somehow, then that would be great. Otherwise I would prefer to keep the tests together until the portable vector types APIs stop changing much. |
This comment has been minimized.
This comment has been minimized.
|
For example, another approach could be to link the coresimd/src/ppsv/v{...}.rs files to coresimd/test/v{...}.rs and somehow leave only the tests in there, but i couldn't make this work. |
This comment has been minimized.
This comment has been minimized.
|
Hm we don't expect the number of portable vectors to be changing much though, right? In that sense if an API is added/changed the test needs to be updated/added anyway, so would that work alright to split those out? |
gnzlbg commentedMar 16, 2018
•
edited
Adds the following
--cfgattributes:test_intr: enables thecore::archteststest_v{16,32,...,512}: enables the portable vector tests for the different sizesFirst we continue to run the
stdsimdtests as usual, but now these include only thedoctests and thedetect(run-time feature detection) tests, as well as building examples and running the tests in the/testsfolders.Then we use
cargo rustc ... -- --cfg test_{sub_test_name}to build the tests for each of the sub-tests above, and finally we just loop over all the binaries running all these tests.This makes rustc much happier, because instead of compiling all tests at once, it compiles them in batches. The only issue is that we have to recompile
coresimdfor eachtest_{...}case above, but at least it is onlycoresimd- the dev dependencies are compiled only once.