From c75969d7c8670fed9bd2e7aa7baa18056b8e5dff Mon Sep 17 00:00:00 2001 From: Evghenii Date: Mon, 6 Jan 2014 10:27:25 +0100 Subject: [PATCH] added LLVM_GPU and NVVM_GPU compiler rules --- examples_ptx/aobench/Makefile_gpu | 3 +++ examples_ptx/common_gpu.mk | 12 ++++++++---- examples_ptx/mandelbrot_tasks/Makefile_gpu | 3 +++ examples_ptx/stencil/Makefile_gpu | 3 +++ examples_ptx/volume_rendering/Makefile_gpu | 3 +++ 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/examples_ptx/aobench/Makefile_gpu b/examples_ptx/aobench/Makefile_gpu index d3cc3663..5d21a06f 100644 --- a/examples_ptx/aobench/Makefile_gpu +++ b/examples_ptx/aobench/Makefile_gpu @@ -4,6 +4,9 @@ CU_SRC=ao.cu CXX_SRC=ao.cpp ao_serial.cpp PTXCC_REGMAX=64 +LLVM_GPU=1 +NVVM_GPU=1 + include ../common_gpu.mk diff --git a/examples_ptx/common_gpu.mk b/examples_ptx/common_gpu.mk index a3de535f..bd3e106f 100644 --- a/examples_ptx/common_gpu.mk +++ b/examples_ptx/common_gpu.mk @@ -51,11 +51,15 @@ LLC_FLAGS=-march=nvptx64 -mcpu=sm_35 # .SUFFIXES: .bc .o .cu -OBJSgpu_llvm=$(ISPC_LLVM_OBJS) $(CXX_OBJS) $(NVCC_OBJS) -PROGgpu_llvm = $(PROG)_llvm_gpu +ifdef LLVM_GPU + OBJSgpu_llvm=$(ISPC_LLVM_OBJS) $(CXX_OBJS) $(NVCC_OBJS) + PROGgpu_llvm = $(PROG)_llvm_gpu +endif -OBJSgpu_nvvm=$(ISPC_NVVM_OBJS) $(CXX_OBJS) $(NVCC_OBJS) -PROGgpu_nvvm = $(PROG)_nvvm_gpu +ifdef NVVM_GPU + OBJSgpu_nvvm=$(ISPC_NVVM_OBJS) $(CXX_OBJS) $(NVCC_OBJS) + PROGgpu_nvvm = $(PROG)_nvvm_gpu +endif ifdef CU_SRC OBJScu=$(CU_OBJS) $(CXX_OBJS) $(NVCC_OBJS) diff --git a/examples_ptx/mandelbrot_tasks/Makefile_gpu b/examples_ptx/mandelbrot_tasks/Makefile_gpu index f9732a80..1c019e9a 100644 --- a/examples_ptx/mandelbrot_tasks/Makefile_gpu +++ b/examples_ptx/mandelbrot_tasks/Makefile_gpu @@ -3,6 +3,9 @@ ISPC_SRC=mandelbrot_tasks.ispc CU_SRC=mandelbrot_tasks.cu CXX_SRC=mandelbrot_tasks.cpp mandelbrot_tasks_serial.cpp +LLVM_GPU=1 +NVVM_GPU=1 + include ../common_gpu.mk diff --git a/examples_ptx/stencil/Makefile_gpu b/examples_ptx/stencil/Makefile_gpu index 3f31b3e0..5b6e4cbf 100644 --- a/examples_ptx/stencil/Makefile_gpu +++ b/examples_ptx/stencil/Makefile_gpu @@ -4,6 +4,9 @@ CU_SRC=stencil.cu CXX_SRC=stencil.cpp stencil_serial.cpp PTXCC_REGMAX=128 +LLVM_GPU=1 +NVVM_GPU=1 + include ../common_gpu.mk diff --git a/examples_ptx/volume_rendering/Makefile_gpu b/examples_ptx/volume_rendering/Makefile_gpu index cbe47944..4f683307 100644 --- a/examples_ptx/volume_rendering/Makefile_gpu +++ b/examples_ptx/volume_rendering/Makefile_gpu @@ -4,6 +4,9 @@ CU_SRC=volume.cu CXX_SRC=volume.cpp volume_serial.cpp PTXCC_REGMAX=64 +LLVM_GPU=1 +NVVM_GPU=1 + include ../common_gpu.mk