Skip to content

Commit

Permalink
[DirectML] Fix pow_.
Browse files Browse the repository at this point in the history
  • Loading branch information
lshqqytiger committed Apr 17, 2024
1 parent 2a61ecc commit c113734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/dml/hijack/torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ def lerp(*args, **kwargs) -> torch.Tensor:
_pow_ = torch.Tensor.pow_
def pow_(self: torch.Tensor, *args, **kwargs):
if self.dtype == torch.float64:
return _pow_(self.cpu(), *args, **kwargs)
return _pow_(self.cpu(), *args, **kwargs).to(self.device)
return _pow_(self, *args, **kwargs)
torch.Tensor.pow_ = _pow_

0 comments on commit c113734

Please sign in to comment.