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

Add script to set up CUDA environment #53

Closed
ccarels opened this issue Sep 6, 2018 · 4 comments · Fixed by #60
Closed

Add script to set up CUDA environment #53

ccarels opened this issue Sep 6, 2018 · 4 comments · Fixed by #60
Assignees
Labels

Comments

@ccarels
Copy link
Contributor

ccarels commented Sep 6, 2018

Description
Adds environment variables to a new script setup.sh.

The first iteration will be to source the CUDA environment variables.

Outcome
User-friendly setup of environment variables.

Timeline
As soon as possible.

Interfaces
Will this feature result in a backwards-incompatible interface change: No.

Expected semantic version number increment category (Please indicate x.y.z): y.

Notes
N/A.

@ccarels ccarels added the Feature label Sep 6, 2018
@ccarels ccarels self-assigned this Sep 6, 2018
@KAdamek
Copy link
Member

KAdamek commented Sep 7, 2018

I think that we want a different approach to setting of cuda, which is probably easily dealt with cmake. We want to detect which cuda version is installed and change the make file accordingly so the -gencode arch=XX, code=XX but also other things reflects what is installed in the system and what GPU is present. I'm not good with bash so correct me if I'm wrong, but that is not what the setup seems to be doing. Jan could help you more regarding what CUDA is doing when it is installed, I do not know much about that.

@ccarels
Copy link
Contributor Author

ccarels commented Sep 7, 2018

@KAdamek Thanks for the feedback. Correct, the script does not "auto detect" which CUDA version is installed.

As far as I'm aware, a CUDA library user needs to set $PATH and $LD_LIBRARY_PATH first, before being able to do CUDA function calls in a terminal as it looks like you're suggesting. (See https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#environment-setup)

My plan is to start moving the build system to CMake, this could subsume a portion of this script once that is done.

@jan2nov
Copy link
Member

jan2nov commented Sep 7, 2018 via email

@ccarels
Copy link
Contributor Author

ccarels commented Sep 7, 2018

I think the point here is that the makefile does not work without PATH and LD_LIBRARY_PATH being set. Similarly, nvcc --version also does not work unless the user sets PATH and LD_LIBRARY_PATH. The setup.sh script is there to make the process more user-friendly.

By the sounds of it, we could use /usr/local/cuda/ in setup.sh instead of /usr/local/cuda-{version}. I have edited cc_53_setupscript to reflect this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants