Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (46 loc) · 2.41 KB
/
Copy pathMakefile
File metadata and controls
66 lines (46 loc) · 2.41 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.PHONY: help setup setup-cpu setup-gpu setup-mlir setup-bench git-setup-defaults install dev test test-gpu lint format check bench clean
VENV ?= .venv
PYTHON := $(VENV)/bin/python
PIP := $(VENV)/bin/pip
LLVM_VERSION ?= 20
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
setup: setup-gpu ## Default one-click environment setup (GPU/dev profile)
setup-cpu: ## Create a fresh CPU/dev environment in $(VENV)
ARKE_VENV=$(VENV) ARKE_LLVM_VERSION=$(LLVM_VERSION) scripts/bootstrap_env.sh cpu-dev
setup-gpu: ## Create a fresh GPU/dev environment in $(VENV) with LLVM $(LLVM_VERSION)
ARKE_VENV=$(VENV) ARKE_LLVM_VERSION=$(LLVM_VERSION) scripts/bootstrap_env.sh gpu-dev
setup-mlir: ## Create a fresh MLIR-GPU/Phase 3+5 environment in $(VENV) with LLVM $(LLVM_VERSION)
ARKE_VENV=$(VENV) ARKE_LLVM_VERSION=$(LLVM_VERSION) scripts/bootstrap_env.sh mlir-gpu
setup-bench: ## Create a fresh benchmark environment in $(VENV) with LLVM $(LLVM_VERSION)
ARKE_VENV=$(VENV) ARKE_LLVM_VERSION=$(LLVM_VERSION) scripts/bootstrap_env.sh bench
git-setup-defaults: ## Configure repo-local git push defaults for current branch
scripts/git_setup_defaults.sh
install: ## Install arke package
pip install -e .
dev: ## Install with dev dependencies
pip install -e ".[dev]"
test: ## Run full test suite (per-file process isolation — clean green baseline)
pytest tests/ --dist loadfile -n 2 --tb=short
test-serial: ## Run tests in-process (single worker; ~50 FlagGems-pollution fails expected)
pytest tests/ -v --tb=short
test-gpu: ## Run tests including GPU correctness tests (isolated)
ARKE_GPU_TESTS=1 pytest tests/ --dist loadfile -n 4 --tb=short
lint: ## Run linter
ruff check arke/ tests/ benchmarks/
format: ## Format code
ruff format arke/ tests/ benchmarks/
check: ## Run all checks (lint + type check + test)
ruff check arke/ tests/ benchmarks/
mypy arke/ --ignore-missing-imports
pytest tests/ -v --tb=short
bench: ## Run full benchmark suite (L1 + L2 + L3)
python -m benchmarks --all
bench-l1: ## Run L1 single operator benchmarks
python -m benchmarks --layer L1
bench-report: ## Generate benchmark report from existing results
python -m benchmarks --report
clean: ## Clean build artifacts
rm -rf build/ dist/ *.egg-info .pytest_cache .mypy_cache .ruff_cache
find . -type d -name __pycache__ -exec rm -rf {} +