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

Change GFX number checking for fp8 hw support #3634

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/targets/gpu/device_name.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ std::string get_device_name()
bool gfx_has_fp8fnuz_intrinsics()
{
const auto device_name = trim(split_string(get_device_name(), ':').front());
return (starts_with(device_name, "gfx9") and device_name >= "gfx940");
return (starts_with(device_name, "gfx94"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

How do you deal with MI100, MI2xx ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

They don't officially support fp8. They weren't going through with the previous condition anyways.

}

bool gfx_has_fp8ocp_intrinsics()
{
const auto device_name = trim(split_string(get_device_name(), ':').front());
return (starts_with(device_name, "gfx12") and device_name >= "gfx1200");
bool is_navi4x = starts_with(device_name, "gfx12") and device_name >= "gfx1200";
bool is_mi35x = starts_with(device_name, "gfx9") and device_name >= "gfx950";
Copy link
Collaborator

Choose a reason for hiding this comment

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

I get what you are trying to do here, just be mindful of future work. If there is ever a mi36x the next person wouldn't need to make a code change here since the gfx number "should" increase in number. Yet the variable being named mi35x would still cause someone to come look at the code and have to think about the intention. is_mi_fp8ocp may show intent with less head scratching for the next developer

return (is_navi4x or is_mi35x);
}

} // namespace gpu
Expand Down
Loading