cchung100m opened a new pull request, #19588: URL: https://github.com/apache/tvm/pull/19588
Hi Committers, This PR fixes https://github.com/apache/tvm/issues/19575. ### Root Cause `ReorderPermuteDimsAfterConcat` reads `concat` axis and uses it as an index into the permutation axes. When `concat(axis=-1)` is used, the negative axis was converted directly to `size_t` before indexing, which can produce an out-of-range index and crash (e.g. `IndexError: Index -1 out of bounds 4`). ### Solution In `src/relax/transform/reorder_permute_dims_after_concat.cc`: 1. Read concat axis as signed integer first. 2. Normalize negative axis with `axis += ndim`. 3. Add explicit range checks after normalization. 4. Use the normalized axis for permutation-axis remapping This keeps behavior unchanged for non-negative axes and only fixes negative-axis handling. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
