From f47227116f3dc12a6081cf342b8560a69c024bbb Mon Sep 17 00:00:00 2001 From: miha-q <> Date: Sun, 3 Mar 2024 01:14:49 -0500 Subject: [PATCH] Sun Mar 3 01:14:49 AM EST 2024 --- src/gpu/gpu.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) 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 { -- 2.39.5