Skip to content

Commit

Permalink
tensor add storage method
Browse files Browse the repository at this point in the history
  • Loading branch information
Ldpe2G committed Aug 8, 2023
1 parent b664acc commit 3e63f9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/oneflow/framework/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@ def _conj(self):
def _conj_physical(self):
return flow._C.conj_physical(self)

def _storage(self):
return self

@property
def _layout(self):
Expand Down Expand Up @@ -610,6 +612,7 @@ def RegisterMethods():
Tensor.conj = _conj
Tensor.conj_physical = _conj_physical
Tensor.layout = _layout
Tensor.storage = _storage


def register_tensor_op(op_name):
Expand Down

0 comments on commit 3e63f9d

Please sign in to comment.