Skip to content
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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ajbrent
Copy link
Contributor

@ajbrent ajbrent commented Jun 15, 2024

Fixes #128370.
Fixes #128257.

Added fp8 support for item with cuda, index_select, and fill_ with cpu.

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10

@ajbrent ajbrent requested a review from eqy as a code owner June 15, 2024 22:48
Copy link

pytorch-bot bot commented Jun 15, 2024

🔗 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 (image):

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.

@pytorch-bot pytorch-bot bot added the module: cpu CPU specific problem (e.g., perf, algorithm) label Jun 15, 2024
@mikaylagawarecki mikaylagawarecki added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jun 17, 2024
@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not.

@@ -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,
Copy link
Contributor

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

@vkuzo
Copy link
Contributor

vkuzo commented Jun 17, 2024

looks great, thanks! Just had one question inline on whether the fill code changes are still needed.

@eqy eqy added ciflow/trunk Trigger trunk jobs on your pull request ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR labels Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR ciflow/trunk Trigger trunk jobs on your pull request module: cpu CPU specific problem (e.g., perf, algorithm) open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
5 participants