Files
sglang/sgl-kernel/Makefile

29 lines
827 B
Makefile
Raw Normal View History

.PHONY: tree ln submodule install build clean rebuild test format
2024-12-02 02:03:49 +08:00
tree:
@tree --prune -I "__pycache__|*.egg-info|*.so|build|3rdparty|dist"
2024-12-02 02:03:49 +08:00
submodule:
@git submodule update --init --recursive
2024-12-02 02:03:49 +08:00
ln: submodule
@rm -rf build && bear python3 setup.py build
install: submodule
2024-12-02 02:03:49 +08:00
@pip install -e .
build: submodule
@rm -rf dist/* || true && export MAX_JOBS=$(nproc) && python3 setup.py bdist_wheel && pip3 install dist/*whl --force-reinstall --no-deps
2024-12-02 02:03:49 +08:00
clean:
@rm -rf build dist *.egg-info
rebuild: clean submodule build
@echo "Succeed to rebuild"
2024-12-02 02:03:49 +08:00
test:
@find tests -name "test_*.py" | xargs -n 1 python3
format:
@find src tests -name '*.cc' -o -name '*.cu' -o -name '*.cuh' -o -name '*.h' -o -name '*.hpp' | xargs clang-format -i && find src tests -name '*.py' | xargs isort && find src tests -name '*.py' | xargs black