MNagy
MNagy

Reputation: 433

In OpenCL, can one take an array containing GCN Assembly and execute it (JIT)?

I'm relatively new to OpenCL and was wondering about this. I'd heard that it was possible to JIT on some AMD gpus via OpenCL. Now, if this were to work syntactically as it does in c++, I would just write something like:

uint jitCode[MaxProgramSize];
ulong arguments[ArgumentsSize];

//fill jitCode with gcn bytecode, load up arguments

...

//Run the bytecode

void(*executeProgram)(ulong*);

executeProgram = (void(*)(ulong*)jitCode;

executeProgram(arguments);

Of course, something like that gives me error -11.

Can it be done, and if so what would be the proper way to do it?

...second followup if it can be done, what are the calling conventions like in OpenCL?

Upvotes: 1

Views: 54

Answers (0)

Related Questions