Skip to content
Snippets Groups Projects
Commit ae2dc047 authored by Prakalp Srivastava's avatar Prakalp Srivastava
Browse files

Made lbm consistent with other benchmarks

parent cdbbd423
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
LANGUAGE=opencl
SRCDIR_OBJS=main.o lbm.o ocl.o
#KERNEL_OBJS=kernel.ir
APP_CUDALDFLAGS=-lm
APP_CFLAGS=-ffast-math -O3 -DNUM_CORES=$(NUM_CORES)
APP_CXXFLAGS=-ffast-math -O3 -DNUM_CORES=$(NUM_CORES)
......
......@@ -293,23 +293,23 @@ void OpenCL_initialize(OpenCL_Param* prm)
pb_SetOpenCL(&(prm->clContext), &(prm->clCommandQueue));
/*const unsigned char* clSource[] = {readFile("kernel.ir")};*/
const unsigned char* clSource[] = {readFile("src/opencl_cpu_baseline/kernel.cl")};
/*prm->clProgram = clCreateProgramWithSource(prm->clContext,1,clSource,NULL,&clStatus);*/
prm->clProgram = clCreateProgramWithSource(prm->clContext,1,clSource,NULL,&clStatus);
/*size_t binarySize = 39303;*/
/*prm->clProgram = clCreateProgramWithBinary(prm->clContext,1, &prm->clDevice, &binarySize, &clSource[0], NULL,&clStatus);*/
/*CHECK_ERROR("clCreateProgramWithSource")*/
CHECK_ERROR("clCreateProgramWithSource")
/*char clOptions[100];*/
/*sprintf(clOptions,"-I src/opencl_nvidia");*/
char clOptions[100];
sprintf(clOptions,"-I src/opencl_nvidia");
/*clStatus = clBuildProgram(prm->clProgram,1,&(prm->clDevice),clOptions,NULL,NULL);*/
/*CHECK_ERROR("clBuildProgram")*/
clStatus = clBuildProgram(prm->clProgram,1,&(prm->clDevice),clOptions,NULL,NULL);
CHECK_ERROR("clBuildProgram")
/*prm->clKernel = clCreateKernel(prm->clProgram,"performStreamCollide_kernel",&clStatus);*/
/*CHECK_ERROR("clCreateKernel")*/
prm->clKernel = clCreateKernel(prm->clProgram,"performStreamCollide_kernel",&clStatus);
CHECK_ERROR("clCreateKernel")
/*free((void*)clSource[0]);*/
free((void*)clSource[0]);
pb_CreateAndBuildKernelFromBinary("kernel.ir", "performStreamCollide_kernel", &prm->clContext, &prm->clDevice, &prm->clProgram, &prm->clKernel);
/*pb_CreateAndBuildKernelFromBinary("build/opencl_cpu_baseline_default/kernel.ir", "performStreamCollide_kernel", &prm->clContext, &prm->clDevice, &prm->clProgram, &prm->clKernel);*/
}
......@@ -118,6 +118,10 @@ $(BUILDDIR)/%.linked.bc : $(BUILDDIR)/%.ll
$(BUILDDIR)/%.ll : $(SRCDIR)/%.cl
$(LLVM_CC) $(CFLAGS) -Dcl_clang_storage_class_specifiers -isystem $(LIBCLC)/include -include clc/clc.h -target nvptx64-nvidia-nvcl $< -O3 -emit-llvm -S -o $@
$(BUILDDIR)/%.ir : $(SRCDIR)/%.cl
cd $(SRCDIR); ioc64 -input=kernel.cl -ir=kernel.ir
cp $(SRCDIR)/kernel.ir $@
no_opencl:
@echo "OPENCL_PATH is not set. Open $(PARBOIL_ROOT)/common/Makefile.conf to set default value."
@echo "You may use $(PLATFORM_MK) if you want a platform specific configurations."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment