-
Notifications
You must be signed in to change notification settings - Fork 113
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 Refactoring and Documentation #455
Conversation
* Perform dynamic reconfiguration based on best end-to-end runtime, including compilation, | ||
* data transfers and execution. In this mode, the TornadoVM runtime will compile and | ||
* run the whole application for every reachable accelerator. In this mode, there is no | ||
* warm-up. The dynamic reconfiguration switches device best on the lowest end-to-end runtime. |
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.
Please rephrase the last sentence.
* The dynamic reconfiguration switches device best of highest-performance | ||
* (lowest end-to-end runtime). |
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.
Please rephrase this sentence.
tornado-api/src/main/java/uk/ac/manchester/tornado/api/Policy.java
Outdated
Show resolved
Hide resolved
tornado-api/src/main/java/uk/ac/manchester/tornado/api/Policy.java
Outdated
Show resolved
Hide resolved
tornado-api/src/main/java/uk/ac/manchester/tornado/api/TornadoBackend.java
Outdated
Show resolved
Hide resolved
tornado-api/src/main/java/uk/ac/manchester/tornado/api/TornadoBackend.java
Show resolved
Hide resolved
* could be 1D, 2D or 3D. | ||
* | ||
* @return int | ||
*/ | ||
int dimension(); |
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.
Shall we refactor this method to numOfDimensions
?
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 think dimension
is ok for now. The usage is something like:
WorkerGrid worker = new WorkerGrid2D();
int val = worker.dimension();
This looks clean to me without loosing any meaning.
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.
to me the dimension
could be that you query if you have a 3 dimensional array to get one specific dimension (0, 1, 2). But that's fine for now, and in the java doc it is clear.
tornado-unittests/src/main/java/uk/ac/manchester/tornado/unittests/runtime/TestRuntimeAPI.java
Show resolved
Hide resolved
public class TestRuntimeAPI extends TornadoTestBase { | ||
|
||
@Test | ||
public void test01() { | ||
|
||
TornadoRuntime runtimeInterface = TornadoRuntimeProvider.getTornadoRuntime(); | ||
|
||
runtimeInterface.getBackend(0).getNumDevices(); | ||
} | ||
} |
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.
shall we add this test in unit-tests?
…java Co-authored-by: Thanos Stratikopoulos <34061419+stratika@users.noreply.github.com>
…java Co-authored-by: Thanos Stratikopoulos <34061419+stratika@users.noreply.github.com>
…Backend.java Co-authored-by: Thanos Stratikopoulos <34061419+stratika@users.noreply.github.com>
Thanks @stratika . All changes done. |
Perfect! LGTM, let's merge first #456 in order to try this PR also with Ray-Tracer, before merging with |
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
Description
API Refactoring (no need for loaders of the Device specific implementations) and documentation for the Backend API.
Major list of changes:
TornadoBackend
,Policy
,WorkerGrid
TornadoRuntime
toTornadoRuntimeProvider
TornadoRuntimeInterface
toTornadoRuntime
TornadoSettingsInterface
toTornadoSettings
Problem description
If the patch provides a fix for a bug, please describe what was the issue and how to reproduce the issue.
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?