From c5a95cd0aba444da1e5513f4a576dccdb6ac2160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Lindstr=C3=B6m?= Date: Fri, 16 May 2025 12:45:34 +0200 Subject: [PATCH] Arm backend: aot_arm_compiler.py: Create output dir 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. Change-Id: I3de81cc69cb1c943609b7d7cdd89d51737a72e8a --- examples/arm/aot_arm_compiler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/arm/aot_arm_compiler.py b/examples/arm/aot_arm_compiler.py index c663b150fd8..2d8f46f4a94 100644 --- a/examples/arm/aot_arm_compiler.py +++ b/examples/arm/aot_arm_compiler.py @@ -668,6 +668,8 @@ def save_bpte_program(exec_prog, original_model: torch.nn.Module, output_name: s ) # Generate BundledProgram + output_dir = os.path.dirname(output_name) + os.makedirs(output_dir, exist_ok=True) save_bundled_program(exec_prog, method_test_suites, output_name)