| # This makefile does nothing but delegating the actual building to cmake. |
| NIGHTLY_TOOL_OPTS := pull |
| @mkdir -p build && cd build && cmake .. $(shell $(PYTHON) ./scripts/get_python_cmake_flags.py) && $(MAKE) |
| @./scripts/build_local.sh |
| @./scripts/build_android.sh |
| clean: # This will remove ALL build folders. |
| @cloc --read-lang-def=caffe.cloc caffe2 || \ |
| echo "Cloc is not available on the machine. You can install cloc with " && \ |
| echo " sudo apt-get install cloc" |
| @if [ -n "$(shell git status --porcelain)" ]; then \ |
| echo "Please commit or stash all changes before running this script"; \ |
| setup-env: ensure-branch-clean |
| $(PYTHON) tools/nightly.py $(NIGHTLY_TOOL_OPTS) |
| $(MAKE) setup-env PYTHON="$(PYTHON)" NIGHTLY_TOOL_OPTS="$(NIGHTLY_TOOL_OPTS) --cuda" |
| setup_env_cuda: setup-env-cuda |
| $(PIP) install lintrunner |
| $(PIP) uninstall -y triton |
| @./scripts/install_triton_wheel.sh |