Skip to content

Commit

Permalink
[Fix] Remove redundant "remove_all_unused" in IPC memory lowering
Browse files Browse the repository at this point in the history
This commit removes the redundant invocation of `remove_all_unused`
function in the GPU IPC memory allocation lowering pass. This is
because the pass only mutates one call at a time, and thus will
not introduce new unused bindings.
  • Loading branch information
MasterJH5574 committed Mar 22, 2024
1 parent a2de07c commit 2e8ee7f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion python/tvm/relax/transform/ipc_allreduce_rewrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def transform(self) -> IRModule:
for g_var, func in self.mod.functions_items():
if isinstance(func, relax.Function):
updated_func = self.visit_expr(func)
updated_func = remove_all_unused(updated_func)
self.builder_.update_func(g_var, updated_func)
return self.builder_.get()

Expand Down
1 change: 0 additions & 1 deletion python/tvm/relax/transform/lower_gpu_ipc_alloc_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def transform(self) -> IRModule:
for g_var, func in self.mod.functions_items():
if isinstance(func, relax.Function):
updated_func = self.visit_expr(func)
updated_func = remove_all_unused(updated_func)
self.builder_.update_func(g_var, updated_func)
return self.builder_.get()

Expand Down

0 comments on commit 2e8ee7f

Please sign in to comment.