fix mix MatMul kernels fail with fp64 inputs due to accumulator type … - #2606
Conversation
tengqm
left a comment
There was a problem hiding this comment.
Thanks for the PR. Please amend the test cases for validation and performance benchmark.
|
As a side note ... I'm expecting some failure for this change on some chips because not all backends support FP64. Some test cases for this is really a must. |
I will add some FP64 test cases. Thanks for the suggestion. |
The choice between FP64 and FP32 is determined at compile time. FP32 is used by default, and FP64 is only enabled when explicitly specified. I will add some FP64 test cases, but I don't think it's necessary to test FP64 on hardware that doesn't support it. |
I can directly add FP64 support. FlagGems will determine whether the underlying hardware supports FP64 and decide whether to run FP64 tests accordingly. |
e9a02c2 to
8f71b20
Compare
Agreed. We will need to add |
8f71b20 to
0994c4f
Compare
|
fp64_is_supported only reflects the general FP64 capability of the device, but it does not guarantee support for all operators. In particular, tl.dot used in matrix multiplication has stricter constraints and may not support FP64 even when the device does. To address this, we have refined the test logic by adding more fine-grained skip conditions for mm-related operators, ensuring FP64 tests are only executed when fully supported. |
0994c4f to
d812771
Compare
Testing is only an approach to help validating that the software works. Passing tests doesn't necessarily mean that software won't break in production environments. We can have many A more defensive way to do this is to check if the logic is running on the targeted chip, without making assumptions about other backends. |
037e075 to
1421de1
Compare
23bdcaa to
635a742
Compare
1ff107d to
9b3136b
Compare
…nels" This reverts commit 635a742.
9b3136b to
7497555
Compare
PR Category
operator
Type of Change
Bug fix
Description
Fix fp64 type mismatch issue in matmul kernels by introducing a dtype-aware accumulator (via IS_FP64) to ensure type consistency during accumulation.
Issue
#2310
Progress
Performance