-
Notifications
You must be signed in to change notification settings - Fork 22.8k
metal: threadgroup-memory alignment and expert-index width fixes #27944
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -435,7 +435,7 @@ kernel void kernel_mul_mm_id( | |
| device char * dst, | ||
| threadgroup char * shmem [[threadgroup(0)]], | ||
| uint3 tgpig[[threadgroup_position_in_grid]], | ||
| ushort tiitg[[thread_index_in_threadgroup]], | ||
| uint tiitg[[thread_index_in_threadgroup]], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change does not seem necessary, so for now not merging it. That is unless the AI can demonstrate an issue with it that I am not seeing. |
||
| ushort tiisg[[thread_index_in_simdgroup]], | ||
| ushort sgitg[[simdgroup_index_in_threadgroup]]) { | ||
| threadgroup S0 * sa = (threadgroup S0 *)(shmem); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9359,6 +9359,7 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() { | |
| // test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F16, 512, 262144, 9216, {1, 1}, {1, 1})); | ||
|
|
||
| // test large experts*tokens | ||
| test_cases.emplace_back(new test_mul_mat_id(GGML_TYPE_F16, GGML_TYPE_F32, 512, 10, false, 64, 512, 64)); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tarruda Thanks. And are you sure this test fails on
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replied here Seems like it requires some validation to be enabled for it to be detected on master |
||
| for (bool b : {false, true}) { | ||
| test_cases.emplace_back(new test_mul_mat_id(GGML_TYPE_F16, GGML_TYPE_F32, 16, 16, b, 32, 1024, 16)); | ||
| test_cases.emplace_back(new test_mul_mat_id(GGML_TYPE_F16, GGML_TYPE_F32, 2, 2, b, 32, 8192, 64)); | ||
|
|
||
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.
I have extracted this change into: #27951