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

Support NVidia CUDA compilation with nvcc #56

Open
fhunleth opened this issue Mar 19, 2020 · 6 comments
Open

Support NVidia CUDA compilation with nvcc #56

fhunleth opened this issue Mar 19, 2020 · 6 comments

Comments

@fhunleth
Copy link
Member

fhunleth commented Mar 19, 2020

Pelemay uses nvcc to generate CUDA code and would require it when targeting devices with NVidia GPUs (like the Jetson Nano)

The path to nvcc should be set in the NVCC environment variable.

@zacky1972
Copy link

Thank you.

Usually, nvcc is located at /usr/local/cuda/bin at least in case of Ubuntu x86_64.

@mobileoverlord
Copy link
Contributor

Is this an option that could be brought into the tool chain via CTNG?

@fhunleth
Copy link
Member Author

I'm quite sure that the answer is no. Given that it's NVidia, I bet that it's a set of precompiled binaries and header files that need to be plucked out of their SDK. It would be way better to have a separate "toolchain" archive for it, but I don't know how to do that.

@zacky1972
Copy link

zacky1972 commented Mar 23, 2020

I mistook it.

To cross-compile .cu code by nvcc, we need to set -ccbin and -Xcompiler options to a cross-compiler of C++, and its compiling options, respectively.

Does Nerves set CXX environment variable?

@fhunleth
Copy link
Member Author

Yes, CXX is set and the compiler options are in CXXFLAGS. Here's where it's set: https://github.com/nerves-project/nerves_system_br/blob/master/nerves_env.exs#L124-L136.

@zacky1972
Copy link

That's great! Thus, I can implement Pelemay to work Jetson, even if on Nerves in future.

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

No branches or pull requests

3 participants