-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
44 lines (27 loc) · 1.3 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
35
36
37
38
39
40
41
42
43
44
say_hello:
echo "Hello World!"
.PHONY: matmul_talk matmul_talk/launch_mm.o sum sum/launch_sum.o
mm: clean_mm matrix_multiplication/launch_mm.o
sum: sum/launch_sum.o
sum/launch_sum.o: sum/launch_sum.cu
nvcc -O3 -lineinfo -o $@ -std=c++17 -arch=sm_70 $< \
sum/sum_*.cu -lcudart
matmul_talk: matmul_talk/launch_mm.o
# matrix_multiplication/launch_mm.o: matrix_multiplication/launch_mm.cu
# nvcc -O3 -lineinfo -o $@ -std=c++17 -arch=sm_70 -I/mnt/shared/swsiu/cutlass/sm70/cutlass/include $< \
# matrix_multiplication/mm_*.cu matrix_multiplication/yz_mm_*.cu -lcublas
matmul_talk/launch_mm.o: matmul_talk/launch_mm.cu
nvcc -O3 -lineinfo -o $@ -std=c++17 -arch=sm_70 $< \
matmul_talk/mm_*.cu -lcublas
profile: sum/launch_sum.o #matmul_talk/launch_mm.o
sudo ncu -f --target-processes all --set full -o $@ ./$<
matrix_multiplication/launch_mm.o: matrix_multiplication/launch_mm.cu
nvcc -O3 -lineinfo -o $@ -std=c++17 -arch=sm_70 $< \
matrix_multiplication/mm_*.cu matrix_multiplication/yz_mm_*.cu -lcublas
clean_mm:
rm -f matrix_multiplication/*.o
test: clean_test matrix_multiplication/test.o
matrix_multiplication/test.o: matrix_multiplication/test.cu
nvcc -o $@ -std=c++17 -arch=sm_70 $<
%.o: %.cu
nvcc -lineinfo -o $@ -std=c++17 -arch=sm_70 -I/mnt/shared/swsiu/cutlass/sm70/cutlass/include $< -lcublas