Compare commits

...

2 Commits

2 changed files with 120 additions and 0 deletions

90
probe_base_moe_forward.sh Executable file
View File

@@ -0,0 +1,90 @@
#!/bin/bash
set -e
BASE="/usr/local/corex/lib/python3/dist-packages/vllm/model_executor/models/qwen3_5.py"
echo "=== base qwen3_5.py line count ==="
wc -l "$BASE"
echo ""
echo "=== _pure_pytorch_experts 完整函数 ==="
sed -n '/def _pure_pytorch_experts/,/^ def [a-z]/p' "$BASE" | head -200
echo ""
echo "=== forward 中调用 _pure_pytorch_experts 的上下文 ==="
grep -n -B5 -A5 "_pure_pytorch_experts\|corex_moe_direct\|corex_moe_weight\|corex_moe_exact\|corex_moe_topk" "$BASE" | head -100
echo ""
echo "=== corex_moe_direct_routed.w13 签名 ==="
python3 -c "
from vllm import corex_moe_direct_routed as m
import inspect
for name in dir(m):
if not name.startswith('_'):
obj = getattr(m, name)
try:
sig = inspect.signature(obj)
print(f'{name}{sig}')
except:
print(f'{name}: {type(obj)}')
" 2>&1
echo ""
echo "=== corex_moe_topk_softmax.moe_topk_softmax 签名 ==="
python3 -c "
from vllm import corex_moe_topk_softmax as m
import inspect
for name in dir(m):
if not name.startswith('_'):
obj = getattr(m, name)
try:
sig = inspect.signature(obj)
print(f'{name}{sig}')
except:
print(f'{name}: {type(obj)}')
" 2>&1
echo ""
echo "=== corex_moe_exact_reduce 签名 ==="
python3 -c "
from vllm import corex_moe_exact_reduce as m
import inspect
for name in dir(m):
if not name.startswith('_'):
obj = getattr(m, name)
try:
sig = inspect.signature(obj)
print(f'{name}{sig}')
except:
print(f'{name}: {type(obj)}')
" 2>&1
echo ""
echo "=== corex_moe_weight_gather 签名 ==="
python3 -c "
from vllm import corex_moe_weight_gather as m
import inspect
for name in dir(m):
if not name.startswith('_'):
obj = getattr(m, name)
try:
sig = inspect.signature(obj)
print(f'{name}{sig}')
except:
print(f'{name}: {type(obj)}')
" 2>&1
echo ""
echo "=== corex_moe_index_combine 签名 ==="
python3 -c "
from vllm import corex_moe_index_combine as m
import inspect
for name in dir(m):
if not name.startswith('_'):
obj = getattr(m, name)
try:
sig = inspect.signature(obj)
print(f'{name}{sig}')
except:
print(f'{name}: {type(obj)}')
" 2>&1

30
push_probe_results.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# 在真机上执行:把probe结果和.so文件commit到repo
set -e
cd /home/dylan/0814/project_6
# 1. 先跑第二个probe(如果还没跑的话)
if [ ! -f probe_bridge_output.txt ]; then
echo "[1/4] Running probe_ix_unified_bridge.sh..."
bash probe_ix_unified_bridge.sh 2>&1 | tee probe_bridge_output.txt
else
echo "[1/4] probe_bridge_output.txt already exists"
fi
# 2. commit probe结果(不commit .so文件,太大了)
echo "[2/4] Committing probe results..."
git add probe_bridge_output.txt
git add -f probe_output.txt 2>/dev/null || true
git commit -m "data: probe results — ixformer API + ix_unified_bridge + corex_*.so函数列表" || echo "nothing to commit"
# 3. push到modelhub
echo "[3/4] Pushing to modelhub..."
git push origin main
# 4. 提示中转机操作
echo ""
echo "[4/4] 现在去中转机执行:"
echo " cd /home/dylan/Downloads/github_0804/project_6"
echo " git pull modelhub main"
echo " git push origin main"