Created
September 8, 2023 17:12
-
-
Save AmosLewis/9d55e5f89de1abd0c1491c8e90beadb9 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
#loc = loc(unknown) | |
module attributes {torch.debug_module_name = "EmbeddingBagDenseBackwardModule"} { | |
func.func @forward(%arg0: !torch.vtensor<[3,2],f32> loc(unknown), %arg1: !torch.vtensor<[3],si64> loc(unknown), %arg2: !torch.vtensor<[3],si64> loc(unknown), %arg3: !torch.vtensor<[1],si64> loc(unknown)) -> !torch.vtensor<[2,2],f32> { | |
%int2 = torch.constant.int 2 loc(#loc2) | |
%none = torch.constant.none loc(#loc2) | |
%int6 = torch.constant.int 6 loc(#loc2) | |
%true = torch.constant.bool true loc(#loc2) | |
%false = torch.constant.bool false loc(#loc2) | |
%0 = torch.prim.ListConstruct %int2, %int2 : (!torch.int, !torch.int) -> !torch.list<int> loc(#loc2) | |
%1 = torch.aten.zeros %0, %int6, %none, %none, %none : !torch.list<int>, !torch.int, !torch.none, !torch.none, !torch.none -> !torch.vtensor<[2,2],f32> loc(#loc2) | |
%2 = torch.prim.ListConstruct %arg1 : (!torch.vtensor<[3],si64>) -> !torch.list<vtensor> loc(#loc2) | |
%3 = torch.aten._index_put_impl %1, %2, %arg0, %true, %false: !torch.vtensor<[2,2],f32>, !torch.list<vtensor>, !torch.vtensor<[3,2],f32>, !torch.bool, !torch.bool -> !torch.vtensor<[2,2],f32> loc(#loc2) | |
return %3 : !torch.vtensor<[2,2],f32> loc(#loc) | |
} loc(#loc) | |
} loc(#loc) | |
#loc1 = loc("/home/nithin/torch-mlir/build-debug/tools/torch-mlir/python_packages/torch_mlir/torch_mlir_e2e_test/test_suite/backprop.py":324:15) | |
#loc2 = loc("aten::_embedding_bag_dense_backward"(#loc1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
torch-mlir-opt --convert-torch-to-linalg /nodclouddata/chi/src/models/t5/slicecopy/EmbeddingBagDenseBackwardsModule_indexput.mlir