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

failed to build from source with CUDA architecture of 86 #1024

Open
jasonppy opened this issue Oct 6, 2022 · 7 comments
Open

failed to build from source with CUDA architecture of 86 #1024

jasonppy opened this issue Oct 6, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@jasonppy
Copy link

jasonppy commented Oct 6, 2022

Bug Description

I tried to build from source by following the instructions in readme, at step
cmake .. -DCMAKE_BUILD_TYPE=Release -DFL_BUILD_ARRAYFIRE=ON -DCMAKE_CUDA_ARCHITECTURES=86, it gives an error

CMake Error at /usr/local/share/cmake-3.23/Modules/CMakeDetermineCUDACompiler.cmake:653 (message):
  The CMAKE_CUDA_ARCHITECTURES:

    86

  do not all work with this compiler.  Try:

    

  instead.
Call Stack (most recent call first):
  CMakeLists.txt:88 (enable_language)

Note that A40 has architecture 86.

Platform and Hardware

OS:
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit

gcc (Ubuntu 9.3.0-17 ubuntu1~20.04) 9.3.0
cmake version 3.23.0-rc1

Thanks!

@jasonppy jasonppy added the bug Something isn't working label Oct 6, 2022
@jacobkahn
Copy link
Member

What's your CUDA version? Looks like you're trying to use an arch version which is newer than your CUDA version's nvcc will support.

@jasonppy
Copy link
Author

jasonppy commented Oct 6, 2022

Thanks for your quick reply! The CUDA version is 11.5

@kovalyshyn
Copy link

I have the same architecture 86. With CUDA 11.8 I haven't such issue.
But I have this issue #1033

@jacobkahn
Copy link
Member

@jasonppy — this command works for me without issue:

cmake .. -DCMAKE_BUILD_TYPE=Release -DFL_USE_ONEDNN=OFF -DFL_USE_ARRAYFIRE=ON -DFL_ARRAYFIRE_USE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=86

a few odd things about yours -- FL_BUILD_ARRAYFIRE isn't a valid build option -- you need FL_USE_ARRAYFIRE. I'll check the docs to see if that's a mistake, but I'm not sure why you'd have a problem. I also tested this with CMake 3.25 rc1.

@jasonppy
Copy link
Author

Thanks for your reply. The command in your reply leads to the same error

@jacobkahn
Copy link
Member

@jasonppy ah, you're on 0.3.2 — looks like new versions of CMake that set the CUDA arch flag in the way they do don't work with the copied CUDA shims.

Can you checking main and try to build from source, or is there a particular reason you need 0.3.2?

@jasonppy
Copy link
Author

are you referring to #1033 ? This is not me...
I'm always on the latest commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants