Skip to content
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

cxx_compiler_version incompatible with nvcc #1000

Closed
h-vetinari opened this issue Dec 6, 2020 · 8 comments
Closed

cxx_compiler_version incompatible with nvcc #1000

h-vetinari opened this issue Dec 6, 2020 · 8 comments

Comments

@h-vetinari
Copy link
Member

On the faiss-feedstock, we're building per cuda-version, and with the recent compiler upgrades, this now hits the limit for what nvcc supports:

/usr/local/cuda/bin/nvcc -I /usr/local/cuda/targets/x86_64-linux/include/ -Xcompiler -fPIC -Xcudafe --diag_suppress=unrecognized_attribute -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_75,code=compute_75 -lineinfo -ccbin /home/conda/feedstock_root/build_artifacts/faiss-split_1606947926843/_build_env/bin/x86_64-conda-linux-gnu-c++ -std=c++14 -DFAISS_USE_FLOAT16 -I. -g -O3 -c gpu/GpuDistance.cu -o gpu/GpuDistance.o
In file included from /usr/local/cuda/targets/x86_64-linux/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/local/cuda/targets/x86_64-linux/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~

I've been trying what feels like dozens of different ways (e.g. here) to work around this using a local conda_build_config.yaml, but it seems the pinning always overrides my values in _combine_spec_dictionaries and then I get zipkey-length-conflicts.

Rather than trying to figure out how to fix this on a per-feedstock basis, I'm I'm now thinking that this should be fixed on the cfp-side directly (hence this issue), because presumably other recipes will also (eventually) be affected.

@mbargull
Copy link
Member

mbargull commented Dec 7, 2020

From conda-forge/faiss-split-feedstock#18 (comment) :

ValueError: All entries associated by a zip_key field must be the same length.
[...]
cxx_compiler_version and cuda_compiler_version are different (1 and 5)

Smells like conda/conda-build#3974 ...

@jakirkham
Copy link
Member

Also likely related to issue ( conda-forge/nvcc-feedstock#51 ).

@leofang
Copy link
Member

leofang commented Dec 29, 2020

@isuruf Does it make sense to change this part of the migrator

c_compiler_version: # [linux]
- 7 # [linux64 or aarch64]
- 8 # [ppc64le]
cxx_compiler_version: # [linux]
- 7 # [linux64 or aarch64]
- 8 # [ppc64le]

as follows?

 c_compiler_version:     # [linux] 
   - 7                   # [linux64 or aarch64] 
   - 8                   # [ppc64le] 
   - 9                   # [cuda_compiler_version == '11.0']
 cxx_compiler_version:   # [linux] 
   - 7                   # [linux64 or aarch64] 
   - 8                   # [ppc64le] 
   - 9                   # [cuda_compiler_version == '11.0']

This way when using CUDA 11.0 we can use gcc 9, which is recommend in the Installation Guide, but for older CUDA we use gcc 7.

@isuruf
Copy link
Member

isuruf commented Dec 29, 2020

No, only selectors allowed are the os/arch selectors.

@leofang
Copy link
Member

leofang commented Dec 29, 2020

I see. So is there a way to enable gcc 9 for CUDA 11+?

@leofang
Copy link
Member

leofang commented Dec 29, 2020

I see. So is there a way to enable gcc 9 for CUDA 11+?

btw for context: with #1052 all CUDA builds fall back to gcc 7 now, so it works for all CUDA versions (9.2 - 11.0). The discussion is about enabling gcc 9 for CUDA 11.0+ only.

@h-vetinari
Copy link
Member Author

I see. So is there a way to enable gcc 9 for CUDA 11+?

I can't speak about the migrator, and how it's affected by updates to zip-keys in the pinning, but generally, it should be possible to add c[xx]_compiler_version to the zip_keys involving the cuda_compiler_version to get that.

@h-vetinari
Copy link
Member Author

Closing this out as out-of-date (was solved in the meantime by conda-forge/conda-smithy#1544 and follow-ups).

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 a pull request may close this issue.

5 participants