cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

Highlighted
Adept I
Adept I

Re: I don't konw if my laptop support OpenCL 2.0 or not

Yes,i have received your message and sent the project to your email.Please check.

Regards

0 Kudos
Reply
Highlighted
Staff
Staff

Re: I don't konw if my laptop support OpenCL 2.0 or not

I haven't received your email yet. Don't know why both of us not getting each others email. May be any firewall issue. If the project is not large, could you please attach the project on that thread itself?

Regards,

0 Kudos
Reply
Highlighted
Adept I
Adept I

Re: I don't konw if my laptop support OpenCL 2.0 or not

Ok,

I have attached the whole project .

Please try to download.

Regards

0 Kudos
Reply
Highlighted
Staff
Staff

Re: I don't konw if my laptop support OpenCL 2.0 or not

Try to create the context with GPU devices only.

Highlighted
Adept I
Adept I

Re: I don't konw if my laptop support OpenCL 2.0 or not

hi,

Thank you for your advice.

I create the context with GPU and clEnqueueSVMMap() returns CL_SUCCESS.

But when I build program with options "-cl-std=CL2.0" ,it returns some error.

*************************************************

code:

string buildflag="-cl-std=CL2.0";
status = clBuildProgram(
    program1,
    numDevices,
    devices,
    buildflag.c_str(),
    NULL,
    NULL);

buildlog:

Internal error: Link failed.

Make sure the system setup is correct.

**************************************************

I haven't met this error before.

Look forward to your reply.

Regards

0 Kudos
Reply
Highlighted
Staff
Staff

Re: I don't konw if my laptop support OpenCL 2.0 or not

Last time when I was testing the above attached code, I didn't find any such error. Please verify the build settings and code carefully.

Just one point. Do you observe same problem if you select one GPU at a time?

Regards,

0 Kudos
Reply
Highlighted
Adept I
Adept I

Re: I don't konw if my laptop support OpenCL 2.0 or not

I attach the newest project.The old code don't use build options "-cl-std=CL2.0".

I see your reply in OpenCL 2.0 - Shared Virtual Memory Programming and insert some code to add build options.

Aditionally,i use SVM in my code refer to SVMBinarySearchTree .But i don't know if the way is correct or not.

I follow your suggestion and choose one GPU to run my kernel. However, when i debug the project,it failed in clBuildProgram() and the clGetProgramBuildInfo() returns the build log as mentioned above.

If you need know more programming environment information to solve the problem,please tell me.

Thanks for your patience and help.

Regards

0 Kudos
Reply
Highlighted
Adept I
Adept I

Re: I don't konw if my laptop support OpenCL 2.0 or not

PS: If i don't use build options(clBuildProgram( program1,numDevices,devices,NULL,NULL,NULL)Smiley Wink,clBuildProgram return CL_SUCCESS.

0 Kudos
Reply
Highlighted
Staff
Staff

Re: I don't konw if my laptop support OpenCL 2.0 or not

Please don't use any printf statement inside the kernel code when building for OCL 2.0. AFAIK, kernel compilation for OpenCL 2.0 fails if kernel has any printf statement. Regarding this, I already filed a bug some time ago.

Just to point out:

You've passed two SVM pointers to "vecsvm" kernel (kernel3) though it takes only one argument.

Regards,

Highlighted
Adept I
Adept I

Re: I don't konw if my laptop support OpenCL 2.0 or not

Excellent! You are right.I delete printf statement inside the kernel and clBuildProgram() returns CL_SUCCESS.

It's my mistake that pass two SVM pointer to kernel3.Before i use build options of "-cl-std=CL2.0",I try to debug the program which has SVM statement.It returns a error as follows:

Access conflict occurs when 0x00000197000078E0 is read from the 0xC0000005

At that time,kernel3 is same as kernel2.Just using 2 SVM buffer replace the traditional buffers.I thought maybe 2 SVM buffers caused access confliction.So i delete one and just using one argument in kernel3.But i forgot to change the host code.After that ,you know, I found that I should use build options when building for OCL2.0. And met the internel error as mentioned when i add build options.

Now, I have fixed the mistake in host code,just passing one SVM pointer to kernel3. What's more,there is no internel error and clBuildProgram() returns CL_SUCCESS. It should owe to your advices.

However,I met the old access conflict error again when the program running to clEnqueueNDRangeKernel(...,kernel3,..).

Do i use SVM in an incorrect way? Or some other reasons?

0 Kudos
Reply