Skip to content

Optimize if-statements with if-constexpr #4022

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

Closed
wants to merge 1 commit into from

Conversation

q10
Copy link
Contributor

@q10 q10 commented Apr 25, 2025

Summary:

  • Replace if-statements with if-constexpr blocks to optimize out some code
    branches completely. This is to facilitate WeightRow class cleanups

  • Replace uses of WeightRow with WeightRowAccessor where cache loading and
    eviction are not used

Differential Revision: D73678501

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73678501

Copy link

netlify bot commented Apr 25, 2025

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit eff548e
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/680fdd891241b20008f3b111
😎 Deploy Preview https://deploy-preview-4022--pytorch-fbgemm-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

q10 added a commit to q10/FBGEMM that referenced this pull request Apr 25, 2025
Summary:

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Differential Revision: D73678501
q10 added a commit to q10/FBGEMM that referenced this pull request Apr 25, 2025
Summary:

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Differential Revision: D73678501
q10 added a commit to q10/FBGEMM that referenced this pull request Apr 25, 2025
Summary:

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Differential Revision: D73678501
q10 added a commit to q10/FBGEMM that referenced this pull request Apr 25, 2025
Summary:

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Differential Revision: D73678501
q10 added a commit to q10/FBGEMM that referenced this pull request Apr 25, 2025
Summary:

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Differential Revision: D73678501
q10 added a commit to q10/FBGEMM that referenced this pull request Apr 25, 2025
Summary:

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Differential Revision: D73678501
q10 added a commit to q10/FBGEMM that referenced this pull request Apr 25, 2025
Summary:

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Differential Revision: D73678501
q10 added a commit to q10/FBGEMM that referenced this pull request Apr 25, 2025
Summary:

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Differential Revision: D73678501
@q10 q10 force-pushed the export-D73678501 branch from a895515 to 2281d59 Compare April 28, 2025 19:46
q10 added a commit to q10/FBGEMM that referenced this pull request Apr 28, 2025
Summary:

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Reviewed By: sryap, spcyppt

Differential Revision: D73678501
q10 added a commit to q10/FBGEMM that referenced this pull request Apr 28, 2025
Summary:

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Reviewed By: sryap, spcyppt

Differential Revision: D73678501
@q10 q10 force-pushed the export-D73678501 branch from 2281d59 to 6a208f7 Compare April 28, 2025 19:47
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73678501

q10 added a commit to q10/FBGEMM that referenced this pull request Apr 28, 2025
Summary:
Pull Request resolved: pytorch#4022

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Reviewed By: sryap, spcyppt

Differential Revision: D73678501
@q10 q10 force-pushed the export-D73678501 branch from 6a208f7 to 9d82d2f Compare April 28, 2025 19:49
Summary:
X-link: facebookresearch/FBGEMM#1110

Pull Request resolved: pytorch#4022

- Replace if-statements with if-constexpr blocks to optimize out some code
  branches completely.  This is to facilitate `WeightRow` class cleanups

- Replace uses of WeightRow with WeightRowAccessor where cache loading and
  eviction are not used

Reviewed By: sryap, spcyppt

Differential Revision: D73678501
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73678501

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in a0ec2bb.

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