fix: build_env.sh 简化为纯净版本(避免 CUDA 预热导致异常)

This commit is contained in:
2026-06-12 21:55:09 +08:00
parent 574399e8ac
commit 61bab9d0e3
-15
View File
@@ -1,17 +1,2 @@
#!/bin/bash
set -e
# 预热 torch inductor,避免推理时编译
python -c "
import torch
@torch.compile(mode='reduce-overhead')
def _warmup(x):
return x * 2
x = torch.randn(100, 100, device='cuda')
_warmup(x)
print('Inductor cache ready')
"
echo "build env success"