Skip to content

Commit 95fc800

Browse files
authored
fix_test (#393)
1 parent 410311b commit 95fc800

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

graph_net/test/decomposer_validator_test.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,22 @@ cp -r "$GRAPH_NET_ROOT/../samples/$MODEL_PATH_IN_SAMPLES" "$OUTPUT_DIR/"
1313

1414
extractor_config_json_str=$(cat <<EOF
1515
{
16-
"custom_extractor_path": "$GRAPH_NET_ROOT/torch/naive_graph_decomposer.py",
17-
"custom_extractor_config": {
18-
"output_dir": "$OUTPUT_DIR/${MODEL_NAME}_decomposed",
19-
"split_positions": [8, 16, 32],
20-
"group_head_and_tail": true,
21-
"chain_style": true
16+
"decorator_path": "$GRAPH_NET_ROOT/torch/extractor.py",
17+
"decorator_config": {
18+
"name": "$MODEL_NAME",
19+
"custom_extractor_path": "$GRAPH_NET_ROOT/torch/naive_graph_decomposer.py",
20+
"custom_extractor_config": {
21+
"output_dir": "$OUTPUT_DIR/${MODEL_NAME}_decomposed",
22+
"split_positions": [8, 16, 32],
23+
"group_head_and_tail": true,
24+
"chain_style": true
25+
}
2226
}
2327
}
2428
EOF
2529
)
2630
EXTRACTOR_CONFIG=$(echo $extractor_config_json_str | base64 -w 0)
27-
python3 -m graph_net.torch.single_device_runner --model-path $GRAPH_NET_ROOT/../samples/$MODEL_PATH_IN_SAMPLES --enable-extract True --extract-name $MODEL_NAME --dump-graph-hash-key --extractor-config=$EXTRACTOR_CONFIG
31+
python3 -m graph_net.torch.run_model --model-path $GRAPH_NET_ROOT/../samples/$MODEL_PATH_IN_SAMPLES --decorator-config=$EXTRACTOR_CONFIG
2832

2933
FILE_PATH=$GRAPH_NET_DECOMPOSE_PATH/decomposer
3034
mkdir -p "$(dirname "$FILE_PATH/log.log")"
@@ -35,13 +39,9 @@ python -m graph_net.torch.test_compiler \
3539
--compiler range_decomposer_validator \
3640
--device cuda > "$FILE_PATH/log.log" 2>&1
3741

38-
python -m graph_net.log2json \
39-
--log-file "$FILE_PATH/log.log" \
40-
--output-dir "$FILE_PATH/JSON_results/"
41-
42-
python -m graph_net.plot_ESt \
43-
--benchmark-path "$FILE_PATH/JSON_results/" \
44-
--output-dir "$FILE_PATH"
42+
python3 -m graph_net.plot_ESt \
43+
--benchmark-path $FILE_PATH/log.log \
44+
--output-dir $FILE_PATH \
4545

4646
echo "=================================================="
4747
echo "Results saved in: $FILE_PATH/ES_result.png"

0 commit comments

Comments
 (0)