Skip to content

Commit

Permalink
Change commitAndWait to Commit in View Ops (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
razarmehr authored Jul 21, 2022
1 parent e68dcc5 commit 9319b02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aten/src/ATen/mps/MPSStream.mm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// typically in GPU to GPU copies we won't commit explicitly
break;
case SyncType::COMMIT:
commit(true);
flush();
break;
case SyncType::COMMIT_AND_WAIT:
commitAndWait();
Expand Down
4 changes: 2 additions & 2 deletions aten/src/ATen/native/mps/operations/View.mm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
cachedGraph->outputTensor : outputTensorData
};
stream->executeMPSGraph(cachedGraph->graph(), feeds, results,
requires_sync ? SyncType::COMMIT_AND_WAIT : SyncType::NONE);
requires_sync ? SyncType::COMMIT : SyncType::NONE);
}
return output;
}
Expand Down Expand Up @@ -240,7 +240,7 @@ Tensor gatherViewTensor(const at::Tensor& src, at::Tensor& dst)
{
ViewCachedGraph* cachedGraph = createViewGraph(output, output.sizes(), output.strides(),
output.storage_offset(), /*needsScatter*/ true);
return runViewGraph(cachedGraph, src, output, /*needsScatter*/ true);
return runViewGraph(cachedGraph, src, output, /*needsScatter*/ true, /*requires_sync*/ true);
}

} // namespace mps
Expand Down

0 comments on commit 9319b02

Please sign in to comment.