-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
set CF_CUDA_ENABLED=True if compiler('cuda')
is detected in meta.yaml
#1544
Conversation
Rendering and then setting the env variable is too late. You have to set the env variable at the same time that |
This means it's necessary to go back to line-based processing
c7b70ad
to
d7f9ff6
Compare
compiler('cuda')
is detected in meta.yaml
Ping @isuruf, I added a test and it's green now. :) |
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.
The test doesn't really test that the CF_CUDA_ENABLED
is set during rerendering time. The easiest way to check is to add a skip like skip: True # [os.environ.get("CF_CUDA_ENABLED") == "True"]
and see if the build was skipped.
I didn't understand the test design here very well (for example it seems most tests brings their own fixture?), so I tried to follow the test for Or - since you approved the changes - that this is not necessary now? |
Thanks for the corrections! I cannot commit them through the GH UI (not enough rights here), but if you want I can recreate them locally? |
96a8dee
to
e418061
Compare
e418061
to
17f79b1
Compare
Can you add a news entry? |
From the discussion in conda-forge/conda-forge-pinning-feedstock#1708, and particularly, this description of what to do.
I couldn't think of a way to detect
compiler('cuda')
, because - AFAICT - the ingestion ofmeta.yaml
is done a couple lines above byconda_build.api.render
, and after that, the jinja-functions will have already been filled in.I think it's a feasible workaround though to just use
r"^nvcc.*"
(as a build requirement) as a stand-in for detecting that.I haven't yet written a test for it, this is more to check whether I'm on the right path.
CC @isuruf @jakirkham