fix: build_env.sh 简化为纯净版本(避免 CUDA 预热导致异常)
This commit is contained in:
@@ -1,17 +1,2 @@
|
|||||||
#!/bin/bash
|
#!/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"
|
echo "build env success"
|
||||||
|
|||||||
Reference in New Issue
Block a user