Skip to content

Conversation

@guan404ming
Copy link
Member

Related Issue

Why

  • When run_ep_decomposition=True is enabled, PyTorch decomposes pad operators into lower-level operations:
    • Constant mode → constant_pad_nd.default
    • Reflect/Replicate modes → index.Tensor with None indices
    • Circular mode → copy.default and slice operations
  • Some of the decomposed operators were not supported, causing failures

How

  • Added support for constant_pad_nd.default and copy.default operator
  • Fixed _index_tensor to handle None indices by:
    • Using take operation when only one dimension is indexed (optimization)
    • Converting None to explicit arange for general cases
  • Updated test_pad to use run_ep_decomposition=True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant