Skip to content

Commit

Permalink
more meticulous bsym check to tell if the trace is bwd
Browse files Browse the repository at this point in the history
Signed-off-by: Masaki Kozuki <[email protected]>
  • Loading branch information
crcrpar committed Nov 30, 2024
1 parent d60b4dc commit 8475ff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thunder/transforms/tensor_subclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ def __post_init__(self) -> None:
is_backward_trace = maybe_unpack_C0_bsym.args and maybe_unpack_C1_bsym.args and (
maybe_unpack_C0_bsym.sym.id,
maybe_unpack_C1_bsym.sym.id,
maybe_unpack_C0_bsym.args[0].name,
maybe_unpack_C1_bsym.args[0].name,
getattr(maybe_unpack_C0_bsym.args[0], "name", ""),
getattr(maybe_unpack_C1_bsym.args[0], "name", ""),
) == (
prims.PrimIDs.UNPACK_SEQUENCE,
prims.PrimIDs.UNPACK_SEQUENCE,
Expand Down

0 comments on commit 8475ff7

Please sign in to comment.