Skip to content
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

Do not backpropagate through layers without gradient sources #2423

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

tbennun
Copy link
Contributor

@tbennun tbennun commented Feb 6, 2024

This PR tracks layers that do not need to be computed on backpropagation and skips those. Disable with LBANN_NO_BACKPROP_DISABLE=1.


// Second, check the layer itself. If frozen, backprop is not necessary.
if (l->is_frozen()) {
return true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@tbennun Is the sense of this flag inverted? the comment does not seem to match the boolean value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a mistake, thank you for noticing!

@tbennun tbennun requested review from benson31 and bvanessen February 7, 2024 01:48
@tbennun
Copy link
Contributor Author

tbennun commented Feb 7, 2024

Patch is ready and working

Copy link
Collaborator

@benson31 benson31 left a comment

Choose a reason for hiding this comment

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

friends are bugs. but so is bad performance. :shipit:

@bvanessen
Copy link
Collaborator

@tbennun Does it past CI?

@tbennun
Copy link
Contributor Author

tbennun commented Feb 9, 2024

Yes

@tbennun tbennun merged commit 32a761b into LLNL:develop Feb 12, 2024
1 check passed
@tbennun tbennun deleted the backprop-opt branch February 12, 2024 18:07
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.

3 participants