Skip to content

Commit e0449f6

Browse files
authored
Fix support for system dlpack installation (#163)
Add FETCHCONTENT_SOURCE_DIR_DLPACK environment variable to allow specifying a custom dlpack source directory where the dlpack repository was cloned or unpacked. Updates both README.md documentation and setup.py build configuration. Fixes #162 Signed-off-by: Emilien Macchi <[email protected]>
1 parent deda80e commit e0449f6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ pip install -v git+https://github.com/NVIDIA/cudnn-frontend.git
6262
Above command picks cuda and cudnn from default system paths.
6363

6464
To provide a custom CUDA installation path, use environment variable: `CUDAToolkit_ROOT`.
65-
To provide a custom CUDNN installation path, use environment variable: `CUDNN_PATH`.
65+
To provide a custom CUDNN installation path, use environment variable: `CUDNN_PATH`.
66+
To specify a custom dlpack source directory, set environment variable: `FETCHCONTENT_SOURCE_DIR_DLPACK` to the path where the dlpack repository was cloned or unpacked.
6667

6768
#### Checking the installation
6869
To test whether installation is successful, run:

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ def build_extension(self, ext: CMakeExtension) -> None:
6565
if "CUDNN_PATH" in os.environ:
6666
cmake_args.append(f"-DCUDNN_PATH={os.environ['CUDNN_PATH']}")
6767

68+
if "FETCHCONTENT_SOURCE_DIR_DLPACK" in os.environ:
69+
cmake_args.append(f"-DFETCHCONTENT_SOURCE_DIR_DLPACK={os.environ['FETCHCONTENT_SOURCE_DIR_DLPACK']}")
70+
6871
# Using Ninja-build since it a) is available as a wheel and b)
6972
# multithreads automatically. MSVC would require all variables be
7073
# exported for Ninja to pick it up, which is a little tricky to do.

0 commit comments

Comments
 (0)