Skip to content

Commit c65f7fa

Browse files
authored
4th tasks anchors (#352)
* support checking model redundancy * revert change of vision_model_test * reformat python code. * reformat bert_model_test.py and utils.py * minor fix * fix failed check by comparing directories after os.path.realpath() * fix bugs in check_validate.sh * set dynamic=False in single_device_runner.py * reset graph hash * add task-anchor comments
1 parent 91388aa commit c65f7fa

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

graph_net/torch/backend/unstable_to_stable_backend.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,26 @@ def _impl_unstable_to_stable_special_logit(self, gm):
147147

148148
return gm
149149

150+
# replace this line with modification code for task 116 (torch._C._linalg.linalg_vector_norm)
151+
152+
# replace this line with modification code for task 117 (torch._C._linalg.linalg_norm)
153+
154+
# replace this line with modification code for task 118 (torch._C._nn.softplus)
155+
156+
# replace this line with modification code for task 119 (torch._C._nn.one_hot)
157+
158+
# replace this line with modification code for task 121 (torch._C._set_grad_enabled)
159+
160+
# replace this line with modification code for task 122 (torch._C._log_api_usage_once)
161+
162+
# replace this line with modification code for task 123 (torch._C._nn.pad)
163+
164+
# replace this line with modification code for task 125 (torch._C._nn.gelu)
165+
166+
# replace this line with modification code for task 126 (torch._C._nn.scaled_dot_product_attention)
167+
168+
# replace this line with modification code for task 127 (torch._C._nn.linear)
169+
150170
def unstable_to_stable(self, gm):
151171
methods = (
152172
name

graph_net/torch/fx_graph_serialize_util.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ def serialize_graph_module_to_str(gm: torch.fx.GraphModule) -> str:
2525
(r"torch\._C\._fft\.fft_rfft\(", "torch.fft.rfft("),
2626
(r"torch\._C\._fft\.fft_fftn\(", "torch.fft.fftn("),
2727
(r"torch\._C\._special\.special_logit\(", "torch.special.logit("),
28-
# Add new rules to this list as needed
28+
# replace this line with modification code for task 116 (torch._C._linalg.linalg_vector_norm)
29+
# replace this line with modification code for task 117 (torch._C._linalg.linalg_norm)
30+
# replace this line with modification code for task 118 (torch._C._nn.softplus)
31+
# replace this line with modification code for task 119 (torch._C._nn.one_hot)
32+
# replace this line with modification code for task 121 (torch._C._set_grad_enabled)
33+
# replace this line with modification code for task 122 (torch._C._log_api_usage_once)
34+
# replace this line with modification code for task 123 (torch._C._nn.pad)
35+
# replace this line with modification code for task 125 (torch._C._nn.gelu)
36+
# replace this line with modification code for task 126 (torch._C._nn.scaled_dot_product_attention)
37+
# replace this line with modification code for task 127 (torch._C._nn.linear)
2938
]
3039
for pattern, repl in replacements:
3140
code = re.sub(pattern, repl, code)

0 commit comments

Comments
 (0)