Skip to content

Commit

Permalink
Rename format_cast function name.
Browse files Browse the repository at this point in the history
  • Loading branch information
pdx1989 committed Jan 17, 2024
1 parent 016198a commit 6e71ed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dipu/torch_dipu/dipu/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def wrap(x):
return tree_map(wrap, out)


def format_cast(tensor:torch.Tensor, format:_C.NativeMemoryFormat) -> torch.Tensor:
def ascend_format_cast(tensor:torch.Tensor, format:_C.NativeMemoryFormat) -> torch.Tensor:
if isinstance(tensor, torch.Tensor) and 'FRACTAL_NZ' in str(format):
return AscendFormatTensor(torch_dipu.native_memory_format_cast(tensor, format))
if isinstance(tensor, AscendFormatTensor) and not 'FRACTAL_NZ' in str(format):
Expand Down

0 comments on commit 6e71ed4

Please sign in to comment.