You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by GitBox <gi...@apache.org> on 2026/08/30 10:52:56 UTC
[GH] (tvm/fix/relax-torch-einsum-diagonal): Workflow run "Lint" failed!
The GitHub Actions job "Lint" on tvm.git/fix/relax-torch-einsum-diagonal has failed.
Run started by GitHub user siyiweigeHEW (triggered by siyiweigeHEW).
Head commit for run:
4e8fb28947569f9d70f9c45ef4e64102162c30c0 / HuEnwei <hu...@tju.edu.cn>
[Relax][Frontend][Torch] Support aten.diagonal from decomposed repeated-subscript einsum
from_exported_program runs run_decompositions() by default, which lowers
torch.einsum with repeated subscripts (diagonal / trace, e.g. "ii->i",
"ii->", "...ii->...i") to aten.diagonal + permute (+ sum). The torch
frontend had no handler for aten.diagonal.default, so every such valid
model failed with `AssertionError: Unsupported function types
['diagonal.default']`. The same root cause blocked torch.diagonal /
torch.trace.
Add BaseFXGraphImporter._diagonal lowering diagonal(x, offset, dim1, dim2)
as permute_dims (move dim1/dim2 to trailing axes) -> two strided_slice
(crop each trailing axis to the diagonal length, offset-adjusted) ->
relax.op.einsum("...zz->...z"). Handles static and dynamic (symbolic)
shapes, positive/negative offsets, and arbitrary dim1/dim2 (incl. negative
indices). Register "diagonal.default" in the exported-program convert_map
and "diagonal" in the from_fx convert_map.
Fixes: #20228
Report URL: https://github.com/apache/tvm/actions/runs/33307518925
With regards,
GitHub Actions via GitBox
---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org