cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

gideonlee
Journeyman III

Virtual Function / Interface in OpenCL via IL?

I noticed that the new IL spec says that Virtual Function / Interface support is available on Evergreen and future GPUs.  Is there currently any backdoor/proprietary way to mix a little bit of IL into OpenCL kernel code so that kernels written in OpenCL can take advantage of that?

I'm sure there are many potential uses of mixing IL blocks into OpenCL. But interface is particularly useful because of the huge performance advantage over big switch-case blocks.  This is especially true if the code is ported from say an existing C++ or Java program.

 

 

 

 

 

Tags (2)
0 Likes
6 Replies
MicahVillmow
Staff
Staff

Virtual Function / Interface in OpenCL via IL?

gideonlee,
There currently is no way to do inline assembly with IL in OpenCL.
0 Likes
gideonlee
Journeyman III

Virtual Function / Interface in OpenCL via IL?

Micah,

A workaround idea: is the IL/microcode dump of OpenCL from the new profiler fairly close to something that the CAL compiler will take as source code?   (Actually, will it still be called CAL? Or is there going to be a new IL compiler going forward?) 

What I am thinking about is to dump my OpenCL-written kernel into IL, merge it with hand coded IL code that takes advantage of Evergreen features not exposed in the current OpenCL implementation, and compile it using CAL (or whatever it is called going forward).  I don't mind doing some parsing etc. to get it working. But is it even technically possible?

 

 

 

 

 

 

0 Likes
nou
Exemplar

Virtual Function / Interface in OpenCL via IL?

i think it is possible. but i read state from some AMD folk that they will exposed new feature in openCL as in CAL/IL

0 Likes
MicahVillmow
Staff
Staff

Virtual Function / Interface in OpenCL via IL?

Gideonlee,
I haven't seen what is passed as output of the profiler, but if you use the output of the environment variable GPU_DUMP_DEVICE_KERNEL=1, this IL is compatible with calclCompile.
0 Likes
gideonlee
Journeyman III

Virtual Function / Interface in OpenCL via IL?

Great. I'll give it a try.

0 Likes
bpurnomo
Staff
Staff

Virtual Function / Interface in OpenCL via IL?

The IL output from the profiler should be compatible with calclCompile (the output should be identical compare to the output of using the GPU_DUMP_DEVICE_KERNEL environment variable).

0 Likes