Skip to content

Commit a1ce09a

Browse files
martinlsmMartin Lindström
andauthored
Arm backend: aot_arm_compiler.py: Create output dir (#11282)
Create output directory for the generated BundledProgram if it does not already exist. This will save the user time by not having to rerun the program due to it complaining that the directory does not exist. Co-authored-by: Martin Lindström <[email protected]>
1 parent c09ba06 commit a1ce09a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/arm/aot_arm_compiler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ def save_bpte_program(exec_prog, original_model: torch.nn.Module, output_name: s
668668
)
669669

670670
# Generate BundledProgram
671+
output_dir = os.path.dirname(output_name)
672+
os.makedirs(output_dir, exist_ok=True)
671673
save_bundled_program(exec_prog, method_test_suites, output_name)
672674

673675

0 commit comments

Comments
 (0)