onnxruntime
3b8482c0 - Added a dimension check in `MatMulComputeHelper` to ensure the inner dimension `K_` (#28053)

Commit
29 days ago
Added a dimension check in `MatMulComputeHelper` to ensure the inner dimension `K_` (#28053) This pull request improves the handling and testing of 1D vector dot products in the MatMul implementation. It adds stricter validation for the K dimension in 1D vector cases and introduces new regression tests to ensure correct behavior for both valid and invalid input shapes. **Validation Enhancement:** * Added a check in `MatMulComputeHelper` to ensure that when both inputs are 1D vectors, their K dimensions match, and to provide a clear error message if they do not. **Testing Improvements:** * Added new tests in `matmul_integer_test.cc` to verify: - Correct computation for 1D vector dot products with matching K dimensions, for both `uint8_t` and `int8_t` types. - Proper failure and error messaging when 1D vectors with mismatched K dimensions are provided, for both `uint8_t` and `int8_t` types.
Author
Parents
Loading