|
1 | 1 | .PHONY: default develop test torchbench format lint setup clean autotune
|
2 | 2 |
|
3 |
| -PY_FILES := $(wildcard *.py) $(wildcard torchdynamo/*.py) $(wildcard torchdynamo/*/*.py) $(wildcard tests/*.py) |
| 3 | +PY_FILES := $(wildcard *.py) $(wildcard torchdynamo/*.py) $(wildcard torchdynamo/*/*.py) \ |
| 4 | + $(wildcard tests/*.py) $(wildcard torchinductor/*.py) $(wildcard torchinductor/*/*.py) |
4 | 5 | C_FILES := $(wildcard torchdynamo/*.c torchdynamo/*.cpp)
|
5 | 6 | CLANG_TIDY ?= clang-tidy-10
|
6 | 7 | CLANG_FORMAT ?= clang-format-10
|
|
35 | 36 | lint-deps:
|
36 | 37 | grep -E '(black|flake8|isort|click)' requirements.txt | xargs pip install
|
37 | 38 |
|
| 39 | +setup_lint: lint-deps |
| 40 | + |
38 | 41 | setup:
|
39 | 42 | pip install -r requirements.txt
|
40 | 43 |
|
| 44 | +setup_nightly: |
| 45 | + pip install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu |
| 46 | + pip install git+https://github.com/pytorch/functorch.git |
| 47 | + pip install -r requirements.txt |
| 48 | + python setup.py develop |
| 49 | + |
41 | 50 | clean:
|
42 | 51 | python setup.py clean
|
43 | 52 | rm -rf build torchdynamo.egg-info torchdynamo/*.so __pycache__ .pytest_cache .benchmarks *.csv dist
|
@@ -117,3 +126,17 @@ baseline-gpu: develop
|
117 | 126 | python torchbench.py -dcuda --isolate -n100 --speedup-trt
|
118 | 127 | python torchbench.py -dcuda --isolate -n100 --speedup-onnx
|
119 | 128 | paste -d, baseline_nnc.csv baseline_nvfuser.csv baseline_trt.csv baseline_onnx.csv > baseline_all.csv
|
| 129 | + |
| 130 | +baseline-gpu-inductor: develop |
| 131 | + rm -f baseline_*.csv |
| 132 | + python torchbench.py -dcuda --float32 --isolate -n50 --inductor |
| 133 | + python torchbench.py -dcuda --float32 --isolate -n50 --backend=cudagraphs && mv speedup_cudagraphs.csv baseline_cudagraphs.csv |
| 134 | + python torchbench.py -dcuda --float32 --isolate -n50 --backend=cudagraphs_ts --nvfuser && mv speedup_cudagraphs_ts.csv baseline_cg_nvfuser.csv |
| 135 | + python torchbench.py -dcuda --float32 --isolate -n50 --backend=cudagraphs_ts && mv speedup_cudagraphs_ts.csv baseline_cg_nnc.csv |
| 136 | + # python torchbench.py -dcuda --float32 --isolate -n50 --speedup-ts --nvfuser && mv baseline_ts.csv baseline_ts_nvfuser.csv |
| 137 | + # python torchbench.py -dcuda --float32 --isolate -n50 --speedup-ts && mv baseline_ts.csv baseline_ts_nnc.csv |
| 138 | + paste -d, inductor.csv baseline_cudagraphs.csv baseline_cg_nvfuser.csv baseline_cg_nnc.csv > baseline_all.csv |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
0 commit comments