Browse Source

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 years ago
parent
commit
c690b4f9b0

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

@@ -112,7 +112,7 @@ kernel_gpu_opencl_wrapper(	params_common common,
 	}
 
 	// Select platform
-	int plat = 0;
+	int plat = 1;
 	platform = platforms[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
 	cl_context context;
 	context = clCreateContextFromType(	context_properties, 
-										CL_DEVICE_TYPE_ALL, 
+										CL_DEVICE_TYPE_CPU, 
 										NULL, 
 										NULL, 
 										&error);

+ 1 - 1
opencl/heartwall/main.h

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

+ 1 - 0
opencl/heartwall/run-cpu

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