Repository navigation
[BUILD] change cuda and hip to default off - #17996
Conversation
|
@ScottTodd You are changing a lot of this scripts at the moment right? How much do you still have to change? Can you give me a hint what needs to be updated afterwards? I would like to get this in soonish, because the Aarch64 CUDA package is regarded as a follow-up and I want to unblock this path. |
Yep, sorry for not giving this much (visible) attention. It's still in my queue and top of mind. I've been mainly organizing the CI and PkgCI workflows so we have fewer builds requiring large self-hosted runner VMs and we build release packages on host platforms then test packages across targets. This is adjacent to some of that and I expect it will be easier to manage once the dust settles a bit more (~ 1 week?). We could try to push through both at the same time, but I'd prefer to focus my attention and limit the surface area of builds to debug. Here's how I think this can work out:
Steps 2-3 are still a bit unclear in my head right now... there are too many indirection layers to make those changes with confidence right now. We also have some macOS |
|
Sound good. Let's get your changes in first. After editing them I am not a huge fand of the |
I'm trying to reduce the number of scripts that we have in [`build_tools/cmake/`](https://github.com/iree-org/iree/tree/main/build_tools/cmake), so changes like #17996 will be easier to make with confidence. This makes the `build_test_runtime` CI job no longer depend on these scripts: * [`build_tools/cmake/build_runtime.sh`](https://github.com/iree-org/iree/blob/main/build_tools/cmake/build_runtime.sh) * After this, the last use will be deleted in #18144 * [`build_tools/cmake/setup_build.sh`](https://github.com/iree-org/iree/blob/main/build_tools/cmake/setup_build.sh) * [`build_tools/cmake/setup_ccache.sh`](https://github.com/iree-org/iree/blob/main/build_tools/cmake/setup_ccache.sh) These layers of scripts made it somewhat easier to have CI workflows just run scripts, but the scripts grew branches over time that obscured what was actually running. In many cases the commands are quite simple and can just be inlined. Other ideas for simplification: * Use https://github.com/marketplace/actions/get-cmake to install Ninja across platforms (with caching) * Use https://github.com/marketplace/actions/run-cmake together with CMake presets ("configure"/"build"/"test", possibly also "workflow") * Reduce reliance on [`build_tools/cmake/ctest_all.sh`](https://github.com/iree-org/iree/blob/main/build_tools/cmake/ctest_all.sh) - that excludes some tests based on platform (e.g. Windows) and adds exclude labels for tests that need special hardware (e.g. GPUs), but ideally `ctest` would work out of the box without such a script ci-exactly: build_test_runtime
|
I've started deleting or limiting the use of the Consider the case of the 'runtime' job matrix: Lines 151 to 216 in a7e5788 should the macos build there opt-in to |
|
Sorry, refactoring the scripts and workflows is taking longer than originally anticipated (shocker 😅). We could try this again rebased on the latest scripts, but there will still be some plumbing through env vars and confusing indirection to watch out for. We also have a few breaking changes in flight to batch together into a stable release. This sort of change could also be included in that batch. |
|
No worries! Disabling stuff in the default build does not change the release imo. However the AArch64 CUDA backend would. Maybe we can get that at least in? Would be separete from this. I am going to take a look at cmake presets. Can you maybe explain what Because these can interact badly with tools from the README refers to? |
We should end up with the same set of available compiler target backends and runtime HAL drivers in the distributed release artifacts, yes. Any developers building from source will need to opt-in and enable the features that they want though, and that's what I'd like to batch with other breaking changes. Release notes (if we finally write them this time 😅) would then call that out as something developers updating would want to be aware of.
With VSCode in particular, see https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/cmake-presets.md#enable-cmakepresetsjson-in-the-cmake-tools-extension. The default behavior when a |
|
Hmm yeah you have a point about the release notes. When is that release planned? Regarding the presets, I think we converged to a minimal build without most backends, didn't we? They have things like conditionals in newer versions. I will try them out to see how that works and give feedback hopefully at the end of this week. |
We've been trying to promote a nightly release to stable around once a month, and the last release was ~1 month ago, so soon. I'm expecting that we'll try to formalize the process more over the coming weeks/months.
Yep. We have a few presets like this "minimal" one already: iree/build_tools/cmake/presets/options.json Lines 11 to 15 in 0247962 Any feedback or improvements on the setup there would be appreciated. |
|
@ScottTodd So I played around with presets a bit and I think the ergonomics from the command line are ok. However I feel like the behavior with the cmake extension is a bit weird. I am not using that extension for other reasons (no color output, automatic configuration, etc.), so I am probably the wrong person to ask here. Also the conditionals depend on env variables, which wouldn't be better than now... It feels like we would end up with a python script to create user presets and I am not sure if that would be really better than just using something like python to begin with... |
e92814d to
4258a85
Compare
|
@ScottTodd I am in the process of updating the PR. I just wanted to ping you because the CUDA tests for example are marked as passed even though they didn't run... Is there a way to mark them as required? |
Are you referring to these? https://github.com/iree-org/iree/actions/runs/10562806742/job/29262093188?pr=17996#step:11:75 The logic for that is here: iree/build_tools/cmake/iree_check_test.cmake Lines 113 to 150 in 7a7bfe1 I set it up that way to show which tests could run, if the backends were enabled. One of my goals for https://github.com/iree-org/iree-test-suites is to make the tests explicit and obvious. That's hard when the tests are so tightly linked with CMake build settings (including cross-compilation). In the separate repo we can define pytest labels/marks/filters and CMake options unique to the test suites. |
|
@ScottTodd I think this PR is now ready. Enabling CUDA for Aarch64 is now also just a change in an if-statement. |
ScottTodd
left a comment
There was a problem hiding this comment.
Hopefully the last batch of comments from me. Looks good with a few small edits!
|
Thanks for the review! I am OOO until Monday and cannot update until then. Just fyi because we also talked about the release this week. |
There was a problem hiding this comment.
I think the iree/compiler/Codegen/LLVMCPU/test/select_aarch64_sme_lowering_strategy.mlir.test test failures (e.g. https://github.com/iree-org/iree/actions/runs/10668091799/job/29567045891?pr=17996#step:5:599) should be unrelated to these changes. Can you sync the branch used here? (Merge main into your branch, or rebase)
a588cf9 to
deb31b5
Compare
|
@ScottTodd I will merge now, but it is also end of day in Germany. Please revert if this breaks something. |
As discussed in iree-org#17564 the default build should not include targets that require an SDK. This PR disables CUDA and ROCM by default.
As discussed in iree-org#17564 the default build should not include targets that require an SDK. This PR disables CUDA and ROCM by default.
As discussed in #17564 the default build should not include targets that require an SDK. This PR disables CUDA and ROCM by default.