mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
Add devices.has_triton() and enable NNCF compile if triton is available
This commit is contained in:
@@ -58,6 +58,14 @@ def has_zluda() -> bool:
|
||||
return False
|
||||
|
||||
|
||||
def has_triton() -> bool:
|
||||
try:
|
||||
from torch.utils._triton import has_triton as torch_has_triton
|
||||
return torch_has_triton()
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
def get_backend(shared_cmd_opts):
|
||||
global args # pylint: disable=global-statement
|
||||
args = shared_cmd_opts
|
||||
|
||||
+1
-1
@@ -550,7 +550,7 @@ options_templates.update(options_section(('quantization', "Quantization Settings
|
||||
"nncf_quantize_mode": OptionInfo("INT8", "OpenVINO activations mode", gr.Dropdown, {"choices": ['INT8', 'FP8_E4M3', 'FP8_E5M2'], "visible": cmd_opts.use_openvino}),
|
||||
"nncf_quantize_conv_layers": OptionInfo(False, "Quantize the convolutional layers", gr.Checkbox, {"visible": native}),
|
||||
"nncf_decompress_fp32": OptionInfo(False, "Decompress using full precision", gr.Checkbox, {"visible": native}),
|
||||
"nncf_decompress_compile": OptionInfo(False, "Decompress using torch.compile", gr.Checkbox, {"visible": native}),
|
||||
"nncf_decompress_compile": OptionInfo(devices.has_triton(), "Decompress using torch.compile", gr.Checkbox, {"visible": native}),
|
||||
"nncf_quantize_shuffle_weights": OptionInfo(False, "Shuffle weights in post mode", gr.Checkbox, {"visible": native}),
|
||||
|
||||
"layerwise_quantization_sep": OptionInfo("<h2>Layerwise Casting</h2>", "", gr.HTML),
|
||||
|
||||
Reference in New Issue
Block a user