Skip to content

Commit

Permalink
Print TORCH_DIR for debug. (#44)
Browse files Browse the repository at this point in the history
* Print TORCH_DIR for debug.

* fix style issues

* test torch 1.12.0
  • Loading branch information
csukuangfj authored Jul 20, 2022
1 parent e15b2ae commit e78f081
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 5 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ max-line-length = 80

exclude =
.git,
doc,
build,
build_release,
cmake/cmake_extension.py,
Expand Down
1 change: 1 addition & 0 deletions cmake/torch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE TORCH_DIR
)
message(STATUS "TORCH_DIR: ${TORCH_DIR}")

list(APPEND CMAKE_PREFIX_PATH "${TORCH_DIR}")
find_package(Torch REQUIRED)
Expand Down
8 changes: 7 additions & 1 deletion scripts/github_actions/generate_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,15 @@ def generate_build_matrix(enable_cuda, for_windows, test_only_latest_torch):
if not for_windows
else ["11.3.1", "11.5.2"],
},
"1.12.0": {
"python-version": ["3.7", "3.8", "3.9", "3.10"],
"cuda": ["10.2", "11.3", "11.6"]
if not for_windows
else ["11.3.1", "11.6.2"],
},
}
if test_only_latest_torch:
latest = "1.11.0"
latest = "1.12.0"
matrix = {latest: matrix[latest]}

ans = []
Expand Down
3 changes: 3 additions & 0 deletions scripts/github_actions/install_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ case "$cuda" in
11.5)
url=https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda_11.5.2_495.29.05_linux.run
;;
11.6)
url=https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run
;;
*)
echo "Unknown cuda version: $cuda"
exit 1
Expand Down
8 changes: 4 additions & 4 deletions scripts/github_actions/install_cudnn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ case $cuda in
11.5)
filename=cudnn-11.3-linux-x64-v8.2.0.53.tgz
;;
# 11.5)
# filename=cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz
# ;;
11.6)
filename=cudnn-11.3-linux-x64-v8.2.0.53.tgz
;;
*)
echo "Unsupported cuda version: $cuda"
exit 1
Expand All @@ -47,7 +47,7 @@ esac

command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nPlease install 'git-lfs' first."; exit 2; }

git clone https://huggingface.co/csukuangfj/cudnn
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/cudnn
cd cudnn
git lfs pull --include="$filename"

Expand Down
17 changes: 17 additions & 0 deletions scripts/github_actions/install_torch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,23 @@ case ${torch} in
;;
esac
;;
1.12.*)
case ${cuda} in
10.2)
package="torch==${torch}"
# Leave it empty to use PyPI.
url=
;;
11.3)
package="torch==${torch}+cu113"
url=https://download.pytorch.org/whl/torch_stable.html
;;
11.6)
package="torch==${torch}+cu116"
url=https://download.pytorch.org/whl/torch_stable.html
;;
esac
;;
*)
echo "Unsupported PyTorch version: ${torch}"
exit 1
Expand Down

0 comments on commit e78f081

Please sign in to comment.