{"record":{"id":"9b7e8811a147b838","repo":"vllm-project/vllm","slug":"vllm-rocm-quick-reduce-min-size-bytes-mb-must-be-n","errorCode":null,"errorMessage":"VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB must be non-negative, got {qr_min_size}","messagePattern":"VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB must be non-negative, got (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/distributed/device_communicators/quick_all_reduce.py","lineNumber":267,"sourceCode":"            logger.info(\n                \"Custom quick allreduce: min size override = %d MB\",\n                qr_min_size // MB,\n            )\n        if self.qr_quantization_min_size is not None:\n            logger.info(\n                \"Custom quick allreduce: quantization codec threshold = %d KB\",\n                self.qr_quantization_min_size // KB,\n            )\n        self.create_shared_buffer()\n        self.disabled = False\n\n    @staticmethod\n    def _get_qr_min_size(qr_max_size: int | None) -> int | None:\n        qr_min_size = envs.VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB\n        if qr_min_size is None:\n            return None\n        if qr_min_size < 0:\n            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(","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/distributed/device_communicators/quick_all_reduce.py#L249-L285","documentation":"CustomQuickAllReduce._get_qr_min_size reads VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB and validates it: a negative value raises ValueError because a minimum-size threshold below zero is meaningless. The value is later multiplied by MB to become the byte threshold under which the ROCm quick allreduce path is skipped.","triggerScenarios":"Starting vLLM with VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB set to a negative number (e.g. -1) on an AMD MI300/MI350 (gfx94/gfx95) node where the custom quick allreduce is enabled.","commonSituations":"Typos in env files (e.g. '-8' vs '8'); attempting to 'disable the threshold' by passing -1 instead of unsetting the variable; CI configs copied from an experiment.","solutions":["Set the variable to a non-negative value (0 disables the threshold floor) or unset it entirely","Grep deploy scripts/env files for the variable and fix the sign"],"exampleFix":"# before\nexport VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB=-1\n\n# after\nunset VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB\n# or\nexport VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB=0","handlingStrategy":"validation","validationCode":"v = os.environ.get(\"VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB\")\nif v is not None:\n    assert int(v) >= 0, \"VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB must be >= 0\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Lint numeric env vars at launcher startup","Use 0 or unset instead of negative sentinels","Keep tuning env vars in one reviewed config file"],"tags":["rocm","allreduce","env-var","config"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}