Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrainiuk authored Sep 11, 2021
1 parent 6b7d522 commit 0360549
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CXX = dpcpp
CXX = clang++
COPT = -fsycl

mklcpu: run_mklcpu
Expand All @@ -7,17 +7,17 @@ cublas: run_cublas

mklgpu: run_mklgpu

onemkl_gemm_usm.out: onemkl_gemm_usm.o
onemkl_%_usm.out: onemkl_%_usm.o
$(CXX) $(COPT) $^ -o $@ -L${ONEMKL}/lib -lonemkl -ldl

onemkl_gemm_usm_mklcpu.out: onemkl_gemm_usm_mklcpu.o
onemkl_%_usm_mklcpu.out: onemkl_%_usm_mklcpu.o
$(CXX) $(COPT) $^ -o $@ ${ONEMKL}/lib/libonemkl_blas_mklcpu.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_sequential.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lOpenCL -ldl -lm -lpthread

onemkl_gemm_usm_mklgpu.out: onemkl_gemm_usm_mklgpu.o
onemkl_%_usm_mklgpu.out: onemkl_%_usm_mklgpu.o
$(CXX) $(COPT) $^ -o $@ ${ONEMKL}/lib/libonemkl_blas_mklgpu.a ${MKLROOT}/lib/intel64/libmkl_sycl.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_sequential.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lOpenCL -ldl -lm -lpthread

onemkl_gemm_usm_cublas.out: onemkl_gemm_usm_cublas.o
$(CXX) $(COPT) $^ -o $@ ${ONEMKL}/lib/libonemkl_blas_cublas.a -lcublas -ldl
onemkl_%_usm_cublas.out: onemkl_%_usm_cublas.o
$(CXX) $(COPT) $^ -o $@ ${ONEMKL}/lib/libonemkl_blas_cublas.a -lcublas -lcuda -ldl

%.o: %.cpp
$(CXX) $(COPT) -I${ONEMKL}/include -c $^ -o $@
Expand All @@ -32,13 +32,13 @@ onemkl_gemm_usm_cublas.out: onemkl_gemm_usm_cublas.o
$(CXX) $(COPT) -I${ONEMKL}/include -DGEMM_CUBLAS -c $^ -o $@

run_mklcpu: onemkl_gemm_usm_mklcpu.out
for n in 500 1000 2000 4000 8000; do ./$^ S N N $$n $$n $$n 100 $$n $$n $$n; done
for n in 500 1000 2000 4000 8000; do ./onemkl_gemm_usm_mklcpu.out S N N $$n $$n $$n 100 $$n $$n $$n; done

run_cublas: onemkl_gemm_usm_cublas.out
for n in 500 1000 2000 4000 8000; do ./$^ S N N $$n $$n $$n 100 $$n $$n $$n; done
for n in 500 1000 2000 4000 8000; do ./onemkl_gemm_usm_cublas.out S N N $$n $$n $$n 100 $$n $$n $$n; done

run_mklgpu: onemkl_gemm_usm_mklgpu.out
for n in 500 1000 2000 4000 8000; do ./$^ S N N $$n $$n $$n 100 $$n $$n $$n; done
for n in 500 1000 2000 4000 8000; do ./onemkl_gemm_usm_mklgpu.out S N N $$n $$n $$n 100 $$n $$n $$n; done

clean:
rm -rf *.o *.out
Expand Down

0 comments on commit 0360549

Please sign in to comment.