torch-mlir/frontends/pytorch/docs/compatibility.md

1.6 KiB

Compatibility notes

This document contains known compatibility issues with the PyTorch integration. Some items may be permanent limitations and other may just be capturing plans for future work. In general, this only applies to the default configuration, not the "type dispatch" (PyTorch 1.4) integration.

Pending Work Needed

Unpacking quantized weights

Some of the torch::jit::Operator 's (especially the quantized:: ones) have already gone through some lowering steps. Specifically, the quantized::conv operators are pre-packed and stored as ConvPackedParam attributes on the Module instead of just passing the weight/bias tensors as SSA arguments to the Operator0 1. How they are packed depends on whether the fbgemm or the XNNPACK backends are used...

I think this comes back to the ability to pass a "CustomClass" as an SSA Value into an Operator, which may be difficult for us to lower to TCF... Glow (and others) get around this by adding custom passes to convert the PackedParams to a traditional glow::unpacked_quantized_conv operation 2, but that adds some layers of lowering in TorchScript land before we would want to call off to get_registered_ops on the python side (may not be avoidable?)