mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[Dynamo][Logging]Fix regression on stack adding to latest bytecode by… (#165946)
… adding verbose check (#165926) [ghstack-poisoned] Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/165946 Approved by: https://github.com/williamwen42
This commit is contained in:
parent
2c851c16e5
commit
6038e476e8
|
|
@ -1363,14 +1363,15 @@ class InstructionTranslatorBase(
|
||||||
|
|
||||||
# Store the latest 20 bytecode execution for the process,
|
# Store the latest 20 bytecode execution for the process,
|
||||||
# Used repr for byte processing and limiting the length to 2048
|
# Used repr for byte processing and limiting the length to 2048
|
||||||
try:
|
if config.verbose:
|
||||||
stack_repr = repr(self.stack)
|
try:
|
||||||
except ValueError:
|
stack_repr = repr(self.stack)
|
||||||
# Handle large integers that exceed sys.int_info.str_digits_check_threshold
|
except ValueError:
|
||||||
stack_repr = "<self.stack repr truncated due to large integer>"
|
# Handle large integers that exceed sys.int_info.str_digits_check_threshold
|
||||||
self.latest_bytecode_queue.append(
|
stack_repr = "<self.stack repr truncated due to large integer>"
|
||||||
f"TRACE {inst.opname} {repr(inst.argval)} {stack_repr}"
|
self.latest_bytecode_queue.append(
|
||||||
)
|
f"TRACE {inst.opname} {repr(inst.argval)} {stack_repr}"
|
||||||
|
)
|
||||||
|
|
||||||
self.update_block_stack(inst)
|
self.update_block_stack(inst)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user