Skip to content

Commit

Permalink
don't bother testing for None
Browse files Browse the repository at this point in the history
  • Loading branch information
tfogal committed Jan 15, 2025
1 parent bfc963a commit ffe2266
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thunder/dynamo/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def last_traces(self) -> [Trace]:
for sinfo in self._backend.subgraph_infos:
for th_fqn in sinfo.thunder_compiled_fns:
trcs = thunder.last_traces(th_fqn)
if trcs is not None and trcs != []:
if trcs != []:
rv.append(trcs[-1])
del trcs
return rv
Expand All @@ -189,7 +189,7 @@ def last_backward_traces(self) -> [Trace]:
for sinfo in self._backend.subgraph_infos:
for th_fqn in sinfo.thunder_compiled_fns:
trcs_bw = thunder.last_backward_traces(th_fqn)
if trcs_bw is not None and trcs_bw != []:
if trcs_bw != []:
rv.append(trcs_bw[-1])
return rv

Expand Down

0 comments on commit ffe2266

Please sign in to comment.