[Reland][CPU] Add ops for float8 linear#3100
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3100
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit e1cfca5 with merge base c7b8e13 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi @jcaip @jerryzh168 Could you please import this patch to check if the error is gone in your internal checks? Thanks. |
|
Hi @jerryzh168 Thanks for approving. Do you still need to import it? |
|
Thanks for fixing this @Xia-Weiwen! This is still failing some tests, I'm seeing: @jerryzh168 Long term I think we need to update our C++ linting to be as strict as whatever upstream dependencies we have, so we can find these issues earlier. |
|
Hi @jcaip Thanks for the feedback. I could not see the errors you saw, even not as warnings. I use the following environment to build Torchao:
I can only see the following warnings:
And these warnings are not from the files this PR adds. |
|
@Xia-Weiwen do you mind if i just push to your branch / give you a patch? I'll see if I can find out exactly why this is failing but in the meantime its prolly faster for me to just fix this myself. |
| TORCH_CHECK(weight.size(3) == block_n, "Float8 linear: unexpected weight shape"); | ||
| int64_t N = Nc * block_n; | ||
| TORCH_CHECK(K == Kc * block_k, "Float8 linear: weight and input shapes mismatch"); | ||
| auto [parallel_on_M, block_m, Mc, Mc_parallel] = get_m_blocking(M); |
There was a problem hiding this comment.
FYI I think:
bool parallel_on_M;
int64_t block_m, Mc, Mc_parallel;
std::tie(parallel_on_M, block_m, Mc, Mc_parallel) = get_m_blocking(M);
instead of this line fixes the error -testing internally now @Xia-Weiwen
There was a problem hiding this comment.
@jcaip Thanks. I have updated this part. If you find more issues, please feel free to update my branch directly. Thanks.
|
Hi @jcaip Could you please re-review this PR? Thanks. |
|
Hi @Xia-Weiwen Sorry, missed this earlier this week - will take a look today! |
jcaip
left a comment
There was a problem hiding this comment.
this passes tests, thanks for the fix @Xia-Weiwen!
|
@jcaip Thanks a lot |
|
#3175, let's revert this |
* [Reland][CPU] Add ops for float8 linear * Update torchao/csrc/cpu/aten_kernels/float8_linear.cpp
Revert "[Reland][CPU] Add ops for float8 linear (pytorch#3100)" This reverts commit 29f6758.
Reland #3052 which is reverted by 5cbbd73
Revert reason: compiler is complaining about
switch...caseof bool values.This PR fixes the issue by converting
switch...casetoif...else