Skip to content

Conversation

@cocolato
Copy link
Contributor

@cocolato cocolato commented Feb 9, 2026

Previously, optimize_uops used DUMP_UOP which only logged a single instruction at the out_ptr. However, since optimize_uops can emit multiple uops into the buffer in a single pass, this caused the debug log to miss subsequent uops like this:

 stack_level 5
  24 abs: _BINARY_SLICE (0, target=24, operand0=0, operand1=0)
    locals=[<? at 0x101b58440>, <recorded type list>, <? at 0x101b58460>, <? at 0x101b58470>, <int at 0x101b584c0>, <? at 0x101b58490>]
    stack=[<? at 0x101b584a0>, <? at 0x101b584b0>, <recorded type list>, <? at 0x101b58460>, <? at 0x101b58470>]
  24 out: _GUARD_3OS_TYPE (0, target=24, operand0=0x101745988, operand1=0)
    locals=[<? at 0x101b58440>, <recorded type list>, <? at 0x101b58460>, <? at 0x101b58470>, <int at 0x101b584c0>, <? at 0x101b58490>]
    stack=[<? at 0x101b584a0>, <? at 0x101b584b0>, <list at 0x101b584d0>]
  25 out: _UNPACK_INDICES (0, target=24, operand0=0, operand1=0)
    locals=[<? at 0x101b58440>, <recorded type list>, <? at 0x101b58460>, <? at 0x101b58470>, <int at 0x101b584c0>, <? at 0x101b58490>]
    stack=[<? at 0x101b584a0>, <? at 0x101b584b0>, <list at 0x101b584d0>]
  26 out: _BINARY_SLICE_LIST (0, target=24, operand0=0, operand1=0)
    locals=[<? at 0x101b58440>, <recorded type list>, <? at 0x101b58460>, <? at 0x101b58470>, <int at 0x101b584c0>, <? at 0x101b58490>]
    stack=[<? at 0x101b584a0>, <? at 0x101b584b0>, <list at 0x101b584d0>]

@cocolato
Copy link
Contributor Author

cocolato commented Feb 9, 2026

cc @Fidget-Spinner

@Fidget-Spinner
Copy link
Member

Can you please not re-use old issues that are already closed? It would be best to open a new issue or reopen the old issue. In this case, please open a new issue.

@cocolato
Copy link
Contributor Author

cocolato commented Feb 9, 2026

Thanks for reminding me, I'll create a new issue later.

@cocolato cocolato changed the title gh-143946: Fix missing output uops in optimizer debug output gh-144623: Fix missing output uops in optimizer debug output Feb 9, 2026
@cocolato
Copy link
Contributor Author

cocolato commented Feb 9, 2026

Updated

@Fidget-Spinner
Copy link
Member

The debugger is for internal use only, so we don't need a news entry. Please delete the file, thanks!

@Fidget-Spinner Fidget-Spinner merged commit 988286e into python:main Feb 9, 2026
67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants