MCPcopy Create free account
hub / github.com/pytorch/executorch / get_vulkan_quantizer

Function get_vulkan_quantizer

extension/llm/export/quantizer_lib.py:309–323  ·  view source on GitHub ↗
(pt2e_quantize: str)

Source from the content-addressed store, hash-verified

307
308
309def get_vulkan_quantizer(pt2e_quantize: str):
310 from executorch.backends.vulkan.quantizer.vulkan_quantizer import (
311 get_symmetric_quantization_config as get_symmetric_quantization_config_vulkan,
312 VulkanQuantizer,
313 )
314
315 if pt2e_quantize == "vulkan_8w":
316 config = get_symmetric_quantization_config_vulkan(
317 is_dynamic=False, weight_bits=8
318 )
319 else:
320 raise ValueError(f"Unsupported Vulkan quantizer specification {pt2e_quantize}")
321
322 quantizer = VulkanQuantizer().set_global(config)
323 return quantizer
324
325
326def get_tosa_quantizer(version: str, pt2e_quantize: str):

Callers 1

Calls 2

VulkanQuantizerClass · 0.90
set_globalMethod · 0.45

Tested by

no test coverage detected