Skip to content
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

[QST] Row major for int8 matrix multiplications? #1533

Open
ken012git opened this issue May 10, 2024 · 2 comments
Open

[QST] Row major for int8 matrix multiplications? #1533

ken012git opened this issue May 10, 2024 · 2 comments

Comments

@ken012git
Copy link

ken012git commented May 10, 2024

What is your question?
As I read the document and the examples, the configurations I found for int8 x int8=int8 matrix multiplication is either RowMajor x ColumnMajor = ColumnMajor (gemm_s8t_s8n_s8n) or RowMajor x ColumnMajor = RowMajor (gemm_s8t_s8n_s8t).

Is there any work around for the use case for RowMajor x RowMajor= RowMajor?
Suppose I have matrices shapes: [M K] x [K N] = [M N] and I hope not to perform transpose that involves memory copy.

  using ElementInputA = int8_t; // <- data type of elements in matrix A
  using ElementInputB = int8_t; // <- data type of elements in matrix B
  using ElementAccumulator = int32_t;
  using ElementOutput = int8_t;

  using LayoutInputA = cutlass::layout::RowMajor; //  A [M K]
  using LayoutInputB = cutlass::layout::RowMajor; //  B [K N]
  using LayoutOutput = cutlass::layout::RowMajor; // C [M N]
@IonThruster
Copy link
Collaborator

It's possible to do Row x Row - but not as performant, since we need to transpose in the fly. @hwu36

Copy link

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants