From 19aa67591106342df165d174c4076b84ae366a35 Mon Sep 17 00:00:00 2001 From: HastingsGreer Date: Sun, 19 Dec 2021 10:11:23 -0500 Subject: [PATCH 1/4] Add tip for adding nvcc to a working torch w/ conda --- doc/python/installation.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/python/installation.rst b/doc/python/installation.rst index 60e5c5247..5fb71785d 100644 --- a/doc/python/installation.rst +++ b/doc/python/installation.rst @@ -149,6 +149,28 @@ First of all, make sure that you are using a C++ compiler which is compatible wi .. _`part.cache`: +Adding nvcc to a working conda torch installation +------------------------------------------------- +A common starting point for users working with conda and torch is to have a working gpu accelerated installation of pytorch, without nvcc. In this situation, it is possible to add nvcc to PATH without installing anything globally or modifying your drivers. + +1. Find the version of CUDA that pytorch is using. With conda, this is often different from the system-wide CUDA version + +.. code-block:: python + + import torch + torch.version.cuda + +2. Download a matching CUDA runfile installer from https://developer.nvidia.com/cuda-downloads + +3. Install the runfile using the --toolkit and --toolkitpath options. This installs nvcc to a directory, without modifying your drivers or system configuration. Do not use sudo, to guarantee that this step doesn't modify your drivers. For example, + +.. code-block:: bash + sh cuda_10.0.130_410.48_linux --silent --override --toolkit --toolkitpath=/local/path/to/put/nvcc + +4. Add /local/path/to/put/nvcc/bin to $PATH and /local/path/to/put/nvcc/lib64 to $LD_LIBRARY_PATH . You can either do this in .bashrc, or a script local to your pykeops project + + + Cache directory --------------- From 972c7c8d37d9f23ef5fedeac7a711671663b1ac6 Mon Sep 17 00:00:00 2001 From: HastingsGreer Date: Tue, 21 Dec 2021 00:00:48 -0500 Subject: [PATCH 2/4] Update installation.rst --- doc/python/installation.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/python/installation.rst b/doc/python/installation.rst index 5fb71785d..47a1b26bf 100644 --- a/doc/python/installation.rst +++ b/doc/python/installation.rst @@ -149,9 +149,9 @@ First of all, make sure that you are using a C++ compiler which is compatible wi .. _`part.cache`: -Adding nvcc to a working conda torch installation +Adding nvcc to a working installation of pytorch ------------------------------------------------- -A common starting point for users working with conda and torch is to have a working gpu accelerated installation of pytorch, without nvcc. In this situation, it is possible to add nvcc to PATH without installing anything globally or modifying your drivers. +A common starting point for users looking to get started with pykeops, is to have a working gpu accelerated installation of pytorch, without nvcc. In this situation, it is possible to add nvcc to PATH without installing anything globally or modifying your drivers. 1. Find the version of CUDA that pytorch is using. With conda, this is often different from the system-wide CUDA version @@ -160,12 +160,12 @@ A common starting point for users working with conda and torch is to have a work import torch torch.version.cuda -2. Download a matching CUDA runfile installer from https://developer.nvidia.com/cuda-downloads +2. Download a matching CUDA runfile installer from https://developer.nvidia.com/cuda-toolkit-archive 3. Install the runfile using the --toolkit and --toolkitpath options. This installs nvcc to a directory, without modifying your drivers or system configuration. Do not use sudo, to guarantee that this step doesn't modify your drivers. For example, .. code-block:: bash - sh cuda_10.0.130_410.48_linux --silent --override --toolkit --toolkitpath=/local/path/to/put/nvcc + sh cuda__linux --silent --override --toolkit --toolkitpath=/local/path/to/put/nvcc 4. Add /local/path/to/put/nvcc/bin to $PATH and /local/path/to/put/nvcc/lib64 to $LD_LIBRARY_PATH . You can either do this in .bashrc, or a script local to your pykeops project From 25636699c0989fa5ea9977e5cf0c1284e341c3a9 Mon Sep 17 00:00:00 2001 From: HastingsGreer Date: Tue, 21 Dec 2021 00:02:25 -0500 Subject: [PATCH 3/4] Update installation.rst --- doc/python/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/installation.rst b/doc/python/installation.rst index 47a1b26bf..f2a554009 100644 --- a/doc/python/installation.rst +++ b/doc/python/installation.rst @@ -165,7 +165,7 @@ A common starting point for users looking to get started with pykeops, is to hav 3. Install the runfile using the --toolkit and --toolkitpath options. This installs nvcc to a directory, without modifying your drivers or system configuration. Do not use sudo, to guarantee that this step doesn't modify your drivers. For example, .. code-block:: bash - sh cuda__linux --silent --override --toolkit --toolkitpath=/local/path/to/put/nvcc + sh cuda_version_here_linux --silent --override --toolkit --toolkitpath=/local/path/to/put/nvcc 4. Add /local/path/to/put/nvcc/bin to $PATH and /local/path/to/put/nvcc/lib64 to $LD_LIBRARY_PATH . You can either do this in .bashrc, or a script local to your pykeops project From 62b390b24b8cb202ecafcd7d55221bd5e809dca3 Mon Sep 17 00:00:00 2001 From: HastingsGreer Date: Tue, 21 Dec 2021 00:03:19 -0500 Subject: [PATCH 4/4] fix bash code block --- doc/python/installation.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/python/installation.rst b/doc/python/installation.rst index f2a554009..d532e9bd9 100644 --- a/doc/python/installation.rst +++ b/doc/python/installation.rst @@ -165,6 +165,7 @@ A common starting point for users looking to get started with pykeops, is to hav 3. Install the runfile using the --toolkit and --toolkitpath options. This installs nvcc to a directory, without modifying your drivers or system configuration. Do not use sudo, to guarantee that this step doesn't modify your drivers. For example, .. code-block:: bash + sh cuda_version_here_linux --silent --override --toolkit --toolkitpath=/local/path/to/put/nvcc 4. Add /local/path/to/put/nvcc/bin to $PATH and /local/path/to/put/nvcc/lib64 to $LD_LIBRARY_PATH . You can either do this in .bashrc, or a script local to your pykeops project