cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

nou
Exemplar

Re: How to implement cl_khr_icd?

yes? I am not sure what exactly are you asking. What else memory you want to allocate?

0 Likes
ash
Journeyman III

Re: How to implement cl_khr_icd?

Hi,

No it's okay I was just confused, but it's the same with buffer object, when you use the flag CL_MEM_ALLOC_HOST_PTR

May I ask if you know some good sources that could help me for programming a kernel using gaussian smooth on a 3D image ?

Best regards,

ash

0 Likes
ash
Journeyman III

Re: How to implement cl_khr_icd?

Hi,

Very tiny question : in a for loop where I call my kernel, if I change some argument' s value, do I have to reset the argument with setArg function or is it done automatically?

Best regards,

ash

0 Likes
nou
Exemplar

Re: How to implement cl_khr_icd?

what you mean by reset. kernel remember argument until it is changed via clSetKernelArg(). you can change only one arg and enqueue kernel and it will run with this new value and other arguments will have old value.

ash
Journeyman III

Re: How to implement cl_khr_icd?

Ok thanks. Yes what I meant by re-set was to give a new value

Have a nice day.

0 Likes
ash
Journeyman III

Re: How to implement cl_khr_icd?

Hi everybody,

I'm really down. I had to change the include from /usr/local/cuda/include ( NVidia  folder) to /opt/AMDAPP/include ( AMD folder). The thing is that, the both cl.hpp files are exactly the same (copied the latest version form Khronos registry) so why do I get errors when pointing the include path to amd folder?

I hope somebdy could help and I have absolutely no clue.

Regards,

ash

0 Likes
nou
Exemplar

Re: How to implement cl_khr_icd?

cl.hpp include cl.h and other headers. so chect those too. and what error do you get?

0 Likes
himanshu_gautam
Grandmaster

Re: How to implement cl_khr_icd?

What is the error that you get? Without specifying the error, we really cannot help you out here -- as much as we want to.

-

Bruha

0 Likes
ash
Journeyman III

Re: How to implement cl_khr_icd?

Hi,

Previously with a test program I had good results on NVIDIA but the same code was giving memory leaks or wrong results on AMD CPU. Then I found out that some objects were desallocated before the enqueueNDRange call, and corrected it. My code was then working fine on AMD CPU and NVIDIA GPU. Now, and I really don't know why my code is not running on NVIDIA anymore, I have the message : memory corrupted free some libgcc detected error and it crash.

I'll try to run my code on another computer and tell you what I find. It doesn't seem to come from the code anymore, or at least I hope so . Should be some library or some systems linking problems. Because, it seems that  people are able to run the same code on NVIDIA  gpu and AMD cpu without any problem.

The difference form the code above, is that I used the #define __CL_ENABLE_EXCEPTIONS( for error handling) and that my function doing the test takes in argument a reference to a device. Is that a wrong thing to do?

Going on further investigation.

if somebody has any idea, meanwhile I'll test and come back later.

Regards,

ash

0 Likes
himanshu_gautam
Grandmaster

Re: How to implement cl_khr_icd?

If you think that __CL_ENABLE_EXCEPTIONS is not working, try this simple program at http://www.thebigblob.com/using-the-cpp-bindings-for-opencl/

Can you run it properly?

0 Likes