cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

tomschi
Adept I

OpenCL Static C++ Support in APP SDK

hi,

i'm working on a ray tracing project that uses runtime compiled C++ kernels on CUDA and OpenCL. To support C++ (or a subset of it) in kernel code, we've used successfully AMD APP SDK (providing the static C++ extension) on windows and linux. While everything works fine on Windows, clBuildProgram under Linux now fails after upgrading to the latest linux64 SDK version:

  error: unknown argument: '--c++'

We use "-x clc++" as build option to denote that it is C++ kernel code, we also tried different opencl kernel language versions (see AMD OpenCL 2.0 with C++ static kernel extension?) which did not resolve the problem. With the AMD-APP-SDKInstaller-v3.0.124.132-GA-linux64 package everything was working fine, with AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 the C++ compilation does not work anymore.

We now have the following questions:

- Is this a SDK bug or a deliberate removal of a feature?

- Is there any way to get C++ code compiled with the new SDK version on linux64?

- What is AMD's way to go for C++ kernels in the future? OpenCL 2.2 with C++? ROCm · GitHub & HCC?

I remember struggling with a similar driver problem with very limited success (Static C++ support in Current OpenCL Drivers) and was wondering if or when there is new information available...

thanks and lg,

  tomschi

0 Likes
1 Solution
dipak
Big Boss

Hi,

Static c++ is still supported [ " -x clc++" can only be used for OpenCL 1.x].

Are clinfo and other OpenCL programs running fine? Please share the driver version if any driver is there.

If I remember correctly, once I faced a similar error when libamdocl12cl64.so was not linked correctly. Please make sure libamdocl12cl64.so is there with libamdocl64.so.

What is AMD's way to go for C++ kernels in the future? OpenCL 2.2 with C++? ROCm · GitHub & HCC?

As of now, AMD has not announced plans for OpenCL 2.1 support (hence OpenCL C++ kernels). However, ROCm HIP and HCC may be used for programming in C++ static kernel language if you are interested.

[How to use OpenCL C++ on AMD hardware, today ]

Regards,

View solution in original post

3 Replies
dipak
Big Boss

Hi,

Static c++ is still supported [ " -x clc++" can only be used for OpenCL 1.x].

Are clinfo and other OpenCL programs running fine? Please share the driver version if any driver is there.

If I remember correctly, once I faced a similar error when libamdocl12cl64.so was not linked correctly. Please make sure libamdocl12cl64.so is there with libamdocl64.so.

What is AMD's way to go for C++ kernels in the future? OpenCL 2.2 with C++? ROCm · GitHub & HCC?

As of now, AMD has not announced plans for OpenCL 2.1 support (hence OpenCL C++ kernels). However, ROCm HIP and HCC may be used for programming in C++ static kernel language if you are interested.

[How to use OpenCL C++ on AMD hardware, today ]

Regards,

tomschi
Adept I

thx for the help,

the problem was exactly as suspected by you: libamdocl64.so was found, but libamdocl12cl64.so was not.

i now added also the directory containing libamdocl12cl64.so (which is needed for static C++ kernel language) to the library path, then the tests work fine again.

with AMD-APP-SDK-3.0.124.132-GA-linux64 both SOs were in the same directory,

but with AMD-APP-SDK-3.0.130.136-GA-linux64 they are in separate folders now.

lg tomschi

0 Likes

Hi,

We've already received couple of other broken link issues related to this structural difference. The problem has been reported to the concerned team.

Regards,

0 Likes