Created
October 20, 2022 01:19
-
-
Save AmosLewis/e668c3bfd2472e9f9f045e012362d831 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.softmax.int$cst_dim(%arg0: !torch.vtensor<[2,3],f32>) -> !torch.vtensor<[2,3],f32> { | |
%none = torch.constant.none | |
%int1 = torch.constant.int 1 | |
%true = torch.constant.bool true | |
%values, %indices = torch.aten.max.dim %arg0, %int1, %true : !torch.vtensor<[2,3],f32>, !torch.int, !torch.bool -> !torch.vtensor<[2,1],f32>, !torch.vtensor<[2,1],si64> | |
%float1.000000e00 = torch.constant.float 1.000000e+00 | |
%0 = torch.aten.sub.Tensor %arg0, %values, %float1.000000e00 : !torch.vtensor<[2,3],f32>, !torch.vtensor<[2,1],f32>, !torch.float -> !torch.vtensor<[2,3],f32> | |
%1 = torch.aten.exp %0 : !torch.vtensor<[2,3],f32> -> !torch.vtensor<[2,3],f32> | |
%2 = torch.prim.ListConstruct %int1 : (!torch.int) -> !torch.list<int> | |
%true_0 = torch.constant.bool true | |
%none_1 = torch.constant.none | |
%3 = torch.aten.sum.dim_IntList %1, %2, %true_0, %none_1 : !torch.vtensor<[2,3],f32>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[2,1],f32> | |
%4 = torch.aten.div.Tensor %1, %3 : !torch.vtensor<[2,3],f32>, !torch.vtensor<[2,1],f32> -> !torch.vtensor<[2,3],f32> | |
%5 = torch.tensor_static_info_cast %4 : !torch.vtensor<[2,3],f32> to !torch.vtensor<[2,3],f32> | |
return %5 : !torch.vtensor<[2,3],f32> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is all all the ir when lowering