From 7e57c5c7d3768eff47842eff4f9413936cefe984 Mon Sep 17 00:00:00 2001 From: Ean Garvey <87458719+monorimet@users.noreply.github.com> Date: Fri, 20 Oct 2023 00:00:09 -0500 Subject: [PATCH 1/2] Add a few decompositions for aten ops seen in huggingface models. --- python/shark_turbine/dynamo/passes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/shark_turbine/dynamo/passes.py b/python/shark_turbine/dynamo/passes.py index 3671e550f..f1dc2d787 100644 --- a/python/shark_turbine/dynamo/passes.py +++ b/python/shark_turbine/dynamo/passes.py @@ -22,6 +22,8 @@ torch.ops.aten.addmm, # decompositions that aid us in handling nn.BatchNorm2d torch.ops.aten._native_batch_norm_legit_functional, + torch.ops.aten._native_batch_norm_legit_no_train, + torch.ops.aten._native_batch_norm_legit, torch.ops.aten._native_batch_norm_legit.no_stats, torch.ops.aten.squeeze.dims, # decompositions for miscellaneous ops that are not handled in torch-mlir but have available decompositions @@ -43,6 +45,7 @@ torch.ops.aten.nll_loss_backward, torch.ops.aten._to_copy, torch.ops.aten._log_softmax_backward_data, + torch.ops.aten.lift_fresh_copy.default, ] From b7eddb4aa604fac14e8c36fdce37b32d4886335e Mon Sep 17 00:00:00 2001 From: Ean Garvey <87458719+monorimet@users.noreply.github.com> Date: Fri, 20 Oct 2023 00:08:01 -0500 Subject: [PATCH 2/2] Fix op name. --- python/shark_turbine/dynamo/passes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/shark_turbine/dynamo/passes.py b/python/shark_turbine/dynamo/passes.py index f1dc2d787..1e8e2058f 100644 --- a/python/shark_turbine/dynamo/passes.py +++ b/python/shark_turbine/dynamo/passes.py @@ -22,7 +22,7 @@ torch.ops.aten.addmm, # decompositions that aid us in handling nn.BatchNorm2d torch.ops.aten._native_batch_norm_legit_functional, - torch.ops.aten._native_batch_norm_legit_no_train, + torch.ops.aten._native_batch_norm_legit_no_training, torch.ops.aten._native_batch_norm_legit, torch.ops.aten._native_batch_norm_legit.no_stats, torch.ops.aten.squeeze.dims,