pytorch

Форк
0
/
Makefile 
53 строки · 2.0 Кб
1
# Minimal makefile for Sphinx documentation
2
#
3

4
# You can set these variables from the command line.
5
SPHINXOPTS    ?= -j auto -WT --keep-going
6
SPHINXBUILD   ?= sphinx-build
7
SPHINXPROJ    ?= PyTorch
8
SOURCEDIR     ?= source
9
BUILDDIR      ?= build
10
PYCMD         ?= python
11

12
# Put it first so that "make" without argument is like "make help".
13
help:
14
	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
15

16
figures:
17
	@$(PYCMD) source/scripts/build_activation_images.py
18
	@$(PYCMD) source/scripts/build_quantization_configs.py
19

20
onnx:
21
	@$(PYCMD) source/scripts/onnx/build_onnx_torchscript_supported_aten_op_csv_table.py
22
	@$(PYCMD) source/scripts/onnx/build_onnx_dynamo_diagnostics_rules_md.py $(SOURCEDIR)/generated/onnx_dynamo_diagnostics_rules
23

24
opset:
25
	@$(PYCMD) source/scripts/build_opsets.py
26

27
exportdb:
28
	@$(PYCMD) source/scripts/exportdb/generate_example_rst.py
29

30
docset: html
31
	doc2dash --name $(SPHINXPROJ) --icon $(SOURCEDIR)/_static/img/pytorch-logo-flame.png --enable-js --online-redirect-url https://pytorch.org/docs/ --force $(BUILDDIR)/html/
32

33
	# Manually fix because Zeal doesn't deal well with `icon.png`-only at 2x resolution.
34
	cp $(SPHINXPROJ).docset/icon.png $(SPHINXPROJ).docset/icon@2x.png
35
	convert $(SPHINXPROJ).docset/icon@2x.png -resize 16x16 $(SPHINXPROJ).docset/icon.png
36

37
html-stable:
38
	# stable differs from `make html` in two ways:
39
	# 1) The stable logo is used instead of the unstable logo
40
	# 2) There will not be a link to the stable docs.
41
	# See conf.py for more details.
42
	RELEASE=1 make html
43

44
.PHONY: help Makefile docset onnx exportdb
45

46
# Catch-all target: route all unknown targets to Sphinx using the new
47
# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
48
%: Makefile figures onnx opset exportdb
49
	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
50

51
clean:
52
	@echo "Removing everything under 'build' and 'source/generated'.."
53
	@rm -rf $(BUILDDIR)/html/ $(BUILDDIR)/doctrees $(SOURCEDIR)/generated $(BUILDDIR)/auto_gen_aten_op_list.csv
54

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

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

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

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