Skip to content

Conversation

pggPL
Copy link
Collaborator

@pggPL pggPL commented Aug 25, 2025

Description

In #1909 I introduced debug value caching, to prevent expensive cpu calls which used to determine if debug should be disabled. They do not work correctly with microbatching. This PR fixes that.

Fixes # (issue)

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Signed-off-by: Pawel Gadzinski <[email protected]>
@pggPL
Copy link
Collaborator Author

pggPL commented Aug 25, 2025

/te-ci pytorch

@@ -1460,7 +1460,13 @@ def is_debug_iter(self) -> bool:
debug = False
else:
debug = TEDebugState.get_iteration() >= self.next_iter_when_debug_should_be_run
self.debug_last_iteration = TEDebugState.get_iteration()
self.debug_last_iteration = TEDebugState.get_iteration()
self.debug_enabled_in_last_iteration = debug
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not call it then "debug_enabled_in_this_iteration"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point

@pggPL
Copy link
Collaborator Author

pggPL commented Sep 2, 2025

/te-ci pytorch

…ansformerEngine into nvinspect_fix_performance_issue
@pggPL
Copy link
Collaborator Author

pggPL commented Sep 2, 2025

/te-ci pytorch

1 similar comment
@pggPL
Copy link
Collaborator Author

pggPL commented Sep 15, 2025

/te-ci pytorch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants