Last active
November 27, 2024 06:09
-
-
Save al3xtjames/522306c51e6fdc32977a1ec971454ae3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/bindings/torch/setup.py b/bindings/torch/setup.py | |
index 533805e..815d9c1 100644 | |
--- a/bindings/torch/setup.py | |
+++ b/bindings/torch/setup.py | |
@@ -41,7 +41,7 @@ print(f"Building PyTorch extension for tiny-cuda-nn version {VERSION}") | |
ext_modules = [] | |
if "TCNN_CUDA_ARCHITECTURES" in os.environ and os.environ["TCNN_CUDA_ARCHITECTURES"]: | |
- compute_capabilities = [int(x) for x in os.environ["TCNN_CUDA_ARCHITECTURES"].replace(";", ",").split(",")] | |
+ compute_capabilities = [int(x) for x in os.environ["TCNN_CUDA_ARCHITECTURES"].replace(";", ",").replace("a", "").split(",")] | |
print(f"Obtained compute capabilities {compute_capabilities} from environment variable TCNN_CUDA_ARCHITECTURES") | |
elif torch.cuda.is_available(): | |
major, minor = torch.cuda.get_device_capability() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sourcing setup-cuda-hook | |
Running phase: unpackPhase | |
@nix { "action": "setPhase", "phase": "unpackPhase" } | |
unpacking source archive /nix/store/v6q53k8zlkm2ccd8dlms65fwm65xzp0k-source | |
source root is source | |
Running phase: patchPhase | |
@nix { "action": "setPhase", "phase": "patchPhase" } | |
Running phase: updateAutotoolsGnuConfigScriptsPhase | |
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } | |
Running phase: configurePhase | |
@nix { "action": "setPhase", "phase": "configurePhase" } | |
Executing setupCUDAToolkitCompilers | |
Running phase: buildPhase | |
@nix { "action": "setPhase", "phase": "buildPhase" } | |
WARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. | |
Processing /build/source/bindings/torch | |
Running command python setup.py egg_info | |
Traceback (most recent call last): | |
File "<string>", line 2, in <module> | |
File "<pip-setuptools-caller>", line 34, in <module> | |
File "/build/source/bindings/torch/setup.py", line 23, in <module> | |
compute_capabilities = [int(x) for x in os.environ["TCNN_CUDA_ARCHITECTURES"].replace(";", ",").split(",")] | |
^^^^^^ | |
ValueError: invalid literal for int() with base 10: '90a' | |
Building PyTorch extension for tiny-cuda-nn version 1.6 | |
error: subprocess-exited-with-error | |
× python setup.py egg_info did not run successfully. | |
│ exit code: 1 | |
╰─> See above for output. | |
note: This error originates from a subprocess, and is likely not a problem with pip. | |
full command: /nix/store/px2nj16i5gc3d4mnw5l1nclfdxhry61p-python3-3.12.7/bin/python -c ' | |
exec(compile('"'"''"'"''"'"' | |
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py | |
# | |
# - It imports setuptools before invoking setup.py, to enable projects that directly | |
# import from `distutils.core` to work with newer packaging standards. | |
# - It provides a clear error message when setuptools is not installed. | |
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so | |
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning: | |
# manifest_maker: standard file '"'"'-c'"'"' not found". | |
# - It generates a shim setup.py, for handling setup.cfg-only projects. | |
import os, sys, tokenize | |
try: | |
import setuptools | |
except ImportError as error: | |
print( | |
"ERROR: Can not execute `setup.py` since setuptools is not available in " | |
"the build environment.", | |
file=sys.stderr, | |
) | |
sys.exit(1) | |
__file__ = %r | |
sys.argv[0] = __file__ | |
if os.path.exists(__file__): | |
filename = __file__ | |
with tokenize.open(__file__) as f: | |
setup_py_code = f.read() | |
else: | |
filename = "<auto-generated setuptools caller>" | |
setup_py_code = "from setuptools import setup; setup()" | |
exec(compile(setup_py_code, filename, "exec")) | |
'"'"''"'"''"'"' % ('"'"'/build/source/bindings/torch/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' egg_info --egg-base /build/pip-pip-egg-info-wh7ai64i | |
cwd: /build/source/bindings/torch/ | |
Preparing metadata (setup.py) ... [?25l[?25herror | |
error: metadata-generation-failed | |
× Encountered error while generating package metadata. | |
╰─> See above for output. | |
note: This is an issue with the package mentioned above, not pip. | |
hint: See above for details. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment