Skip to content

Commit

Permalink
auto format by CI
Browse files Browse the repository at this point in the history
  • Loading branch information
oneflow-ci-bot committed Aug 21, 2024
1 parent ef51753 commit ec74377
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/oneflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,12 +509,16 @@ def atexit_hook(hook):
oneflow_internal_path = oneflow._oneflow_internal.__file__
oneflow._oneflow_internal.ir.load_jit_shared_lib(oneflow_internal_path)


def flow_ones(self, *args, **kwargs):
return ones(*args, **kwargs, device=self.device, dtype=self.dtype)


Tensor.new_ones = flow_ones


def flow_zeros(self, *args, **kwargs):
return zeros(*args, **kwargs, device=self.device, dtype=self.dtype)


Tensor.new = flow_zeros

0 comments on commit ec74377

Please sign in to comment.