Skip to content

Commit 269fa80

Browse files
henrylhtsangpytorchmergebot
authored andcommitted
[AOTI][cutlass backend] Do not remove the cutlass kernel .o file after packaging (pytorch#154155)
Differential Revision: [D75253009](https://our.internmc.facebook.com/intern/diff/D75253009/) In general, we want to cache the cutlass kernels. Also saw an error saying .o not found. Pull Request resolved: pytorch#154155 Approved by: https://github.com/chenyang78
1 parent 5bb156a commit 269fa80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

torch/_inductor/codecache.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,6 +2082,8 @@ def _pad_to_alignment(raw_bytes: bytes) -> bytes:
20822082
else:
20832083
so_builder.build()
20842084
for o_file in obj_srcs:
2085+
if o_file not in gpu_kernels_o:
2086+
continue
20852087
# Remove these as they are not needed anymore
20862088
os.remove(o_file)
20872089

0 commit comments

Comments
 (0)