pytorch

Форк
0
/
Makefile 
55 строк · 1.2 Кб
1
# This makefile does nothing but delegating the actual building to cmake.
2
PYTHON = python3
3
PIP = $(PYTHON) -m pip
4
NIGHTLY_TOOL_OPTS := pull
5

6
all:
7
	@mkdir -p build && cd build && cmake .. $(shell $(PYTHON) ./scripts/get_python_cmake_flags.py) && $(MAKE)
8

9
local:
10
	@./scripts/build_local.sh
11

12
android:
13
	@./scripts/build_android.sh
14

15
ios:
16
	@./scripts/build_ios.sh
17

18
clean: # This will remove ALL build folders.
19
	@rm -r build*/
20

21
linecount:
22
	@cloc --read-lang-def=caffe.cloc caffe2 || \
23
		echo "Cloc is not available on the machine. You can install cloc with " && \
24
		echo "    sudo apt-get install cloc"
25

26
ensure-branch-clean:
27
	@if [ -n "$(shell git status --porcelain)" ]; then \
28
		echo "Please commit or stash all changes before running this script"; \
29
		exit 1; \
30
	fi
31

32
setup-env: ensure-branch-clean
33
	$(PYTHON) tools/nightly.py $(NIGHTLY_TOOL_OPTS)
34

35
setup-env-cuda:
36
	$(MAKE) setup-env PYTHON="$(PYTHON)" NIGHTLY_TOOL_OPTS="$(NIGHTLY_TOOL_OPTS) --cuda"
37

38
setup_env: setup-env
39
setup_env_cuda: setup-env-cuda
40

41
setup-lint:
42
	$(PIP) install lintrunner
43
	lintrunner init
44

45
setup_lint: setup-lint
46

47
lint:
48
	lintrunner
49

50
quicklint:
51
	lintrunner
52

53
triton:
54
	$(PIP) uninstall -y triton
55
	@./scripts/install_triton_wheel.sh
56

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.