Skip to content

Commit e47977d

Browse files
authored
[SOT] Fix guarded fns is not inplace update (#73511)
1 parent 0c29fe4 commit e47977d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/jit/sot/opcode_translator/executor/executor_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def lookup(
265265
# Move the current hit to the front
266266
# Note: Be cautious when modifying the order of elements in a list during iteration,
267267
# as it can lead to unexpected behavior.
268-
guarded_fns = [
268+
guarded_fns[:] = [
269269
guarded_fns[index],
270270
*guarded_fns[:index],
271271
*guarded_fns[index + 1 :],

0 commit comments

Comments
 (0)