Set cuda path default

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Set cuda path default

Louis Dionne via cfe-dev
Hi,

I remember in older version of clang (e.g. 4.0), I could set the env variable CUDAPATH=... to set the default path to cuda.
In newer version (I am using 6.0), I can use the flag "--cuda-path=...", but I was wondering if there is a way to set that path once to avoid to pass that flag everytime.

Thanks.
Simone

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Set cuda path default

Louis Dionne via cfe-dev
Hi Simone,

I don't think an environment variable was ever used in upstream trunk, I
only remember seeing this in IBM's clang-ykt fork. However, I committed
an improvement just yesterday: Clang will now try to find ptxas in $PATH
and if it is in a directory called bin/, add that's parent directory as
a candidate CUDA installation. I think this should work for most HPC
systems that use environment modules to manage their CUDA
installations...
Unfortunately, I still have to write documentation about this mechanism
so you'd have to refer to the source code for details.

Cheers,
Jonas

Am 2018-01-31 23:07, schrieb Simone Atzeni via cfe-dev:

> Hi,
>
> I remember in older version of clang (e.g. 4.0), I could set the env
> variable CUDAPATH=... to set the default path to cuda.
> In newer version (I am using 6.0), I can use the flag
> "--cuda-path=...", but I was wondering if there is a way to set that
> path once to avoid to pass that flag everytime.
>
> Thanks.
> Simone
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Set cuda path default

Louis Dionne via cfe-dev
Jonas,

you are right, sorry for the confusion.
Your patch does what I needed.

Thanks.
Simone


On Thu, Feb 1, 2018 at 12:22 AM, Jonas Hahnfeld <[hidden email]> wrote:
Hi Simone,

I don't think an environment variable was ever used in upstream trunk, I only remember seeing this in IBM's clang-ykt fork. However, I committed an improvement just yesterday: Clang will now try to find ptxas in $PATH and if it is in a directory called bin/, add that's parent directory as a candidate CUDA installation. I think this should work for most HPC systems that use environment modules to manage their CUDA installations...
Unfortunately, I still have to write documentation about this mechanism so you'd have to refer to the source code for details.

Cheers,
Jonas


Am 2018-01-31 23:07, schrieb Simone Atzeni via cfe-dev:
Hi,

I remember in older version of clang (e.g. 4.0), I could set the env
variable CUDAPATH=... to set the default path to cuda.
In newer version (I am using 6.0), I can use the flag
"--cuda-path=...", but I was wondering if there is a way to set that
path once to avoid to pass that flag everytime.

Thanks.
Simone
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev