Support OCP MXFP4 quantization on AMD GPUs (#8255)
Co-authored-by: wunhuang <wunhuang@amd.com> Co-authored-by: Hubert Lu <Hubert.Lu@amd.com>
This commit is contained in:
@@ -2832,6 +2832,17 @@ def parse_module_path(module_path, function_name, create_dummy):
|
||||
return final_module, None
|
||||
|
||||
|
||||
def mxfp_supported():
|
||||
"""
|
||||
Returns whether the current platform supports MX types.
|
||||
"""
|
||||
if torch.version.hip:
|
||||
gcn_arch = torch.cuda.get_device_properties(0).gcnArchName
|
||||
return any(gfx in gcn_arch for gfx in ["gfx95"])
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
# LoRA-related constants and utilities
|
||||
SUPPORTED_LORA_TARGET_MODULES = [
|
||||
"q_proj",
|
||||
|
||||
Reference in New Issue
Block a user