8000 [inductor] remove debug code of AotCodeCompiler (#132823) · pytorch/pytorch@2ad011c · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ad011c

Browse files
xuhancnpytorchmergebot
authored andcommitted
[inductor] remove debug code of AotCodeCompiler (#132823)
Since we switch AotCodeCompiler to new cpp_builder: #132766 We can remove debug code of AotCodeCompiler. Pull Request resolved: #132823 Approved by: https://github.com/henrylhtsang
1 parent 343071c commit 2ad011c

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

torch/_inductor/codecache.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,24 +2079,6 @@ def _compile_consts_darwin(consts: bytes) -> str:
20792079
compile_cmd = object_builder.get_command_line()
20802080
output_o = object_builder.get_target_file_path()
20812081

2082-
# TODO: replace this with using the CppBuilder above
2083-
compile_cmd_old = cpp_compile_command(
2084-
input=input_path,
2085-
output=output_o,
2086-
vec_isa=picked_vec_isa,
2087-
cuda=cuda,
2088-
aot_mode=graph.aot_mode,
2089-
compile_only=True,
2090-
use_absolute_path=use_absolute_path,
2091-
use_mmap_weights=use_mmap_weights,
2092-
)
2093-
2094-
# Temp: add command debug code.
2095-
if config.is_fbcode():
2096-
_temp_validate_new_and_old_command(
2097-
compile_cmd.split(" "), compile_cmd_old.split(" ")
2098-
)
2099-
21002082
log.debug("aot compilation command: %s", compile_cmd)
21012083
if fbcode_aot_cpu_re:
21022084
output_o = os.path.splitext(input_path)[0] + ".o"
@@ -2212,22 +2194,6 @@ def _pad_to_alignment(raw_bytes: bytes) -> bytes:
22122194
link_cmd = so_builder.get_command_line()
22132195
output_so = so_builder.get_target_file_path()
22142196

2215-
# TODO: replace this with using the CppBuilder above
2216-
link_cmd_old = cpp_compile_command(
2217-
input=[output_o, consts_o],
2218-
output=output_so,
2219-
vec_isa=picked_vec_isa,
2220-
cuda=cuda,
2221-
aot_mode=graph.aot_mode,
2222-
use_absolute_path=use_absolute_path,
2223-
)
2224-
2225-
# Temp: add command debug code.
2226-
if config.is_fbcode():
2227-
_temp_validate_new_and_old_command(
2228-
link_cmd.split(" "), link_cmd_old.split(" ")
2229-
)
2230-
22312197
log.debug("aot linkage command: %s", link_cmd)
22322198
if fbcode_aot_cpu_re:
22332199
output_so = (

0 commit comments

Comments
 (0)
0