Last active
April 14, 2025 12:57
-
-
Save jhabr/64de581b4fd19ba44fbf1ffff66bcaa1 to your computer and use it in GitHub Desktop.
Build PyTorch for Nvidia Jetson AGX Orin
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
#!/bin/bash | |
export USE_NCCL=0 | |
export USE_DISTRIBUTED=1 | |
export USE_QNNPACK=0 | |
export USE_PYTORCH_QNNPACK=0 | |
# Orin is based on Ampere Achitecture | |
export TORCH_CUDA_ARCH_LIST="8.7" | |
export PYTORCH_BUILD_VERSION=2.0.1 | |
export PYTORCH_BUILD_NUMBER=1 | |
python3 setup.py bdist_wheel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checkout the specific version branch of PyTorch:
If necessary, add
8.7
tosupported_architectures
intorch/utils/cpp_extension.py
(see this patch).Install the required packages:
Copy the bash file into the root of the
~/pytorch
repo. Build PyTorchv2.0.1
for a specific Python version (e.g. from your specific conda env calledtorch_310
based on Python v3.10):Run the build:
Build can be found in
~/pytorch/dist
.Install the PyTorch from the compiled wheel:
Test cuda support:
References: