Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ before_install:
- export LIBRARY_PATH=${LIBTORCH}/lib
- export CPATH=${LIBTORCH}/lib:${LIBTORCH}/include:${LIBTORCH}/include/torch/csrc:${LIBTORCH}/include/torch/csrc/api/include
- export LD_LIBRARY_PATH=${LIBTORCH}/lib
- export CUDA_VER=cpu &&

wget https://raw.githubusercontent.com/sugarme/gotch/master/setup-libtorch.sh
chmod +x setup-libtorch.sh
- export CUDA_VER=cpu
- wget https://raw.githubusercontent.com/sugarme/gotch/master/setup-libtorch.sh
- chmod +x setup-libtorch.sh


# Precompiled libtorch
- sudo rm -rf $LIBTORCH
- sudo mkdir -p $LIBTORCH
- bash setup-libtorch.sh
- echo "exit" | bash setup-libtorch.sh
- wget -O /tmp/libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}+cpu.zip https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}%2Bcpu.zip
- sudo unzip /tmp/libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}+cpu.zip -d ${GOTCH}/libtch
- sudo unzip -v /tmp/libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}+cpu.zip -d ${GOTCH}/libtch
- ls -l ${GOTCH}/libtch/lib.go
- sudo rm ${GOTCH}/libtch/lib.go
- sudo cp ${GOTCH}/libtch/lib.go.cpu ${GOTCH}/libtch/lib.go
- sudo mv ${GOTCH}/libtch/dummy_cuda_dependency.cpp ${GOTCH}/libtch/dummy_cuda_dependency.cpp.gpu
Expand Down
2 changes: 1 addition & 1 deletion setup-libtorch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
LIBTORCH_VERSION="${LIBTORCH_VER:-1.10.0}"
CUDA_VERSION="${CUDA_VER:-11.1}"

if [[ -z "${CUDA_VERSION}"=="cpu" ]]; then
if [ "${CUDA_VERSION}"=="cpu" ]; then
CU_VERSION="cpu"
else
CU_VERSION="cu${CUDA_VERSION//./}"
Expand Down