mirror of https://github.com/llvm/torch-mlir
4b1e87ce67
This commit provides dummy solution to support elmentwise operations (mul, add) with scalar argument. ( op(Tensor, Scalar) ) It replaces `torch.aten.add.Tensor` with `torch.aten.add.Scalar`. ``` Unexpected outcome summary: (torchdynamo) ****** Unexpectedly Passed tests - 22 tests XPASS - "AddCDivModule_basic" XPASS - "BatchNorm1DModule_basic" XPASS - "BatchNorm1DStaticShapeModule_basic" XPASS - "BatchNorm1DWith2DInputModule_basic" XPASS - "BatchNorm2DModule_basic" XPASS - "BatchNorm3DModule_basic" XPASS - "ElementwiseAddScalarInt64Module_basic" XPASS - "ElementwiseAddScalarIntModule_basic" XPASS - "ElementwiseMulScalarModule_basic" XPASS - "ElementwiseMulScalarModule_float" XPASS - "ElementwiseMulScalarModule_int" XPASS - "GroupNormModule_basic" XPASS - "GroupNormNoWeightAndBiasModule_basic" XPASS - "MobilenetV3Module_basic" XPASS - "NativeBatchNorm1DModule_basic" XPASS - "NativeBatchNorm2DModule_basic" XPASS - "NativeBatchNorm3DModule_basic" XPASS - "NativeBatchNormNoneWeightModule_basic" XPASS - "NativeGroupNormBackwardModule_basic" XPASS - "NativeGroupNormModule_basic" XPASS - "ResNet18Module_basic" XPASS - "ResNet18StaticModule_basic" ``` And segfault for test "ElementwiseAddScalar_TensorLiteralInt32_Module_basic". Somehow this change doesn't allow to use Tensors, that are not forward arguments, but local variables of model. e.g. `self.x = torch.tensor(..)` See also: #2745 Signed-off-by: Dmitrii Makarenko <dmitrii.makarenko@intel.com> |
||
---|---|---|
.. | ||
jit_ir_common | ||
ltc | ||
onnx_c_importer | ||
pt1 | ||
CMakeLists.txt |