-
-
Notifications
You must be signed in to change notification settings - Fork 51
NEW: Export CF_TORCH_CUDA_ARCH_LIST to environment #464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( I do have some suggestions for making it better though... For recipe/meta.yaml:
This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/21009919321. Examine the logs at this URL for more detail. |
recipe/deactivate.bat
Outdated
| @@ -0,0 +1,6 @@ | |||
| @echo on | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no echo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recipe/activate.sh
Outdated
| if [[ ! -v CF_TORCH_CUDA_ARCH_LIST ]] | ||
| then | ||
| export CF_TORCH_CUDA_ARCH_LIST="@cf_torch_cuda_arch_list@" | ||
| export CF_TORCH_CUDA_ARCH_LIST_BACKUP="UNSET" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UNSET is not the greatest name already, but using it on unix is even worse, because there unset is actually a valid command, and we can detect the difference between an unset and an empty environment variable. No such luck on windows, so it makes sense there.
I can imagine keeping the current setup for uniformity if you want to declare this all internal to the package, but then both activate.sh and activate.bat need an explanatory comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can imagine keeping the current setup for uniformity if you want to declare this all internal to the package, but then both activate.sh and activate.bat need an explanatory comment.
This still applies. Windows should have a comment that we cannot distinguish unset from empty, so we use a placeholder. And using a placeholder on unix rather than (more properly) determing whether a variable is set/unset in bash needs a comment that this is for uniformity with windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h-vetinari
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine from my side. We can incorporate this in the next PR
|
@h-vetinari, do we want to include it in the old branches as well, or just 2.10 when it is ready? |
|
I'd prefer to do this at a version boundary, i.e. only for 2.10 |
Closes: conda-forge#464 Signed-off-by: Michał Górny <[email protected]>
|
Looks like the activation script doesn't work on osx: https://github.com/conda-forge/pytorch-cpu-feedstock/actions/runs/20980286298/job/60303616215?pr=475 That said, I wonder if we should be installing them at all for non-CUDA builds. Perhaps we should just make that conditional to I can do the necessary changes, just need confirmation that I'm not missing something. |
|
(FWICS the problem is that macOS hosts are using bash 3.2, which doesn't support |
|
@mgorny, can you please propose a fix? I don't have any macOS devices. Unless you think I can debug this by installing bash 3.2 on a Linux host. |
Yeah, I'm pretty sure you can reproduce it with bash 3.2 on Linux. However, as I said above, I think we shouldn't be installing these activation files when PyTorch is built without CUDA, right? |
OK. I'll wrap the activation install commands in a conditional. |
…6.01.13.21.47.52 Other tools: - conda-build 25.11.1 - rattler-build 0.55.0 - rattler-build-conda-compat 1.4.7
|
Thanks. Testing in #475. |
Adds activation/deactivation scripts which export CF_TORCH_CUDA_ARCH_LIST into the environment. This variable records the CUDA architectures that were targeted when pytorch was built so that downstream feedstocks can automatically follow the same archs that are used here by adding something like:
to their build scripts.
Checklist
0(if the version changed)conda-smithy(Use the phrase@conda-forge-admin, please rerenderin a comment in this PR for automated rerendering)Closes #423