cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

haeseunl
Journeyman III

Is there any way to modify the OpenCL kernel during run-time?

Jump to solution

Hi.

I start to grabbing the OpenCL and I have a question.

Is there any way to modify the OpenCL kernel in assembler level during run-time?

I saw some posts that there is a few ways byusing llvm, but I couldn't get detail information & document.

Any information would be helpful.


Thank you.

Tags (2)
0 Likes
1 Solution

Accepted Solutions
realhet
Miniboss

Re: Is there any way to modify the OpenCL kernel during run-time?

Jump to solution

Hi,

If you have a lot of time and really want to experience with assembly, then you can try my assembler thing -> http://realhet.wordpress.com/

You can write code in GCN asm language.

But there are some downsides though:

- This is the biggest negative issue: It's not compatible with current drivers. It works with Catalyst 13.4 and 12.10 and in between.

- You have to write the whole thing. Although you can copy assembly source from the kernel you're developing, the assembler is more or less compatible with the official disassembler.

- You have to learn how buffers are passed to the kernel. It's recommended to read through the whole Southern Islands ISA Manual.

- Don't afraid that this is windows only! If you have your kernel running, you can reuse it on Linux as well.

And please note, it's only a hobby project.

View solution in original post

0 Likes
6 Replies
dipak
Staff
Staff

Re: Is there any way to modify the OpenCL kernel during run-time?

Jump to solution

Hi,

I am unable to follow your question. Could you please be more explicit?

Regards,

0 Likes
haeseunl
Journeyman III

Re: Is there any way to modify the OpenCL kernel during run-time?

Jump to solution

Let me ask a question in different way.

Can I do something during the compilation of .cl file? (i.e. instruction scheduling)

As far I know, when I use clCreateProgramWithBinary() function, I should provide binaries that I can get from the .cl file.

So, before I execute opencl application, I should compile my .cl file and give the kernel binary as a input.

What I want is when I create a binary from .cl file, do some assembler modification.

Is that possible?

Thank you.

0 Likes
dipak
Staff
Staff

Re: Is there any way to modify the OpenCL kernel during run-time?

Jump to solution

Hi,

Thanks for this clarification. I've asked someone from compiler team and I'll get back to you as soon as I get any reply.

Regards,

dipak
Staff
Staff

Re: Is there any way to modify the OpenCL kernel during run-time?

Jump to solution

Hi,

As I got to know that it is not possible. Only way to access the compiler is through supported compiler flags.

Regards,

haeseunl
Journeyman III

Re: Is there any way to modify the OpenCL kernel during run-time?

Jump to solution

Thank you for your answer.

Let me ask one last question.

Is there any open-sourced llvm back-end for AMD GPU?

I can see several webpages that talk about the R600 back-end is integrated into llvm.

Can I use that to compile opencl application?

Where should I go to get more detail information for the R600 back-end?

Thank you.

Regards,

0 Likes
realhet
Miniboss

Re: Is there any way to modify the OpenCL kernel during run-time?

Jump to solution

Hi,

If you have a lot of time and really want to experience with assembly, then you can try my assembler thing -> http://realhet.wordpress.com/

You can write code in GCN asm language.

But there are some downsides though:

- This is the biggest negative issue: It's not compatible with current drivers. It works with Catalyst 13.4 and 12.10 and in between.

- You have to write the whole thing. Although you can copy assembly source from the kernel you're developing, the assembler is more or less compatible with the official disassembler.

- You have to learn how buffers are passed to the kernel. It's recommended to read through the whole Southern Islands ISA Manual.

- Don't afraid that this is windows only! If you have your kernel running, you can reuse it on Linux as well.

And please note, it's only a hobby project.

View solution in original post

0 Likes