Skip to content

Commit a6fc1b4

Browse files
committed
Merge branch 'develop' into use_ast_renamer
2 parents 2119788 + 42f21bd commit a6fc1b4

14 files changed

+11
-89
lines changed

graph_net/test/cumsum_num_kernels_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ python3 -m graph_net.model_path_handler \
66
--model-path-list "$GRAPH_NET_ROOT/graph_net/test/dev_model_list/cumsum_num_kernels_sample_list.txt" \
77
--handler-config $(base64 -w 0 <<EOF
88
{
9-
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/cumsum_num_kernels_generator.py",
9+
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_pass/cumsum_num_kernels_generator.py",
1010
"handler_class_name": "CumSumNumKernelsGenerator",
1111
"handler_config": {
1212
"output_json_file_name": "cumsum_num_kernels.json",

graph_net/test/debug_fusible_subgraph_generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ python3 -m graph_net.model_path_handler \
1313
--model-path-list "$model_path_list" \
1414
--handler-config $(base64 -w 0 <<EOF
1515
{
16-
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/cumsum_num_kernels_generator.py",
16+
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_pass/cumsum_num_kernels_generator.py",
1717
"handler_class_name": "CumSumNumKernelsGenerator",
1818
"handler_config": {
1919
"output_json_file_name": "cumsum_num_kernels.json",

graph_net/test/device_rewrite_sample_pass_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
GRAPH_NET_ROOT=$(python3 -c "import graph_net; import os; print(os.path.dirname(os.path.dirname(graph_net.__file__)))")
44
model_path_handler_config_json_str=$(cat <<EOF
55
{
6-
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/device_rewrite_sample_pass.py",
6+
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_pass/device_rewrite_sample_pass.py",
77
"handler_class_name": "DeviceRewriteSamplePass",
88
"handler_config": {
99
"device": "cuda",

graph_net/test/fx_graph_module_unserialize_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ python3 -m graph_net.model_path_handler \
4242
--model-path-list $device_rewrite_sample_list \
4343
--handler-config $(base64 -w 0 <<EOF
4444
{
45-
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/device_rewrite_sample_pass.py",
45+
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_pass/device_rewrite_sample_pass.py",
4646
"handler_class_name": "DeviceRewriteSamplePass",
4747
"handler_config": {
4848
"device": "cuda",

graph_net/test/subgraph_generator_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ python3 -m graph_net.model_path_handler \
66
--model-path-list "$GRAPH_NET_ROOT/graph_net/test/dev_model_list/cumsum_num_kernels_sample_list.txt" \
77
--handler-config $(base64 -w 0 <<EOF
88
{
9-
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/subgraph_generator.py",
9+
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_pass/subgraph_generator.py",
1010
"handler_class_name": "SubgraphGenerator",
1111
"handler_config": {
1212
"model_path_prefix": "$GRAPH_NET_ROOT",

graph_net/test/typical_sequence_decomposer_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ python3 -m graph_net.model_path_handler \
6969
--model-path-list $device_rewrite_sample_list \
7070
--handler-config $(base64 -w 0 <<EOF
7171
{
72-
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/device_rewrite_sample_pass.py",
72+
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_pass/device_rewrite_sample_pass.py",
7373
"handler_class_name": "DeviceRewriteSamplePass",
7474
"handler_config": {
7575
"device": "cuda",

graph_net/tools/dimension_symbolizer.sh

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,11 @@
11
#!/bin/bash
22

3-
# GRAPH_NET_ROOT=$(python3 -c "import graph_net; import os; print(
4-
# os.path.dirname(os.path.dirname(graph_net.__file__)))")
5-
6-
# python3 -m graph_net.model_path_handler \
7-
# --model-path-list $GRAPH_NET_ROOT/graph_net/config/small_sample_list_for_get_fusible_subgraph.txt \
8-
# --handler-config=$(base64 -w 0 <<EOF
9-
# {
10-
# "handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/dimension_symbolizer.py",
11-
# "handler_class_name": "DimensionSymbolizer",
12-
# "handler_config": {
13-
# "resume": false,
14-
# "output_dir": "/tmp/workspace_dimension_symbolizer",
15-
# "model_path_prefix": "$GRAPH_NET_ROOT",
16-
# "limits_handled_models": 10,
17-
# "last_model_log_file": "/tmp/a.py"
18-
# }
19-
# }
20-
# EOF
21-
# )
22-
233
GRAPH_NET_ROOT=$(python3 -c "import graph_net; import os; print(
244
os.path.dirname(os.path.dirname(graph_net.__file__)))")
255

266
python3 -m graph_net.apply_sample_pass \
277
--model-path-list $GRAPH_NET_ROOT/graph_net/config/small_sample_list_for_get_fusible_subgraph.txt \
28-
--sample-pass-file-path "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/dimension_symbolizer.py" \
8+
--sample-pass-file-path "$GRAPH_NET_ROOT/graph_net/torch/sample_pass/dimension_symbolizer.py" \
299
--sample-pass-class-name "DimensionSymbolizer" \
3010
--sample-pass-config "$(cat <<EOF
3111
{

graph_net/tools/fusible_subgraph_generate.sh

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,5 @@
11
#!/bin/bash
22

3-
# GRAPH_NET_ROOT=$(python3 -c "import graph_net; import os; print(os.path.dirname(os.path.dirname(graph_net.__file__)))")
4-
5-
# model_path_list=$GRAPH_NET_ROOT/graph_net/test/dev_model_list/cumsum_num_kernels_sample_list.txt
6-
# WORKSPACE_ROOT=/tmp/fusible_subgraphs
7-
# CUMSUM_NUM_KERNELS_WORKSPACE=$WORKSPACE_ROOT/workspace_cumsum_num_kernels
8-
# FUSIBLE_SUBGRAPH_RANGES_WORKSPACE=$WORKSPACE_ROOT/workspace_fusible_subgraph_ranges
9-
# FUSIBLE_SUBGRAPH_SAMPLES_WORKSPACE=$WORKSPACE_ROOT/workspace_fusible_subgraph_samples
10-
# resume=false
11-
12-
# python3 -m graph_net.model_path_handler \
13-
# --model-path-list "$model_path_list" \
14-
# --handler-config $(base64 -w 0 <<EOF
15-
# {
16-
# "handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/cumsum_num_kernels_generator.py",
17-
# "handler_class_name": "CumSumNumKernelsGenerator",
18-
# "handler_config": {
19-
# "output_json_file_name": "cumsum_num_kernels.json",
20-
# "model_path_prefix": "$GRAPH_NET_ROOT",
21-
# "output_dir": "$CUMSUM_NUM_KERNELS_WORKSPACE",
22-
# "resume": $resume
23-
# }
24-
# }
25-
# EOF
26-
# )
27-
28-
# python3 -m graph_net.model_path_handler \
29-
# --model-path-list "$model_path_list" \
30-
# --handler-config $(base64 -w 0 <<EOF
31-
# {
32-
# "handler_path": "$GRAPH_NET_ROOT/graph_net/sample_pass/fusible_subgraph_ranges_generator.py",
33-
# "handler_class_name": "FusibleSubgraphRangesGenerator",
34-
# "handler_config": {
35-
# "model_path_prefix": "$CUMSUM_NUM_KERNELS_WORKSPACE",
36-
# "input_json_file_name": "cumsum_num_kernels.json",
37-
# "output_json_file_name": "fusible_subgraph_ranges.json",
38-
# "output_dir": "$FUSIBLE_SUBGRAPH_RANGES_WORKSPACE",
39-
# "resume": $resume
40-
# }
41-
# }
42-
# EOF
43-
# )
44-
45-
# python3 -m graph_net.model_path_handler \
46-
# --model-path-list "$model_path_list" \
47-
# --handler-config $(base64 -w 0 <<EOF
48-
# {
49-
# "handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/subgraph_generator.py",
50-
# "handler_class_name": "SubgraphGenerator",
51-
# "handler_config": {
52-
# "model_path_prefix": "$GRAPH_NET_ROOT",
53-
# "output_dir": "$FUSIBLE_SUBGRAPH_SAMPLES_WORKSPACE",
54-
# "subgraph_ranges_json_root": "$FUSIBLE_SUBGRAPH_RANGES_WORKSPACE",
55-
# "resume": $resume
56-
# }
57-
# }
58-
# EOF
59-
# )
60-
613
GRAPH_NET_ROOT=$(python3 -c "import graph_net; import os; print(os.path.dirname(os.path.dirname(graph_net.__file__)))")
624

635
model_path_list=$GRAPH_NET_ROOT/graph_net/test/dev_model_list/cumsum_num_kernels_sample_list.txt
@@ -69,7 +11,7 @@ resume=false
6911

7012
python3 -m graph_net.apply_sample_pass \
7113
--model-path-list "$model_path_list" \
72-
--sample-pass-file-path "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/cumsum_num_kernels_generator.py" \
14+
--sample-pass-file-path "$GRAPH_NET_ROOT/graph_net/torch/sample_pass/cumsum_num_kernels_generator.py" \
7315
--sample-pass-class-name "CumSumNumKernelsGenerator" \
7416
--sample-pass-config "$(cat <<EOF
7517
{

graph_net/tools/generate_subgraph_dataset.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function rewrite_device() {
146146
--model-path-list ${deduplicated_subgraph_list} \
147147
--handler-config=$(base64 -w 0 <<EOF
148148
{
149-
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/device_rewrite_sample_pass.py",
149+
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_pass/device_rewrite_sample_pass.py",
150150
"handler_class_name": "DeviceRewriteSamplePass",
151151
"handler_config": {
152152
"device": "cuda",
@@ -167,7 +167,7 @@ function gen_fusible_subgraphs() {
167167
--model-path-list "$device_rewrited_subgraph_list" \
168168
--handler-config $(base64 -w 0 <<EOF
169169
{
170-
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/cumsum_num_kernels_generator.py",
170+
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_pass/cumsum_num_kernels_generator.py",
171171
"handler_class_name": "CumSumNumKernelsGenerator",
172172
"handler_config": {
173173
"output_json_file_name": "cumsum_num_kernels.json",
@@ -201,7 +201,7 @@ EOF
201201
--model-path-list "$device_rewrited_subgraph_list" \
202202
--handler-config $(base64 -w 0 <<EOF
203203
{
204-
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_passes/subgraph_generator.py",
204+
"handler_path": "$GRAPH_NET_ROOT/graph_net/torch/sample_pass/subgraph_generator.py",
205205
"handler_class_name": "SubgraphGenerator",
206206
"handler_config": {
207207
"model_path_prefix": "${DEVICE_REWRITED_OUTPUT_DIR}",

0 commit comments

Comments
 (0)