You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by andrii0lomakin July 2, 2024
Hi guys.
I have tried very simple test case:
public static void main(String[] args) {
var taskGraph = new TaskGraph("SimpleGraph");
var input = new FloatArray(10);
for (int i = 0; i < 10; i++) {
input.set(i, i + 1);
}
var output = new FloatArray(10);
for (int i = 0; i < 10; i++) {
output.set(i, 1.1f);
}
taskGraph.transferToDevice(DataTransferMode.EVERY_EXECUTION, input);
taskGraph.task("copyVectorForBroadcast", (in, out) ->
TvmVectorOperations.copyVector(in, 0, out, 0, 10),
input, output);
// taskGraph.transferToHost(DataTransferMode.EVERY_EXECUTION, output);
ImmutableTaskGraph immutableTaskGraph = taskGraph.snapshot();
// Create an execution plan from an immutable task-graph
try (TornadoExecutionPlan executionPlan = new TornadoExecutionPlan(immutableTaskGraph)) {
// Run the execution plan on the default device
var result = executionPlan.execute();
result.transferToHost(output);
System.out.println("Execution completed " + Arrays.toString(output.toHeapArray()));
} catch (TornadoExecutionPlanException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
If I uncomment transferToHost line in execution graph everything works as expected.
But should not it work even without this line because I call transferToHost in execution result ?
The text was updated successfully, but these errors were encountered:
Discussed in #476
Originally posted by andrii0lomakin July 2, 2024
Hi guys.
I have tried very simple test case:
If I uncomment transferToHost line in execution graph everything works as expected.
But should not it work even without this line because I call transferToHost in execution result ?
The text was updated successfully, but these errors were encountered: