Merge pull request #233 from sfinktah/sfink-flash-attn-gfx-startswith

This will allow much better support for gfx1032 and other things not …
This commit is contained in:
patientx 2025-07-28 23:12:38 +03:00 committed by GitHub
commit fc4e82537c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -269,12 +269,8 @@ def get_input_shapes():
def is_hip():
return triton.runtime.driver.active.get_current_target().backend == "hip"
def is_cdna():
return is_hip() and triton.runtime.driver.active.get_current_target().arch in ('gfx940', 'gfx941', 'gfx942',
'gfx90a', 'gfx908')
return is_hip() and triton.runtime.driver.active.get_current_target().arch.startswith('gfx9')
def is_rdna():
return is_hip() and triton.runtime.driver.active.get_current_target().arch in ("gfx1030", "gfx1031", "gfx1035", "gfx1100", "gfx1101",
"gfx1102", "gfx1103", "gfx1150", "gfx1200", "gfx1201")
return is_hip() and triton.runtime.driver.active.get_current_target().arch.startswith("gfx1")