onnxruntime
454b3dd7 - Fix QLinearSoftmax output for empty inputs (#33401)

Commit
26 days ago
Fix QLinearSoftmax output for empty inputs (#33401) ### Description <!-- Describe your changes. --> Create the `QLinearSoftmax` output before returning early for an empty input, matching the existing CPU `Softmax` behavior. The nonempty computation is unchanged. Add CPU regression tests for int8/uint8, opsets 12/13, and zero-sized dimensions, with and without shape metadata and with constant or runtime quantization parameters. Tested on Windows x64 Release: - The two new tests fail before the fix and pass afterward. - All 18 lookup-table operator tests pass. - A broader Softmax run passes 52 tests; 7 CUDA/WebGPU tests are skipped in this CPU-only build. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Fixes #33262. For an empty input such as `[0, 2, 37]`, the kernel returned success without creating an output tensor. A downstream `DequantizeLinear` node then failed with `Missing Input`. Creating the output first preserves its shape and type while still skipping the arithmetic when there are no elements. Co-authored-by: David Luong <luongdavid@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f6d4277-d757-4418-9b0e-91c7c1fab8f6
Author
Parents
Loading