Skip to content

Rebuild for cuda110 - #13

Merged
h-vetinari merged 5 commits into
conda-forge:masterfrom
regro-cf-autotick-bot:rebuild-cuda110-0-1_hf1bdd8
Oct 8, 2020
Merged

h-vetinari merged 5 commits into
conda-forge:masterfrom
regro-cf-autotick-bot:rebuild-cuda110-0-1_hf1bdd8

Conversation

@regro-cf-autotick-bot

Copy link
Copy Markdown
Contributor

This PR has been triggered in an effort to update cuda110.

Notes and instructions for merging this PR:

  1. Please merge the PR only after the tests have passed.
  2. Feel free to push to the bot's branch to update this PR if needed.

Please note that if you close this PR we presume that the feedstock has been rebuilt, so if you are going to perform the rebuild yourself don't close this PR until the your rebuild has been merged.

This package has the following downstream children:

And potentially more.

If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase @conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

This PR was created by the regro-cf-autotick-bot.
The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. If you would like a local version of this bot, you might consider using rever. Rever is a tool for automating software releases and forms the backbone of the bot's conda-forge PRing capability. Rever is both conda (conda install -c conda-forge rever) and pip (pip install re-ver) installable.
Finally, feel free to drop us a line if there are any issues!
This PR was generated by , please use this URL for debugging

@conda-forge-linter

Copy link
Copy Markdown

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 (recipe) and found it was in an excellent condition.

@h-vetinari

Copy link
Copy Markdown
Member

@teju85

We're not currently building for Ampere here - do you think I should add 80 to the ARCHES here? And would you know what's the minimum cuda version that supports building for Ampere?

# the following are all the x86-relevant gpu arches; for building aarch64-packages, add: 53, 62, 72
ARCHES=(35 50 52 60 61 70)
LATEST_ARCH=70
if [ ${cuda_compiler_version} != "9.2" ]; then
# cuda 9.2 does not support Turing (sm_75)
ARCHES+=(75)
LATEST_ARCH=75
fi
for arch in "${ARCHES[@]}"; do
CUDA_ARCH="${CUDA_ARCH} -gencode=arch=compute_${arch},code=sm_${arch}";
done
# to support PTX JIT compilation; see first link above or cf.
# devblogs.nvidia.com/cuda-pro-tip-understand-fat-binaries-jit-caching
CUDA_ARCH="${CUDA_ARCH} -gencode=arch=compute_${LATEST_ARCH},code=compute_${LATEST_ARCH}"

@teju85

teju85 commented Oct 8, 2020

Copy link
Copy Markdown

@h-vetinari yes, you will have to add 80 to the ARCHES list and the minimum cuda version that supports it is 11.0.

I also couldn't help but notice the check used to conditionally add newer arch support. To be portable across multiple cuda versions that we throw at this script, it needs to be updated to:

 if [ `echo "${cuda_compiler_version} >= "10.0" | bc` = "1" ]; then 
     # cuda >= 10.0 supports Turing (sm_75) 
     ARCHES+=(75) 
     LATEST_ARCH=75 
 fi
 if [ `echo "${cuda_compiler_version} >= "11.0" | bc` = "1" ]; then 
     # cuda >= 11.0 supports Ampere (sm_80) 
     ARCHES+=(80) 
     LATEST_ARCH=80 
 fi

@h-vetinari

Copy link
Copy Markdown
Member

Thanks a lot for the quick reply @teju85! You're absolutely right that the script could be improved, it was just hacked together based on the conditions at the time, which allowed things to be handled with a single if.

I committed your suggestion just now, let's see how it goes (my machine didn't have bc for example).

@h-vetinari
h-vetinari force-pushed the rebuild-cuda110-0-1_hf1bdd8 branch 2 times, most recently from 887aa6b to 5b1e784 Compare October 8, 2020 08:07
@teju85

teju85 commented Oct 8, 2020

Copy link
Copy Markdown

You're welcome.

My bad, I should have mentioned this earlier! Using bc is one way to do this. But if you know of other, more robust ways to
express this in shell script, please feel free to use those too.

@h-vetinari

Copy link
Copy Markdown
Member

@jakirkham @isuruf

I'm getting tons of warnings like the following on the cuda11 build:

warning: CUB requires C++14. Please pass -std=c++14 to your compiler.
warning: Thrust requires C++14. Please pass -std=c++14 to your compiler.

Any reason we shouldn't use -std=c++14 for cuda11?

@jakirkham

Copy link
Copy Markdown
Member

Using C++14 should be fine. Though we might be using an even newer version by default like C++17. It can be overridden though.

CUDA 11.0 includes CUB and Thrust. I’m not sure to what extent faiss uses them though. Hopefully that provides some more context.

@h-vetinari

Copy link
Copy Markdown
Member

@jakirkham, thanks!

Default seems to be c++11 though:
.../x86_64-conda-linux-gnu-c++ -std=c++11 -DFINTEGER=int ...

@jakirkham

Copy link
Copy Markdown
Member

The features added between C++11 and C+14 is quite small. So bumping should be fine.

Though I must admit the use of C++11 is a bit unexpected

@h-vetinari

Copy link
Copy Markdown
Member

I agree on the first count, no opinion on the second.

I didn't find anything in the cf knowledge base or the compiler tools reference about how to set the standard version though, and GH sucks at searching for "c++" so I couldn't find something in the various repos (e.g. conda-build) where this might be tucked away. Help appreciated. :)

@h-vetinari
h-vetinari force-pushed the rebuild-cuda110-0-1_hf1bdd8 branch 5 times, most recently from c50b008 to 52554b4 Compare October 8, 2020 14:22
Suggested-By: Thejaswi Rao <rao.thejaswi@gmail.com>
Coauthored-By: Thejaswi Rao <rao.thejaswi@gmail.com>
@h-vetinari
h-vetinari force-pushed the rebuild-cuda110-0-1_hf1bdd8 branch 3 times, most recently from fb7dad3 to 5288335 Compare October 8, 2020 18:24
nvcc does not support c++17 yet;
need to regenerate ./configure to take effect
@h-vetinari
h-vetinari force-pushed the rebuild-cuda110-0-1_hf1bdd8 branch from 5288335 to ea8c129 Compare October 8, 2020 18:28
@jakirkham

Copy link
Copy Markdown
Member

My understanding is this is where we set the C++ flags. FWICT it is using C++17. Is it possible C++11 is coming from something else (perhaps in faiss' build scripts)?

@h-vetinari

Copy link
Copy Markdown
Member

@jakirkham
The setting was hidden somewhere deep in the autoconf setup of the faiss-sources. I patched it to c++14, because nvcc apparently doesn't suppor c++17 yet.

Warnings are gone now and everything builds correctly, so merging.

@h-vetinari
h-vetinari merged commit 4ed3e5d into conda-forge:master Oct 8, 2020
@regro-cf-autotick-bot
regro-cf-autotick-bot deleted the rebuild-cuda110-0-1_hf1bdd8 branch October 8, 2020 23:32
@jakirkham

Copy link
Copy Markdown
Member

Ah ok. That makes sense.

Yeah sticking with C++14 sounds like a better choice.

Great! Thanks for working on this 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants