浏览代码

Added run script, fix for cpu heartwall benchmark

Fixed selection of the OCL platform, changed the number of threads to
meet odroid requirements
Andrea Gussoni 8 年之前
父节点
当前提交
c690b4f9b0
共有 3 个文件被更改,包括 4 次插入3 次删除
  1. 2 2
      opencl/heartwall/kernel/kernel_gpu_opencl_wrapper.c
  2. 1 1
      opencl/heartwall/main.h
  3. 1 0
      opencl/heartwall/run-cpu

+ 2 - 2
opencl/heartwall/kernel/kernel_gpu_opencl_wrapper.c

@@ -112,7 +112,7 @@ kernel_gpu_opencl_wrapper(	params_common common,
 	}
 	}
 
 
 	// Select platform
 	// Select platform
-	int plat = 0;
+	int plat = 1;
 	platform = platforms[plat];
 	platform = platforms[plat];
 	printf("Selecting platform %d\n", plat);
 	printf("Selecting platform %d\n", plat);
 
 
@@ -128,7 +128,7 @@ kernel_gpu_opencl_wrapper(	params_common common,
 	// Create context for selected platform being GPU
 	// Create context for selected platform being GPU
 	cl_context context;
 	cl_context context;
 	context = clCreateContextFromType(	context_properties, 
 	context = clCreateContextFromType(	context_properties, 
-										CL_DEVICE_TYPE_ALL, 
+										CL_DEVICE_TYPE_CPU, 
 										NULL, 
 										NULL, 
 										NULL, 
 										NULL, 
 										&error);
 										&error);

+ 1 - 1
opencl/heartwall/main.h

@@ -11,7 +11,7 @@
 #elif defined(RD_WG_SIZE)
 #elif defined(RD_WG_SIZE)
         #define NUMBER_THREADS RD_WG_SIZE
         #define NUMBER_THREADS RD_WG_SIZE
 #else
 #else
-        #define NUMBER_THREADS 256
+        #define NUMBER_THREADS 128
 #endif
 #endif
 
 
 #define CHECK 37
 #define CHECK 37

+ 1 - 0
opencl/heartwall/run-cpu

@@ -0,0 +1 @@
+./heartwall 20