From: miha-q <> Date: Sun, 3 Mar 2024 06:14:49 +0000 (-0500) Subject: Sun Mar 3 01:14:49 AM EST 2024 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=f47227116f3dc12a6081cf342b8560a69c024bbb;p=QAnsel.git Sun Mar 3 01:14:49 AM EST 2024 --- diff --git a/src/gpu/gpu.c b/src/gpu/gpu.c index ad8b946..cebe490 100644 --- a/src/gpu/gpu.c +++ b/src/gpu/gpu.c @@ -132,13 +132,20 @@ void GPU_mmul(float* ptrR, float* ptrA, float* ptrB, size_t rowsA, size_t colsB, free(log); exit(1); } - printf("a\n"); - clGetProgramInfo(program, CL_PROGRAM_BINARY_SIZES, sizeof(size_t), &GPU_mmul_cache_len, NULL); - printf("b\n"); + err = clGetProgramInfo(program, CL_PROGRAM_BINARY_SIZES, sizeof(size_t), &GPU_mmul_cache_len, NULL); + if (err != CL_SUCCESS) + { + fprintf(stderr, "GPU fatal error: clGetProgramInfo() failed.\n"); + exit(1); + } GPU_mmul_cache = malloc(GPU_mmul_cache_len); - printf("c\n"); clGetProgramInfo(program, CL_PROGRAM_BINARIES, sizeof(unsigned char*), &GPU_mmul_cache, NULL); - printf("d\n"); + printf("%lu\n", GPU_mmul_cache_len); + if (err != CL_SUCCESS) + { + fprintf(stderr, "GPU fatal error: clGetProgramInfo() failed.\n"); + exit(1); + } } else {