Skip to content

Commit

Permalink
fix SDPA fx pass (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
Linchenn authored Jul 11, 2024
1 parent 9140d68 commit 3b81ea0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def call(self, exported_program: torch.export.ExportedProgram):
if self.is_zero_tensor_node(source):
# Remove the mark_tensor call on the mask input by
# replacing the target with an identity function.
node.target = lambda *args, **kwargs: args[0]
node.target = lambda *args, **kwargs: torch.zeros_like(args[0])

exported_program.graph_module.graph.lint()
exported_program.graph_module.recompile()
Expand Down

0 comments on commit 3b81ea0

Please sign in to comment.