-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (23 loc) · 1.02 KB
/
Makefile
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
NVCC = nvcc
NVCC_FLAGS = -use_fast_math -std=c++17 -O3 --compiler-options '-Wall'# -Wextra -Wpedantic
INCLUDES = -I./gato -I./config
HEADERS = $(wildcard gato/*.cuh config/*.h dependencies/*.h)
TARGETS := single_sqp batch_sqp benchmark_batch_sqp
build/%: examples/%.cu $(HEADERS)
$(NVCC) $(NVCC_FLAGS) $(INCLUDES) -o $@ $<
.PHONY: build build-single build-batch build-benchmark build-bindings clean
build: build-single build-batch build-benchmark build-bindings
build-single: examples/single_sqp.cu $(HEADERS)
@mkdir -p build
$(NVCC) $(NVCC_FLAGS) $(INCLUDES) -o build/single_sqp examples/single_sqp.cu
build-batch: examples/batch_sqp.cu $(HEADERS)
@mkdir -p build
$(NVCC) $(NVCC_FLAGS) $(INCLUDES) -o build/batch_sqp examples/batch_sqp.cu
build-benchmark: examples/benchmark_batch_sqp.cu $(HEADERS)
@mkdir -p build
$(NVCC) $(NVCC_FLAGS) $(INCLUDES) -o build/benchmark_batch_sqp examples/benchmark_batch_sqp.cu
build-bindings:
cd bindings && TORCH_CUDA_ARCH_LIST="8.9" pip install -e .
clean:
rm -rf build
rm -rf bindings/build