-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API] Extension of the prebuilt-API to load kernels from JAR files #505
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
...s/opencl/src/main/java/uk/ac/manchester/tornado/drivers/opencl/runtime/OCLTornadoDevice.java
Show resolved
Hide resolved
...drivers/ptx/src/main/java/uk/ac/manchester/tornado/drivers/ptx/runtime/PTXTornadoDevice.java
Show resolved
Hide resolved
@jjfumero is it possible to add a small test case that uses this API extension? |
Yes, I think it is possible. I will take a look |
tornado-api/src/main/java/uk/ac/manchester/tornado/api/TaskGraphInterface.java
Outdated
Show resolved
Hide resolved
@@ -70,4 +71,12 @@ public boolean isPrebuiltTask() { | |||
public int[] getAtomics() { | |||
return atomics; | |||
} | |||
|
|||
public void withClass(Class<?> klass) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have been withKlass
, right?
this.klass = klass; | ||
} | ||
|
||
public Class<?> getClassJar() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this getKlass
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Java, there is a method called getClass
, so to avoid miss-understanding about the functionality of each, I named it ClassJar
public Class<?> getClassJAR() { | ||
return klass; | ||
} | ||
|
||
public void withKlassJAR(Class<?> classJar) { | ||
this.klass = classJar; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about the classJar
and getClassJAR
, withKlassJAR
names. To my understanding you pass the name of the class file (e.g. MyKlass.class
) and not the jar, right? it is assumed that the jar must be in the class file.
Is this correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We pass any class that appears in the JAR file that we want to load
…phInterface.java Co-authored-by: Thanos Stratikopoulos <34061419+stratika@users.noreply.github.com>
Test provided: tornado-test -V uk.ac.manchester.tornado.unittests.prebuilt.PrebuiltTest#testPrebuiltWithJar Works for OpenCL and PTX. I am checking for SPIR-V. |
I reverted this PR to draft again. Since this is very specific to the AERO project, we might only added it in the AERO GitHub space. |
Description
Extension of the prebuilt API to be able to load prebuilt kernels stored in JAR files.
Example:
This API access is required by GAIA for the project AERO.
Problem description
n/ a.
Backend/s tested
Mark the backends affected by this PR.
OS tested
Mark the OS where this PR is tested.
Did you check on FPGAs?
If it is applicable, check your changes on FPGAs.
How to test the new patch?
This has been tested in the GAIA repo with the following commnad: