Repository navigation
Adding iree-hal-drivers-amdgpu-tests target. - #21389
Conversation
b7df52c to
56ab9e4
Compare
| iree_runtime_cc_test( | ||
| name = "buffer_pool_test", | ||
| srcs = ["buffer_pool_test.cc"], | ||
| group = "iree-hal-drivers-amdgpu-tests", |
There was a problem hiding this comment.
In VSCode, you can also run all tests under a given subdirectory using this setting in https://marketplace.visualstudio.com/items?itemName=fredericbonnet.cmake-test-adapter
"cmakeExplorer.suiteDelimiter": "/",Just click one of the run buttons:
That won't work across directories but what you are adding here is only under runtime/src/iree/hal/drivers/amdgpu anyways. I'd prefer that style of general solution that requires no new code over the +50 LOC this adds for a single group. If we wanted to add more groups and utility targets that would add lots of extra boilerplate.
There was a problem hiding this comment.
that's what this is for :) unfortunately, that run command only builds whatever the active cmake build target is (so if your build target is iree-compile and you click run on those tests it'll invoke cmake to build iree-compile then run the tests with out of date binaries!). absolutely bonkers. so you have to build each target independently in order to run the directory - this PR is intended as a way to do that (set this build target and then you can run the tests there with up-to-date binaries).
There was a problem hiding this comment.
Would fixing #11331 help with the out of date binaries?
There was a problem hiding this comment.
also, cmake tools added native test suite support - now you do "cmake.ctest.testSuiteDelimiter": "/", and no longer need that extension! it's got just as many bugs as the extension just in different ways, but such is cmake :P
There was a problem hiding this comment.
here's the sadness, where they take in a list of tests build just build the whole default target (undefined): https://github.com/microsoft/vscode-cmake-tools/blob/8ed18b224ad14799992465010a7e5ab46a6fa16a/src/ctest.ts#L1120C4-L1120C20
There was a problem hiding this comment.
RE #11331: don't think so; the goal here is to not do a full rebuild of the project to run a few unit tests (building iree-test-deps with a runtime change would trigger a compiler rebuild because of consteval, and then all vmfbs would be regenerated - and not the actual unit tests)
AFAICT the cmake extension just doesn't support building what you request to run via the test explorer
This makes it easy to build all of the AMDGPU HAL tests at once as part of an IDE action. This is accomplished by adding an optional `group` to cc_test rules that appends each test to a custom target.
56ab9e4 to
3976ab7
Compare
|
Updated to not require the global CMakeLists.txt target - now tests can declare themselves part of a group from anywhere and properly be disabled when a subdir is not included (disabled options/etc). |
|
Awesome! |
This makes it easy to build all of the AMDGPU HAL tests at once as part of an IDE action. This is accomplished by adding an optional `group` to cc_test rules that appends each test to a custom target.
This makes it easy to build all of the AMDGPU HAL tests at once as part of an IDE action. This is accomplished by adding an optional
groupto cc_test rules that appends each test to a custom target.