Set compiler versions in context#755
Conversation
Simplify the logic necessary to handle compiler versions by folding it into the context.
jakirkham
left a comment
There was a problem hiding this comment.
Gave a rough overview of the relevant changes below
Generally the idea is push more things into context where it can be written compactly. Keeping only the relevant differentiator (CUDA version) in the variant file
| cat > variants.yaml << EOF | ||
| cuda_version: | ||
| - ${RAPIDS_CUDA_VERSION} |
There was a problem hiding this comment.
This writes out the common variant file content for all cases
| if [[ "$(arch)" == "aarch64" ]]; then | ||
| cat >> variants.yaml << EOF | ||
| - 12.1 # The last version to not support cufile |
There was a problem hiding this comment.
Then the legacy CUDA ARM builds are appended to the file
This also makes it easier to drop this section of code when it no longer applies
| should_use_cufile: ${{ x86_64 or (aarch64 and cuda_version >= "12.2") }} | ||
| c_compiler_version: ${{ 13 if should_use_cufile else 12 }} | ||
| cxx_compiler_version: ${{ c_compiler_version }} |
There was a problem hiding this comment.
Instead of setting different compiler versions in the CUDA variant file, we just set them here in the context. Also this ties them to the relevant thing. Namely whether we can build with cuFile or not
We can see this works as intended with the CUDA 12.1 ARM build
│ │ │ cuda-version ┆ 12.1 ┆ h1d6eff3_3 ┆ conda-forge ┆ 20.56 KiB │
│ │ │ gcc_impl_linux-aarch64 ┆ 12.4.0 ┆ h628656a_2 ┆ conda-forge ┆ 56.19 MiB │
│ │ │ gcc_linux-aarch64 ┆ 12.4.0 ┆ heb3b579_10 ┆ conda-forge ┆ 31.88 KiB │
│ │ │ gxx_impl_linux-aarch64 ┆ 12.4.0 ┆ h0bf7a72_2 ┆ conda-forge ┆ 11.36 MiB │
│ │ │ gxx_linux-aarch64 ┆ 12.4.0 ┆ h3f57e68_10 ┆ conda-forge ┆ 30.23 KiB │
vyasr
left a comment
There was a problem hiding this comment.
This approach seems sensible to me John, thanks for the cleanup!
|
/merge |
|
Happy to help :) |
This reverts commit 5918cf3.
Closes #773 Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Bradley Dice (https://github.com/bdice) URL: #784
Simplify the logic necessary to handle compiler versions by folding it into the context.