{"record":{"id":"fc22ece722e97aa3","repo":"vllm-project/vllm","slug":"vllm-rocm-quick-reduce-quantization-min-size-kb-mu","errorCode":null,"errorMessage":"VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB must be non-negative, got {quantization_min_size}","messagePattern":"VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB must be non-negative, got (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/distributed/device_communicators/quick_all_reduce.py","lineNumber":285,"sourceCode":"            raise ValueError(\n                \"VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB must be non-negative, \"\n                f\"got {qr_min_size}\"\n            )\n        qr_min_size *= MB\n        if qr_max_size is not None and qr_min_size > qr_max_size:\n            raise ValueError(\n                \"VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB must be less than or \"\n                \"equal to the effective QuickReduce max size\"\n            )\n        return qr_min_size\n\n    @staticmethod\n    def _get_qr_quantization_min_size() -> int | None:\n        quantization_min_size = envs.VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB\n        if quantization_min_size is None:\n            return None\n        if quantization_min_size < 0:\n            raise ValueError(\n                \"VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB must be \"\n                f\"non-negative, got {quantization_min_size}\"\n            )\n        return quantization_min_size * KB\n\n    def _rocm_arch_available(self):\n        if not current_platform.is_rocm():\n            return False\n        try:\n            props = torch.cuda.get_device_properties(0)\n            gcn_arch = getattr(props, \"gcnArchName\", \"\")\n            supported_archs = [\"gfx94\", \"gfx95\"]\n            return any(gfx in gcn_arch for gfx in supported_archs)\n        except Exception as e:\n            logger.warning(\"Failed to determine ROCm for quick allreduce: %s\", e)\n            return False\n\n    def create_shared_buffer(self):","sourceCodeStart":267,"sourceCodeEnd":303,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/distributed/device_communicators/quick_all_reduce.py#L267-L303","documentation":"CustomQuickAllReduce._get_qr_quantization_min_size validates VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB: negative values raise ValueError. The variable sets the KB threshold above which messages are quantized on the quick allreduce path.","triggerScenarios":"Launching vLLM on a supported ROCm platform with VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB set to a negative number.","commonSituations":"Sign typos in env config; trying to disable quantization with -1 instead of 0 or unsetting the var; stale values from older tuning docs.","solutions":["Set the variable to a non-negative KB value or unset it","Use 0 if the intent was 'quantize everything' rather than a negative sentinel"],"exampleFix":"# before\nexport VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB=-16\n\n# after\nunset VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB\n# or\nexport VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB=16","handlingStrategy":"validation","validationCode":"v = os.environ.get(\"VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB\")\nif v is not None:\n    assert int(v) >= 0, \"VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB must be >= 0\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate numeric env vars before process start","Prefer unsetting over negative sentinels","Add config schema checks in deploy tooling"],"tags":["rocm","allreduce","quantization","env-var"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}