Skip to content

add direct converter for aten.repeat instead of decompo… - #4483

Open
apbose wants to merge 1 commit into
mainfrom
abose/repeat_decomposition_to_converter
Open

add direct converter for aten.repeat instead of decompo…#4483
apbose wants to merge 1 commit into
mainfrom
abose/repeat_decomposition_to_converter

Conversation

@apbose

@apbose apbose commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Addresses #3712 and #3974

@meta-cla meta-cla Bot added the cla signed label Aug 13, 2026
@github-actions github-actions Bot added component: tests Issues re: Tests component: lowering Issues re: The lowering / preprocessing passes component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Aug 13, 2026
@github-actions
github-actions Bot requested a review from zewenli98 August 13, 2026 18:32
…sing it

aten.repeat was decomposed via Torch's core decomposition into
unsqueeze -> expand -> reshape, which doubles the tensor rank to 2N.
TensorRT tensors support at most 8 dims, so this broke for any input
of rank >= 5 with a confusing pybind TypeError deep in prepend_ones.

Move aten.repeat to torch_disabled_decompositions and register a
converter that reuses the existing aten.tile implementation (impl.slice.tile),
which builds the output directly at its native rank via a WRAP-mode
ISliceLayer, along with a capability_validator that falls back to
PyTorch for the genuine >8-rank case instead of crashing.

Fixes #3172
@apbose
apbose force-pushed the abose/repeat_decomposition_to_converter branch from ffb1c6f to 0ab6d9f Compare August 13, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: lowering Issues re: The lowering / preprocessing passes component: tests Issues re: Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant