BhavinPatel
BhavinPatel

Reputation: 104

How to compile a CUDA program with an specific toolkit version?

I have cuda toolkit 5.5 and 5.0 installed in my ubuntu system,I want to compile the .cu file with specific version..how to do that ?

Upvotes: 0

Views: 243

Answers (1)

kangshiyin
kangshiyin

Reputation: 9781

You could do that by setting proper environment variables. The following example is for CUDA 5.5 on x86_64 machine.

export CUDA_HOME=/usr/local/cuda-5.5
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
export PATH=${CUDA_HOME}/bin:${PATH}

Upvotes: 1

Related Questions