jinchen

Results 23 comments of jinchen

checkpoint https://github.com/jinchen62/torch-mlir/tree/dtype_support https://github.com/jinchen62/llvm-project/tree/dtype_support added float8 types to the op def, it could generates `%78 = "llvm.fptrunc"(%76) : (vector) -> vector`, but it fails on https://github.com/llvm/llvm-project/blob/main/mlir/lib/Target/LLVMIR/TypeToLLVM.cpp#L79, and seems there is no...

@vivekkhandelwal1 It got lowered to torch.aten.max_unpool3d, so it could be lowered to linalg. I added the lit tests for both onnx->torch and torch->linalg. So basically there is no big difference...

@vivekkhandelwal1 Yes, 2D and 3D max_unpool can be generalized as one op.

@vivekkhandelwal1 For sure I could add a separate lowering for 2D, but that would be most of duplicate codes.

@vivekkhandelwal1 Using 3D lowering is also because torch.aten.max_unpool2d misses `pads` and `strides` inputs as mentioned here https://github.com/nod-ai/SHARK-ModelDev/issues/764#issuecomment-2258978758. I wonder why we don't pass more info through torch op even `kernel_shape`...

need to merge https://github.com/pytorch/pytorch/pull/138805

smaller repro: https://gist.github.com/jinchen62/91e216fb39abbb9ba4c0461346d2bb5a command: `iree-opt --pass-pipeline="builtin.module(util.func(iree-flow-fold-unit-extent-dims))" repro.mlir` or `iree-compile --iree-hal-target-backends=llvm-cpu repro.mlir -o test.vmfb --mlir-print-ir-after-all 2> dump.mlir`

I think it's > %237 = torch.aten.sum.dim_IntList %235, %236, %true, %none : !torch.vtensor, !torch.list, !torch.bool, !torch.none -> !torch.vtensor

torch level repro: https://gist.github.com/jinchen62/601cfce290b81e037383fc49b604a68a `iree-compile --iree-input-demote-i64-to-i32 --iree-hal-target-backends=llvm-cpu --iree-util-zero-fill-elided-attrs repro_torch.mlir -o test.vmfb`

part of dump torch repro: After ExpandOps (memref-expand) -> After Canonicalizer (canonicalize) https://gist.github.com/jinchen62/ae856e42b0660d0b41426e910039fb9a @hanhanW I think with a `tensor.cast` op, the reduction op that you found weird should be good...