Skip to content

Add LSX support for S8S8 and S8U8 GEMM kernels #24397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wszqkzqk
Copy link

@wszqkzqk wszqkzqk commented Apr 11, 2025

Description

  • Add missing support for S8S8/S8U8 in GEMM kernels of LSX
  • Add new dispatch entries for S8S8 and S8U8 GEMM operations in mlasi.h
  • Extend MLAS_PLATFORM struct to include S8S8 and S8U8 dispatch pointers for LSX

Motivation and Context

To fix build error on loong64:

error: ‘struct MLAS_PLATFORM’ has no member named ‘GemmS8S8Dispatch’

Test status

Tested on Arch Linux for Loong64, here is the build log:

@wszqkzqk wszqkzqk requested a review from a team as a code owner April 11, 2025 16:05
wszqkzqk added a commit to lcpu-club/loongarch-packages that referenced this pull request Apr 11, 2025
* I've added S8S8 and S8U8 support for LSX and send it upstream
* See microsoft/onnxruntime#24397
* So back port this patch and remove the previous workaround now

Signed-off-by: Zhou Qiankang <[email protected]>
@wszqkzqk
Copy link
Author

/cc @junchao-loongson

- Add LSX support for S8S8/S8U8 to fix build on loong64:
  ```
  error: struct MLAS_PLATFORM’ has no member named ‘GemmS8S8Dispatch
  ```
- Add new dispatch entries for S8S8 and S8U8 GEMM operations in mlasi.h
- Extend MLAS_PLATFORM struct to include S8S8 and S8U8 dispatch pointers
- Add GemmS8S8Dispatch/GemmS8U8Dispatch to qgemm.h's AIsSigned paths

Signed-off-by: Zhou Qiankang <[email protected]>
@junchao-loongson
Copy link
Contributor

I tested this PR after applying pr24578

pr-24397-test-all.log

100% tests passed
LGTM @snnn

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.

3 participants