Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions torch/_inductor/codecache.py
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,7 @@ def _compile_consts_darwin(consts: bytes) -> str:
)

log.debug("aot compilation command: %s", compile_cmd)
output_o = os.path.splitext(input_path)[0] + ".o"
if fbcode_aot_cpu_re:
compile_file(input_path, output_o, compile_cmd.split())
os.chmod(output_o, 0o644)
Expand Down Expand Up @@ -2170,6 +2171,11 @@ def _pad_to_alignment(raw_bytes: bytes) -> bytes:
)

log.debug("aot linkage command: %s", link_cmd)
output_so = (
config.aot_inductor.output_path
if specified_so_name
else os.path.splitext(input_path)[0] + ".so"
)
if fbcode_aot_cpu_re:
compile_file([output_o, consts_o], output_so, link_cmd.split())
os.chmod(output_so, 0o755)
Expand Down