conda-forge / faiss-split-feedstock

A conda-smithy repository for faiss-split.
BSD 3-Clause "New" or "Revised" License
4 stars 15 forks source link

Rebuild for cuda110 #13

Closed regro-cf-autotick-bot closed 4 years ago

regro-cf-autotick-bot commented 4 years ago

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 code>@<space/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 commented 4 years ago

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 commented 4 years ago

@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?

https://github.com/conda-forge/faiss-split-feedstock/blob/45baa90f1d0e1525ead09a2cc8fea409518f4040/recipe/build-lib.sh#L8-L21

teju85 commented 4 years ago

@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 commented 4 years ago

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).

teju85 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

@jakirkham, thanks!

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

jakirkham commented 4 years ago

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 commented 4 years ago

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. :)

jakirkham commented 4 years ago

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 commented 4 years ago

@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.

jakirkham commented 4 years ago

Ah ok. That makes sense.

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

Great! Thanks for working on this 😄