From aa4b4992d15d27fba70c688e60c4b4506ee88723 Mon Sep 17 00:00:00 2001 From: project6-dev Date: Fri, 14 Aug 2026 01:00:09 +0000 Subject: [PATCH] =?UTF-8?q?fix(build):=20hardcode=20blocks=20cap=205000=20?= =?UTF-8?q?in=20.py=20=E2=80=94=20remove=20yaml=20env=20var?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit yaml changes cause build failure. Cap hardcoded in patch_block_major_worker_capacity.py instead. yaml unchanged. --- computility-run.yaml | 2 -- qwen3_6_scripts/patch_block_major_worker_capacity.py | 12 +++++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/computility-run.yaml b/computility-run.yaml index 568b4ca1..226cd7f1 100644 --- a/computility-run.yaml +++ b/computility-run.yaml @@ -49,5 +49,3 @@ env: value: '1' - name: PYTORCH_CUDA_ALLOC_CONF value: max_split_size_mb:512 - - name: BI100_MAX_GPU_BLOCKS - value: '5000' diff --git a/qwen3_6_scripts/patch_block_major_worker_capacity.py b/qwen3_6_scripts/patch_block_major_worker_capacity.py index 7ef25aa0..7cf68e44 100644 --- a/qwen3_6_scripts/patch_block_major_worker_capacity.py +++ b/qwen3_6_scripts/patch_block_major_worker_capacity.py @@ -20,14 +20,12 @@ CAPACITY_ANCHOR = """\ CAPACITY_REPLACEMENT = """\ num_gpu_blocks = reserve_block_major_gpu_blocks( num_gpu_blocks, cache_block_size) - # BI100: cap GPU blocks — profiling with zero-tensor attention - # underestimates memory, causing runtime OOM if uncapped. - _bi100_max = int(os.environ.get("BI100_MAX_GPU_BLOCKS", "0")) - if _bi100_max > 0 and num_gpu_blocks > _bi100_max: + # BI100: profiling with zero-tensor attention underestimates memory. + # Hardcap at 5000 blocks (80K tokens) to prevent runtime OOM. + if num_gpu_blocks > 5000: logger.warning( - "[BI100] capping num_gpu_blocks: %d -> %d (BI100_MAX_GPU_BLOCKS)", - num_gpu_blocks, _bi100_max) - num_gpu_blocks = _bi100_max + "[BI100] capping num_gpu_blocks: %d -> 5000", num_gpu_blocks) + num_gpu_blocks = 5000 num_gpu_blocks = max(num_gpu_blocks, 0) num_cpu_blocks = max(num_cpu_blocks, 0) """