Last active
April 13, 2023 00:15
-
-
Save AmosLewis/a0b9cd193a103301bb8168eadae9e0b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func.func @torch.aten.le.Tensor(%arg0: !torch.vtensor<[1,4,4],si64>, %arg1: !torch.vtensor<[1,4,1],si64>) -> !torch.vtensor<[1,4,4],i1>{ | |
%0 = torch.aten.le.Tensor %arg0, %arg1 : !torch.vtensor<[1,4,4],si64>, !torch.vtensor<[1,4,1],si64> -> !torch.vtensor<[1,4,4],i1> | |
return %0 : !torch.vtensor<[1,4,4],i1> | |
} |
Author
AmosLewis
commented
Apr 12, 2023
(mlir_venv) nod% torch-mlir-opt -convert-torch-to-tosa ./test_le_tensor.mlir
module {
func.func @torch.aten.le.Tensor(%arg0: !torch.vtensor<[1,4,4],si64>, %arg1: !torch.vtensor<[1,4,1],si64>) -> !torch.vtensor<[1,4,4],i1> {
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[1,4,4],si64> -> tensor<1x4x4xi64>
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[1,4,1],si64> -> tensor<1x4x1xi64>
%2 = "tosa.greater"(%0, %1) : (tensor<1x4x4xi64>, tensor<1x4x1xi64>) -> tensor<1x4x4xi1>
%3 = "tosa.logical_not"(%2) : (tensor<1x4x4xi1>) -> tensor<1x4x4xi1>
%4 = torch_c.from_builtin_tensor %3 : tensor<1x4x4xi1> -> !torch.vtensor<[1,4,4],i1>
return %4 : !torch.vtensor<[1,4,4],i1>
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment