Skip to content

Commit

Permalink
LibTorch Makefile version check (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Philip committed May 6, 2021
1 parent 2a962d5 commit bf0293b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions torchx/Makefile
@@ -1,5 +1,5 @@
LIBTORCH_VERSION := $(shell head -c 3 $(LIBTORCH_DIR)/build-version)
REQUIRED_LIBTORCH_VERSION := 1.8
MINIMUM_LIBTORCH_VERSION := 1.8

LIBTORCH_INCLUDE_PATH = $(LIBTORCH_DIR)/include/
LIBTORCH_API_INCLUDE_PATH = $(LIBTORCH_DIR)/include/torch/csrc/api/include
Expand All @@ -26,8 +26,8 @@ check_version:
exit 1; \
fi

@ if [ $(LIBTORCH_VERSION) != $(REQUIRED_LIBTORCH_VERSION) ]; then \
echo "LibTorch version should be at least $(REQUIRED_LIBTORCH_VERSION). Got: $(LIBTORCH_VERSION)."; \
@ if [ $(LIBTORCH_VERSION) >= $(MINIMUM_LIBTORCH_VERSION) ]; then \
echo "LibTorch version should be at least $(MINIMUM_LIBTORCH_VERSION). Got: $(LIBTORCH_VERSION)."; \
echo "You can download LibTorch here: https://pytorch.org/get-started/locally/"; \
exit 1; \
fi
Expand Down

0 comments on commit bf0293b

Please sign in to comment.