Skip to content

Commit c4dce4f

Browse files
committed
Chore: Add comment on CUDA include dir modification.
1 parent 2c4b178 commit c4dce4f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

flashrnn/flashrnn/cuda_init.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@ def defines_to_cflags(
4242

4343
EXTRA_INCLUDE_PATHS = ()
4444
if "CONDA_PREFIX" in os.environ:
45+
# This enforces adding the correct include directory from the CUDA installation via torch. If you use the system
46+
# installation, you might have to add the cflags yourself.
4547
from pathlib import Path
4648
from packaging import version
4749
import sys
4850
import glob
4951
if version.parse(torch.__version__) >= version.parse("2.6.0"):
5052
matching_dirs = glob.glob(f"{os.environ['CONDA_PREFIX']}/targets/**", recursive=True)
51-
# EXTRA_INCLUDE_PATHS = (os.path.join(os.environ['CONDA_PREFIX'], "lib", "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor), 'site-packages', 'nvidia', "cuda_runtime", "include"),)
5253
EXTRA_INCLUDE_PATHS = tuple(map(str, (Path(os.environ["CONDA_PREFIX"]) / "targets").glob("**/include/")))[:1]
5354

5455

0 commit comments

Comments
 (0)