Skip to content

[PyTorch Debug] Fixed the empty tensor bug in statistics computation #1843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

pggPL
Copy link
Collaborator

@pggPL pggPL commented Jun 3, 2025

Description

I support the case when the forward is not called on some nodes. But it may happen that the forward is called on one node with tensor with numel=0. This resulted in a bug, which this PR fixes.

I also added some simple test.

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

pggPL and others added 2 commits June 3, 2025 10:40
@pggPL
Copy link
Collaborator Author

pggPL commented Jun 3, 2025

/te-ci pytorch L1

@pggPL
Copy link
Collaborator Author

pggPL commented Jun 9, 2025

/te-ci pytorch L1

timmoon10
timmoon10 previously approved these changes Jun 9, 2025
Signed-off-by: Pawel Gadzinski <[email protected]>
@pggPL
Copy link
Collaborator Author

pggPL commented Jun 11, 2025

/te-ci pytorch L1

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