"test/gemm/gemm_fp32.cpp" did not exist on "0c79af12e882c29c1f5a2895e6f749cdee9e15b7"
Makefile 4.27 KB
Newer Older
Antoine Kaufmann's avatar
Antoine Kaufmann committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Copyright 2021 Max Planck Institute for Software Systems, and
# National University of Singapore
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

23
-include mk/local.mk
24
25
include mk/subdir_pre.mk
include mk/recipes.mk
26

27
28
base_dir := $(d)./

29
30
31
CPPLINT ?= cpplint
CLANG_TIDY ?= clang-tidy
CLANG_FORMAT ?= clang-format
Antoine Kaufmann's avatar
Antoine Kaufmann committed
32
33
CFLAGS += -Wall -Wextra -Wno-unused-parameter -O3 -fPIC -std=gnu11 $(EXTRA_CFLAGS)
CXXFLAGS += -Wall -Wextra -Wno-unused-parameter -O3 -fPIC -std=gnu++17 $(EXTRA_CXXFLAGS)
34
CPPFLAGS += -I$(base_dir)/lib -iquote$(base_dir) $(EXTRA_CPPFLAGS)
35
36
37
38

VERILATOR = verilator
VFLAGS = +1364-2005ext+v \
    -Wno-WIDTH -Wno-PINMISSING -Wno-LITENDIAN -Wno-IMPLICIT -Wno-SELRANGE \
39
    -Wno-CASEINCOMPLETE -Wno-UNSIGNED $(EXTRA_VFLAGS)
40

41

42
$(eval $(call subdir,docker))
43
44
$(eval $(call subdir,lib))
$(eval $(call subdir,sims))
45
$(eval $(call subdir,dist))
46
$(eval $(call subdir,doc))
47
$(eval $(call subdir,images))
48

49

50
51
52
53
54
55
all: $(ALL_ALL)
.DEFAULT_GOAL := all

clean:
	rm -rf $(CLEAN_ALL)

56
57
58
59
clean-external: $(EXTERNAL_CLEAN_TASKS_ALL)

clean-all: clean clean-external

60
61
62
distclean:
	rm -rf $(CLEAN_ALL) $(DISTCLEAN_ALL)

63
lint-cpplint:
Antoine Kaufmann's avatar
Antoine Kaufmann committed
64
65
	$(CPPLINT) --quiet --recursive .

66
67
68
69
70
71
72
73
lint-clang-tidy:
	./.clang-tidy-wrapper.sh $(CLANG_TIDY) -I$(base_dir) -I$(base_dir)lib \
	    -I/usr/share/verilator/include

clang-format:
	$(CLANG_FORMAT) -i --style=file `cat .lint-files`

lint-clang-format:
74
	$(CLANG_FORMAT) --Werror --dry-run --style=file `cat .lint-files`
75

76
lint-yapf:
77
	yapf --recursive --diff \
78
		--exclude experiments/simbricks/orchestration/utils/graphlib.py \
Jonas Kaufmann's avatar
Jonas Kaufmann committed
79
		-- results/ experiments/ doc/
80
81

format-yapf:
82
	yapf --recursive --in-place \
83
		--exclude experiments/simbricks/orchestration/utils/graphlib.py \
84
		--exclude experiments/out/ \
Jonas Kaufmann's avatar
Jonas Kaufmann committed
85
		-- results/ experiments/ doc/
86

87
lint-isort:
88
	isort --diff \
89
		--skip experiments/simbricks/orchestration/utils/graphlib.py \
Jonas Kaufmann's avatar
Jonas Kaufmann committed
90
		results/ experiments/ doc/
91
92

format-isort:
93
	isort --skip experiments/simbricks/orchestration/utils/graphlib.py \
Jonas Kaufmann's avatar
Jonas Kaufmann committed
94
		results/ experiments/ doc/
95

96
lint-pylint:
97
98
99
100
101
102
103
104
105
106
	pylint -d missing-module-docstring,missing-class-docstring \
		--ignore-paths experiments/simbricks/orchestration/utils/graphlib.py \
	  	experiments/ results/

typecheck-python:
	pytype -j 0 --keep-going \
		--exclude experiments/pyexps/ae/ \
			experiments/simbricks/orchestration/utils/graphlib.py \
		-- experiments/ results/

107
lint-python: lint-pylint typecheck-python
108
lint: lint-cpplint lint-clang-format lint-python
109
lint-all: lint lint-clang-tidy
110

111
112
113
114
help:
	@echo "Targets:"
	@echo "  all: builds all the tools directly in this repo"
	@echo "  clean: cleans all the tool folders in this repo"
115
116
	@echo "  clean-external: cleans all external simulators"
	@echo "  clean-all: executes both clean and clean-external"
117
	@echo "  build-images: prepare prereqs for VMs (images directory)"
118
	@echo "  build-images-min: prepare minimal prereqs for VMs"
119
	@echo "  documentation: build documentation in doc/build_"
120
121
	@echo "  external: clone and build our tools in external repos "
	@echo "            (qemu, gem5, ns-3)"
122
123
124
	@echo "  lint: run quick format and style checks"
	@echo "  lint-all: run slow & thorough format and style checks"
	@echo "  clang-format: reformat source (use with caution)"
125

126
127
.PHONY: all clean clean-external clean-all distclean lint lint-all \
	lint-cpplint lint-clang-tidy lint-clang-format clang-format help
128

129
include mk/subdir_post.mk
130
-include $(DEPS_ALL)