File tree Expand file tree Collapse file tree 1 file changed +10
-19
lines changed Expand file tree Collapse file tree 1 file changed +10
-19
lines changed Original file line number Diff line number Diff line change 2
2
PYTHON = python3
3
3
PIP = $(PYTHON ) -m pip
4
4
NIGHTLY_TOOL_OPTS := pull
5
+ BUILD_TARGETS := android ios local
6
+ PLATFORMS := cuda rocm
7
+ SETUP_ENVS := $(PLATFORMS:%=setup-env-% )
8
+ SETUP_ENV_PLATFORMS := $(PLATFORMS:%=setup_env_% )
5
9
6
10
all :
7
11
@mkdir -p build && cd build && cmake .. $(shell $(PYTHON ) ./scripts/get_python_cmake_flags.py) && $(MAKE )
8
12
9
- local :
10
- @./scripts/build_local.sh
11
-
12
- android :
13
- @./scripts/build_android.sh
14
-
15
- ios :
16
- @./scripts/build_ios.sh
13
+ $(BUILD_TARGETS ) : % :
14
+ @./scripts/build_$* .sh
17
15
18
16
clean : # This will remove ALL build folders.
19
17
@rm -r build* /
@@ -32,26 +30,19 @@ ensure-branch-clean:
32
30
setup-env : ensure-branch-clean
33
31
$(PYTHON ) tools/nightly.py $(NIGHTLY_TOOL_OPTS )
34
32
35
- setup-env-cuda :
36
- $(MAKE ) setup-env PYTHON=" $( PYTHON) " NIGHTLY_TOOL_OPTS=" $( NIGHTLY_TOOL_OPTS) --cuda"
37
-
38
- setup-env-rocm :
39
- $(MAKE ) setup-env PYTHON=" $( PYTHON) " NIGHTLY_TOOL_OPTS=" $( NIGHTLY_TOOL_OPTS) --rocm"
33
+ $(SETUP_ENVS ) : setup-env-% :
34
+ $(MAKE ) setup-env PYTHON=" $( PYTHON) " NIGHTLY_TOOL_OPTS=" $( NIGHTLY_TOOL_OPTS) --$* "
40
35
41
36
setup_env : setup-env
42
- setup_env_cuda : setup-env-cuda
43
- setup_env_rocm : setup-env-rocm
37
+ $(SETUP_ENV_PLATFORMS ) : setup_env_% : setup-env-%
44
38
45
39
setup-lint :
46
40
$(PIP ) install lintrunner
47
41
lintrunner init
48
42
49
43
setup_lint : setup-lint
50
44
51
- lint :
52
- lintrunner
53
-
54
- quicklint :
45
+ lint quicklint :
55
46
lintrunner
56
47
57
48
triton :
You can’t perform that action at this time.
0 commit comments