-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Fp8 support for item() with cuda, index_select, and fill_ with cpu #128780
base: main
Are you sure you want to change the base?
Conversation
…cpu), and fill_out.
…nto float8-support
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/128780
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (4 Unrelated Failures)As of commit 82f63cf with merge base e3a39d4 (): FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@@ -60,7 +60,7 @@ void fill_kernel(TensorIterator& iter, const Scalar& value_scalar) { | |||
[=]() -> scalar_t { return value; }, | |||
[=]() { return Vectorized<scalar_t>(value); }); | |||
}), | |||
AT_EXPAND(AT_ALL_TYPES_AND_COMPLEX), kBool, AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES) | |||
AT_EXPAND(AT_ALL_TYPES_AND_COMPLEX), kBool, AT_EXPAND(AT_FLOAT8_TYPES), AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES) |
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.
is this still needed after https://github.com/pytorch/pytorch/pull/128744/files ?
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.
It is not.
test/test_torch.py
Outdated
@@ -3553,7 +3553,9 @@ def test_index_fill(self, device, dtype): | |||
# FIXME: move to test indexing | |||
# The test fails for zero-dimensional tensors on XLA | |||
@onlyNativeDeviceTypes | |||
@dtypes(*all_types_and_complex_and(torch.half, torch.bool, torch.bfloat16)) | |||
@dtypes(*all_types_and_complex_and(torch.half, torch.bool, torch.bfloat16, | |||
torch.float8_e4m3fn, torch.float8_e4m3fnuz, |
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.
optional nit: maybe save the float8 types in a list and unpack everywhere? will make it easier for future op support PRs to not forget to handle all of them
looks great, thanks! Just had one question inline on whether the fill code changes are still needed. |
Fixes #128370.
Fixes #128257.
Added fp8 support for item with cuda, index_select, and fill_ with cpu.
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10