This repository was archived by the owner on Aug 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1113,6 +1113,8 @@ def run_one_model(
1113
1113
cos_similarity = False ,
1114
1114
skip_accuracy_check = False ,
1115
1115
):
1116
+ t0 = time .perf_counter ()
1117
+
1116
1118
tolerance = 1e-4
1117
1119
# Increase the tolerance for torch allclose
1118
1120
if is_training and current_device == "cuda" and name in REQUIRE_HIGHER_TOLERANCE :
@@ -1170,7 +1172,9 @@ def run_one_model(
1170
1172
frames_third_pass = 0
1171
1173
1172
1174
if output_filename and "coverage" in output_filename :
1173
- results .append (f"{ ok :3} /{ total :3} +{ frames_third_pass } frames" )
1175
+ results .append (
1176
+ f"{ ok :3} /{ total :3} +{ frames_third_pass } frames { time .perf_counter ()- t0 :.0f} s"
1177
+ )
1174
1178
1175
1179
results .append (experiment (model , example_inputs ))
1176
1180
print (" " .join (map (str , results )))
Original file line number Diff line number Diff line change @@ -236,15 +236,11 @@ def python_type(self):
236
236
return torch .Size
237
237
238
238
def reconstruct (self , codegen ):
239
- load_torch_size = [
240
- create_instruction ("LOAD_GLOBAL" , "torch" ),
241
- create_instruction ("LOAD_METHOD" , "Size" ),
242
- ]
243
- codegen .extend_output (load_torch_size )
239
+ codegen .load_import_from ("torch" , "Size" )
244
240
codegen .foreach (self .items )
245
241
build_torch_size = [
246
242
create_instruction ("BUILD_TUPLE" , len (self .items )),
247
- create_instruction ("CALL_METHOD " , 1 ),
243
+ create_instruction ("CALL_FUNCTION " , 1 ),
248
244
]
249
245
return build_torch_size
250
246
You can’t perform that action at this time.
0 commit comments