cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

sunny_lbk
Journeyman III

"-cl-nv-verbose" flag with clBuildProgram is not working!

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

0 Likes
1 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.

View solution in original post

0 Likes
6 Replies
Wenju
Elite

Hi sunny.lbk,

1. I think you should have a NV card. 2, Add  "#pragma cl_nv_compiler_options". Have a try.

0 Likes

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

0 Likes

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.

0 Likes
nou
Exemplar

this is nvidia only extension. and i am not sure if it will work on mac os.

0 Likes

I have an Nvidia graphics card on my macbook. Is there any alternate way I can get the register usage information?

Thanks

0 Likes

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.

0 Likes