From: miha-q <> Date: Sun, 3 Mar 2024 03:11:48 +0000 (-0500) Subject: Sat Mar 2 10:11:48 PM EST 2024 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=1053a939a333460334639554560e23bc91204372;p=QAnsel.git Sat Mar 2 10:11:48 PM EST 2024 --- diff --git a/src/gpu.c b/src/gpu.c index 04bc086..d44c749 100644 --- a/src/gpu.c +++ b/src/gpu.c @@ -143,20 +143,12 @@ void GPU_mmul(double* ptrR, double* ptrA, double* ptrB, size_t rowsA, size_t col if (err != CL_SUCCESS) { fprintf(stderr, "GPU fatal error: clBuildProgram() failed.\n"); - size_t log_size; clGetProgramBuildInfo(program, GPU_device_id, CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size); - - // Allocate memory for the log - char *log = (char *) malloc(log_size); - - // Get the log + char* log = malloc(log_size); clGetProgramBuildInfo(program, GPU_device_id, CL_PROGRAM_BUILD_LOG, log_size, log, NULL); - printf("%s", log); - - - + free(log); exit(1); } #ifdef GPU_DEBUG diff --git a/src/gpu_mmul.cl b/src/gpu_mmul.cl index 1e53db1..5f649a2 100644 --- a/src/gpu_mmul.cl +++ b/src/gpu_mmul.cl @@ -1,4 +1,4 @@ -__kernel gpu_mmul(__global float* ptrR, __global float* ptrA, __global float* ptrB, const int N, const int W) +__kernel void gpu_mmul(__global float* ptrR, __global float* ptrA, __global float* ptrB, const int N, const int W) { int row = get_global_id(0); int col = get_global_id(1);