-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (21 loc) · 1.31 KB
/
Makefile
File metadata and controls
31 lines (21 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
MAKE_HELP_LEFT_COLUMN_WIDTH:=14
PYTHON = python3
.PHONY: help build
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-$(MAKE_HELP_LEFT_COLUMN_WIDTH)s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
fmt: ## Format Python code
ruff check --select I --fix . && black .;
fmt-check: ## Check Python formatting
black --check .;
benchmark-matmul: ## Run matmul benchmark
PYTHONPATH=. $(PYTHON) benchmarks/matmul/benchmark_matmul_guide.py --save-plots --plot-dir=docs/plots/matmul/
benchmark-softmax: ## Run softmax benchmark
PYTHONPATH=. $(PYTHON) benchmarks/attention/benchmark_softmax_causal.py --save-plots --plot-dir=docs/plots/attention/
benchmark-rms-norm: ## Run RMSNorm benchmark
PYTHONPATH=. $(PYTHON) benchmarks/normalization/benchmark_rms_norm.py --save-plots --plot-dir=docs/plots/normalization/
benchmark-rope: ## Run RoPE benchmark
PYTHONPATH=. $(PYTHON) benchmarks/attention/benchmark_rope_cached.py --save-plots --plot-dir=docs/plots/attention/
benchmark-flash-attention: ## Run Flash Attention benchmark
PYTHONPATH=. $(PYTHON) benchmarks/attention/benchmark_flash_attention.py --save-plots --plot-dir=docs/plots/attention/
benchmark-swiglu: ## Run SwiGLU benchmark
PYTHONPATH=. $(PYTHON) benchmarks/ffn/benchmark_swiglu_fused.py --save-plots --plot-dir=docs/plots/ffn/