Hello all,
I am a newbee to OpenCL. I have been working with CUDA for quite some time and now I am trying out OpenCL. I want to know the number of registers used per thread in a kernel. In CUDA, using nvcc --ptxas-options=-v flag gives that information. After googling, I found that "-cl-nv-verbose"
flag also gives similar information when used with clBuildProgram. But when I use that flag in the kernel, I am getting an error:
When I use,
clBuildProgram(program, 1, &device_id, "-cl-nv-verbose", NULL, NULL);
I get the error:
Error: clBuildProgram(-43) at the above line
Am I using it correctly?
I am working on Macbook using latest version of Xcode (so OpenCL 1.2 I guess)
Any ideas?
Thanks
Solved! Go to Solution.
sunny,
You are on the AMD developer forum. Please post this question on the Apple or NVidia developer forums for help as they are the best spot to answer your questions about their hardware/software.
Hi sunny.lbk,
1. I think you should have a NV card. 2, Add "#pragma cl_nv_compiler_options". Have a try.
My machine has an Nvidia 320M graphics card. I added the line "#pragma cl_nv_compiler_options" in the kernel. Even then no luck.
Thanks
I ignored your os, sorry. I think it will work on Windows. You can use a program that can be executed successfully on windows to test it.
this is nvidia only extension. and i am not sure if it will work on mac os.
I have an Nvidia graphics card on my macbook. Is there any alternate way I can get the register usage information?
Thanks
sunny,
You are on the AMD developer forum. Please post this question on the Apple or NVidia developer forums for help as they are the best spot to answer your questions about their hardware/software.