Skip to content

Conversation

@kunaltyagi
Copy link
Contributor

No description provided.

@okakarpa okakarpa requested a review from Copilot July 7, 2025 17:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the get_dtype_fp8 helper to safely handle unknown hardware IDs by providing a fallback data type instead of raising a KeyError.

  • Use dict.get with an inline fallback for fp8 when get_gfx() isn’t in defaultDtypes
  • Default unknown hardware’s FP8 dtype to torch.uint8
Comments suppressed due to low confidence (1)

aiter/utility/dtypes.py:14

  • Consider adding a unit test to cover the fallback path when get_gfx() returns an unknown key, ensuring get_dtype_fp8() correctly returns torch.uint8.
    return defaultDtypes.get(get_gfx(), {"fp8": torch.uint8})["fp8"]

@kunaltyagi kunaltyagi requested a review from valarLip July 8, 2025 07:00
@valarLip
Copy link
Collaborator

valarLip commented Jul 8, 2025

looks like CI have some issue...

@kunaltyagi
Copy link
Contributor Author

can someone re-trigger the CI?

@valarLip valarLip merged commit 9aa4cbb into ROCm:main Jul 13, 2025
10 checks passed
cagrikymk pushed a commit that referenced this pull request Jul 30, 2025
* Update dependencies and add backup for unknown hw

* use a variable for f8 fallback dtype

* rename as requested

---------

Co-authored-by: valarLip <103567126+valarLip@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants