onnxruntime
c029e7f5 - test(tensorscatter): cover circular prefix preservation (#32264)

Commit
12 days ago
test(tensorscatter): cover circular prefix preservation (#32264) ### Description Adds a `TensorScatter` circular-mode regression test where the batch dimension exceeds the maximum sequence length. The case also wraps sequence writes from slot 3 to slot 0, verifying that modulo applies only to the sequence coordinate while every batch prefix remains unchanged. ### Motivation and Context onnx/onnx#8353 identified that applying modulo to every coordinate in the full index tuple can fold one batch into another. ONNX Runtime's CPU and CUDA kernels already preserve prefix coordinates, but the existing tests use prefix dimensions smaller than the maximum sequence length and cannot distinguish the incorrect behavior. This test makes the regression observable: with `batch_size=5` and `max_sequence_length=4`, a full-tuple modulo maps batch 4 to batch 0. Related: onnx/onnx#8353 ### Testing - `cmake --build build/cpu_only/Debug --target onnxruntime_provider_test --parallel` - `./onnxruntime_provider_test --gtest_filter=TensorScatterTest.Circular_BatchLargerThanMaxSequenceLength` - `./onnxruntime_provider_test --gtest_filter=TensorScatterTest.*` (23 passed) - `lintrunner onnxruntime/test/providers/cpu/llm/tensorscatter_op_test.cc` Signed-off-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Copilot-Session: 427bc0f4-eaf2-406e-95ad-b5b1af6ccdc6
Author
Parents
Loading