diff --git a/thunder/transforms/tensor_subclasses.py b/thunder/transforms/tensor_subclasses.py index d5473b26f4..5eb2e24119 100644 --- a/thunder/transforms/tensor_subclasses.py +++ b/thunder/transforms/tensor_subclasses.py @@ -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,