[Bugfix] Avoid repeated dummy initialization and random CPU Engram fills (#56682)

Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
This commit is contained in:
Woosuk Kwon
2026-09-13 02:23:20 -07:00
committed by GitHub
parent a987777755
commit e7a3963339
3 changed files with 14 additions and 2 deletions
@@ -1341,6 +1341,10 @@ def initialize_single_dummy_weight(
if param.device.type == "meta":
return # deferred to finalize_layerwise_processing (e.g. online quant)
if (dummy_weight_value := getattr(param, "dummy_weight_value", None)) is not None:
param.fill_(dummy_weight_value)
return
if not torch.is_floating_point(param):
if current_platform.is_rocm():
# On ROCm, integer params (e.g. GPTQ qweight/qzeros) are left