-
Notifications
You must be signed in to change notification settings - Fork 139
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
CK Tile Gemm API and heuristics changes #1809
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good start!
else if(a_layout == "C" && b_layout == "C") | ||
{ | ||
return run_gemm_example_with_layouts(argc, argv, Col{}, Col{}, Row{}); | ||
} | ||
else if(a_layout == "C" && b_layout == "R") | ||
{ | ||
return run_gemm_example_with_layouts(argc, argv, Col{}, Row{}, Row{}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CCR and CRR don't work with the same tiles as RRR and RCR do, but with they seem to work with some other tile shapes, I am not sure if that's the desired behavior or if something is broken inside of them
bool is_a_rowmajor; | ||
bool is_b_rowmajor; | ||
bool is_c_rowmajor; | ||
std::string data_type; /** Tensors datatype, can be set to either fp16 or bf16*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fp8
should also be supported.
@@ -2,6 +2,29 @@ | |||
// Copyright (c) 2024, Advanced Micro Devices, Inc. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update copyright year.
return gemm_<gemm_traits_<FP16, | ||
FP16, | ||
FP32, | ||
FP16, | ||
Row, | ||
Row, | ||
Row, | ||
256, | ||
256, | ||
32, | ||
2, | ||
2, | ||
1, | ||
32, | ||
32, | ||
16, | ||
false, | ||
false, | ||
false>>(a, s); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please turn off clang format also here. It would be beneficial to have //
comment, as we used to have in old ck instances, describing what specific value referes to.
Proposed changes
Add api for CK TILE Gemm similar to FMHA's one and add instances
Checklist
Please put an
x
into the boxes that apply. You can also fill these out after creating the PR. If you're not sure, please don't hesitate to ask.clang-format
on all changed filesDiscussion
Add api for CK Tile universal gemm and some instances for fp16 and bf16 cases. I'm not sure how the heuristic of choosing between comp and mem instances should be made so for now it is trivial and will be upgraded in the near future