From 6640dd0a6cac8227311294579e500ec00f453b07 Mon Sep 17 00:00:00 2001 From: evghenii Date: Mon, 18 Nov 2013 12:19:33 +0100 Subject: [PATCH] added Makefile for KNC --- examples_cuda/stencil/Makefile_knc | 37 ++++++++++++++++++++++++++++++ examples_cuda/stencil/stencil.ispc | 4 ++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 examples_cuda/stencil/Makefile_knc diff --git a/examples_cuda/stencil/Makefile_knc b/examples_cuda/stencil/Makefile_knc new file mode 100644 index 00000000..5a25f3b7 --- /dev/null +++ b/examples_cuda/stencil/Makefile_knc @@ -0,0 +1,37 @@ +PROG=stencil_mic +ISPC_SRC=stencil.ispc +CXX_SRC=stencil.cpp ../tasksys.cpp stencil_serial.cpp + +CXX=icc +CXXFLAGS=-O3 -I$(CUDATK)/include -mmic -openmp +LD=icc +LDFLAGS=-mmic -openmp + +ISPC=ispc +ISPCFLAGS=-O3 --math-lib=default --target=generic-16 --c++-include-file=../intrinsics/knc-i1x16.h --opt=fast-math + +.SUFFIXES: .o .cpp + + +ISPC_OBJ=$(ISPC_SRC:%.ispc=%_ispc.o) +CXX_OBJ=$(CXX_SRC:%.cpp=%.o) + +all: $(PROG) + + + +$(PROG): $(ISPC_OBJ) $(CXX_OBJ) + $(LD) -o $@ $^ $(LDFLAGS) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -o $@ -c $< + +%_ispc.o: %.ispc + $(ISPC) $(ISPCFLAGS) --emit-c++ -o `basename $< .ispc`_ispc_zmm.cpp -h `basename $< .ispc`_ispc.h $< + $(CXX) $(CXXFLAGS) -o $@ `basename $< .ispc`_ispc_zmm.cpp -c + +clean: + /bin/rm -rf *_ispc_zmm.cpp *.o $(PROG) + + + diff --git a/examples_cuda/stencil/stencil.ispc b/examples_cuda/stencil/stencil.ispc index 72c28ef6..ef7c8585 100644 --- a/examples_cuda/stencil/stencil.ispc +++ b/examples_cuda/stencil/stencil.ispc @@ -62,9 +62,9 @@ stencil_step(uniform int x0, uniform int x1, } } -#define SPANX 32 +#define SPANX 64 #define SPANY 8 -#define SPANZ 8 +#define SPANZ 4 static task void stencil_step_task(uniform int x0, uniform int x1,