Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzijian629 committed Jul 10, 2023
1 parent 35ecf8e commit 4d24e70
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
21 changes: 13 additions & 8 deletions .pfnci/run_gpu_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LIBTORCH_VERSION=${LIBTORCH_VERSION:-1.13.0}
LIBTORCH_ARCH=${LIBTORCH_ARCH:-cu117}
OS=${OS:-ubuntu22.04}

cat >> test.sh <<'EOF'
cat > test.sh <<'EOF'
#!/bin/bash
set -eux
Expand All @@ -29,15 +29,20 @@ apt-get update && apt-get install -y \
pip3 install pytest numpy cmake-format
./run-format.sh
./download-libtorch.sh
rm -rf build
mkdir build
cd build
../download-libtorch.sh
LIBTORCH_DIR=$(pwd)/pytorch-install/libtorch
mkdir build && cd build && \
cmake .. \
-GNinja \
-DSOLD_PYBIND_TEST=ON \
-DSOLD_LIBTORCH_TEST=ON \
-DCMAKE_PREFIX_PATH=${LIBTORCH_DIR}/share/cmake/Torch/
cmake .. \
-GNinja \
-DSOLD_PYBIND_TEST=ON \
-DSOLD_LIBTORCH_TEST=ON \
-DCMAKE_PREFIX_PATH=${LIBTORCH_DIR}/share/cmake/Torch/
ninja
ctest --output-on-failure
Expand Down
2 changes: 1 addition & 1 deletion download-libtorch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ LIBTORCH_ZIP_SUFFIX="%2B${LIBTORCH_ARCH}"

URL="https://download.pytorch.org/libtorch${LIBTORCH_RELEASE_TYPE}/${LIBTORCH_ARCH}/libtorch${LIBTORCH_ABI}${LIBTORCH_OSNAME}${LIBTORCH_LIBOPT}-${LIBTORCH_VERSION}${LIBTORCH_ZIP_SUFFIX}.zip"

wget -O libtorch.zip "${URL}"
wget -q -O libtorch.zip "${URL}"
unzip libtorch.zip -d pytorch-install

0 comments on commit 4d24e70

Please sign in to comment.