-
Notifications
You must be signed in to change notification settings - Fork 117
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
Refactor one of the core runtime classes - API new methods for adding Compilation Flags #539
Conversation
…actMetaData -> AbstractRTContext
if (meta instanceof TaskMetaData) { | ||
TaskMetaData metaData = (TaskMetaData) task.meta(); | ||
TaskContextInterface meta = task.meta(); | ||
if (meta instanceof TaskDataContext) { |
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 can be simplified to avoid type casting
/** | ||
* Default PTX Compiler Flags. | ||
*/ | ||
public static final String DEFAULT_PTX_COMPILER_FLAGS = getProperty("tornado.ptx.compiler.flags", ""); |
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.
are we sure that PTX does not require any flags that we can use by default?
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 did not detect we pass any flags to the PTX driver compiler.
@@ -571,38 +571,6 @@ public boolean useDefaultThreadScheduler() { | |||
return defaultScheduler; | |||
} | |||
|
|||
public void createImmutableExecutionContext(TornadoExecutionContext executionContext) { |
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.
Why we removed this?
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 method is never invoked.
LGTM, just a few comments |
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.
Thanks, it looks good to me. Shall we test if this option works also for the FPGAs? Have you tested it? is it supposed to overlap with the compiler flags for HLS in the configuration file?
tornado-api/src/main/java/uk/ac/manchester/tornado/api/TornadoExecutionPlan.java
Outdated
Show resolved
Hide resolved
tornado-api/src/main/java/uk/ac/manchester/tornado/api/TornadoExecutionPlan.java
Outdated
Show resolved
Hide resolved
tornado-api/src/main/java/uk/ac/manchester/tornado/api/TornadoExecutionPlan.java
Outdated
Show resolved
Hide resolved
tornado-api/src/main/java/uk/ac/manchester/tornado/api/TornadoExecutionPlan.java
Outdated
Show resolved
Hide resolved
…ExecutionPlan.java Co-authored-by: Thanos Stratikopoulos <34061419+stratika@users.noreply.github.com>
…ExecutionPlan.java Co-authored-by: Thanos Stratikopoulos <34061419+stratika@users.noreply.github.com>
…ExecutionPlan.java Co-authored-by: Thanos Stratikopoulos <34061419+stratika@users.noreply.github.com>
…ExecutionPlan.java Co-authored-by: Thanos Stratikopoulos <34061419+stratika@users.noreply.github.com>
I did not test on FPGAs. It does not overlap with the FPGA compilation option, but let's do some testing. |
I have just tried it in emulation mode, and it works. |
Great, I'll merge this PR. |
Improvements ~~~~~~~~~~~~~~~~~~ - beehive-lab#468: Cleanup Abstract Metadata Class. - beehive-lab#473: Add maven plugin to build TornadoVM source for the releases. - beehive-lab#474: Refactor `<X>TornadoDevice` to place common methods in the `TornadoXPUInterface`. - beehive-lab#482: Help messages improve when an out-of-memory exception is raised. - beehive-lab#484: Double-type for the trigonometric functions added in the `TornadoMath` class. - beehive-lab#487: Prebuilt API simplified. - beehive-lab#494: Add test to trigger unsupported features related to direct use of Memory Segments. - beehive-lab#509: Add a quick pass configuration to skip the heavy tests during active development. - beehive-lab#532: Improve thread scheduler to support RISC-V Accelerators from Codeplay. - beehive-lab#533: Support for scalar values to be passed via lambda expressions as tasks. - beehive-lab#538: `README` file updated. - beehive-lab#539: Refactor core classes and add new API methods to pass compilation flags to the low-level driver compilers (OpenCL, PTX and Level Zero). - beehive-lab#542: Tagged LevelZero JNI and Beehive Toolkit dependencies added in the build and installer. Compatibility ~~~~~~~~~~~~~~~~~~ - beehive-lab#465: Support for JDK 22 and GraalVM 24.0.2. - beehive-lab#486: Temurin for Windows added in the list of supported JDKs. - beehive-lab#525: Revert usage of String Templates in preparation for JDK 23. - beehive-lab#527: SPIR-V version parameter added. TornadoVM may run previous SPIR-V versions (e.g., ComputeAorta from Codeplay). - beehive-lab#513: LevelZero JNI Library updated to v0.1.4. Bug Fixes ~~~~~~~~~~~~~~~~~~ - beehive-lab#470: README documentation fixed. - beehive-lab#478: Fix the test names that are present in the white list. - beehive-lab#488: FP64 Kind for radian operations and the PTX backend fixed. - beehive-lab#493: Tests Whitelist for PTX backend fixed. - beehive-lab#502: Fix barrier type in the documentation regarding programmability of reductions. - beehive-lab#514: Installer script fixed. - beehive-lab#540: Fix issue with clean-up execution IDs function. - beehive-lab#541: Fix Data Accessors for the prebuilt API. - beehive-lab#543: Fix checkstyle condition and FP16 error message improved.
Improvements ~~~~~~~~~~~~~~~~~~ - beehive-lab#468: Cleanup Abstract Metadata Class. - beehive-lab#473: Add maven plugin to build TornadoVM source for the releases. - beehive-lab#474: Refactor `<X>TornadoDevice` to place common methods in the `TornadoXPUInterface`. - beehive-lab#482: Help messages improved when an out-of-memory exception is raised. - beehive-lab#484: Double-type for the trigonometric functions added in the `TornadoMath` class. - beehive-lab#487: Prebuilt API simplified. - beehive-lab#494: Add test to trigger unsupported features related to direct use of Memory Segments. - beehive-lab#509: Add a quick pass configuration to skip the heavy tests during active development. - beehive-lab#532: Improve thread scheduler to support RISC-V Accelerators from Codeplay. - beehive-lab#533: Support for scalar values to be passed via lambda expressions as tasks. - beehive-lab#538: `README` file updated. - beehive-lab#539: Refactor core classes and add new API methods to pass compilation flags to the low-level driver compilers (OpenCL, PTX and Level Zero). - beehive-lab#542: Tagged LevelZero JNI and Beehive Toolkit dependencies added in the build and installer. Compatibility ~~~~~~~~~~~~~~~~~~ - beehive-lab#465: Support for JDK 22 and GraalVM 24.0.2. - beehive-lab#486: Temurin for Windows added in the list of supported JDKs. - beehive-lab#525: Revert usage of String Templates in preparation for JDK 23. - beehive-lab#527: SPIR-V version parameter added. TornadoVM may run previous SPIR-V versions (e.g., ComputeAorta from Codeplay). - beehive-lab#513: LevelZero JNI Library updated to v0.1.4. Bug Fixes ~~~~~~~~~~~~~~~~~~ - beehive-lab#470: README documentation fixed. - beehive-lab#478: Fix the test names that are present in the white list. - beehive-lab#488: FP64 Kind for radian operations and the PTX backend fixed. - beehive-lab#493: Tests Whitelist for PTX backend fixed. - beehive-lab#502: Fix barrier type in the documentation regarding programmability of reductions. - beehive-lab#514: Installer script fixed. - beehive-lab#540: Fix issue with clean-up execution IDs function. - beehive-lab#541: Fix Data Accessors for the prebuilt API. - beehive-lab#543: Fix checkstyle condition and FP16 error message improved. minor change
Description
This PR refactors the old
AbstractMetaData
class and it adds a new method in theTornadoExecutionPlan
to select the compilation flags. This addition is due to the refactoring the of the aforementioned class.API Changes:
We can specify the flags we want per backend. This is by design, because the TornadoVM runtime can migrate execution from one device to another, and even from different backends.
Problem description
This PR removes old fields and old functionality no longer needed.
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?