Skip to content

Commit

Permalink
Refactor blit copies and reuse scalar tensor's MPS storage in BinaryO…
Browse files Browse the repository at this point in the history
…ps (#52)

* Refactor blit copies and use commitAndContinue in commitAndWait()

* Remove commitAndContinue from commitAndWait()

* [MPS] Add commitAndContinue to non blocking blits. (#51)

* Merge commitAndContinue changes from mps_master

* Don't use getMPSGraphTensorFromScalar() if tensor is already on MPS device in Binary Ops
This improves performance by preventing copy from GPU to CPU and back to GPU again

Co-authored-by: Kulin Seth <kulin_seth@apple.com>
  • Loading branch information
2 people authored and DenisVieriu97 committed Jul 14, 2022
1 parent bd192c4 commit 65e542a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions aten/src/ATen/mps/MPSStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ typedef void* MTLDevice_t;
namespace at {
namespace mps {

#define USE_MPSCOMMANDBUFFER 1

//-----------------------------------------------------------------
// MPSStream
//-----------------------------------------------------------------
Expand Down

0 comments on commit 65e542a

Please sign in to comment.