Skip to content

Commit becb25c

Browse files
committed
Remove some changes.
1 parent 766a190 commit becb25c

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

graph_net/subgraph_decompose_and_evaluation_step.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def main(args):
396396

397397
failed_decomposition = []
398398
final_used_splits_map = {}
399-
while need_decompose:
399+
if need_decompose:
400400
decomposed_samples_dir = os.path.join(
401401
pass_work_dir, "samples" if args.framework == "torch" else "paddle_samples"
402402
)
@@ -405,6 +405,7 @@ def main(args):
405405
for model_name, task_info in tasks_map.items():
406406
original_path = task_info["original_path"]
407407
split_positions = sorted(list(task_info["split_positions"]))
408+
408409
final_used_splits_map[model_name] = split_positions
409410

410411
rectied_model_path = get_rectfied_model_path(original_path)
@@ -429,14 +430,6 @@ def main(args):
429430
if failed_decomposition:
430431
print(f"[WARN] {len(failed_decomposition)} models failed to decompose.")
431432

432-
if not failed_decomposition and num_decomposed_samples == len(tasks_map):
433-
need_decompose = True
434-
shutil.rmtree(decomposed_samples_dir)
435-
os.makedirs(decomposed_samples_dir, exist_ok=True)
436-
current_max_size = max(1, current_max_size // 2)
437-
else:
438-
need_decompose = False
439-
440433
# --- Step 4: Testing ---
441434
if task_controller.task_scheduler["run_evaluation"]:
442435
print("\n--- Phase 2: Batch Testing ---")

graph_net/test/subgraph_decompose_and_evaluation_step_test.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
#!/bin/bash
22

3-
export PYTHONPATH=/work/GraphNet:/work/abstract_pass/Athena:$PYTHONPATH
4-
53
GRAPH_NET_ROOT=$(python3 -c "import graph_net; import os; print(os.path.dirname(graph_net.__file__))")
64

7-
FRAMEWORK="paddle"
8-
LOG_FILE="$GRAPH_NET_ROOT/test/log_xpu.txt"
9-
#LOG_FILE="/work/GraphNet/benchmark_results/log_test_target_device-xpu_p800_nope-pd_20251111_2.txt"
10-
OUTPUT_DIR="outputs"
5+
FRAMEWORK="torch"
6+
LOG_FILE="$GRAPH_NET_ROOT/test/log_file_for_subgraph_decompose_and_evaluation_step.log"
7+
OUTPUT_DIR="/tmp/decompose_and_evaluation_workspace"
118
TOLERANCE=0
12-
INITIAL_MAX_SIZE=4096
9+
INITIAL_MAX_SIZE=2048
1310

1411
test_compiler_config_str=$(cat <<EOF
1512
{
@@ -52,7 +49,7 @@ test_target_device_config_str=$(cat <<EOF
5249
EOF
5350
)
5451

55-
test_module_name="test_reference_device"
52+
test_module_name="test_compiler"
5653
if [ "${test_module_name}" = "test_compiler" ]; then
5754
TEST_CONFIG_B64=$(echo "$test_compiler_config_str" | base64 -w 0)
5855
elif [ "${test_module_name}" = "test_reference_device" ]; then

0 commit comments

Comments
 (0)