Skip to content

[nnc] Refactor generation of intrinsics to reduce the amount of macro-hell#51125

Closed
bertmaher wants to merge 7 commits intogh/bertmaher/57/basefrom
gh/bertmaher/57/head
Closed

[nnc] Refactor generation of intrinsics to reduce the amount of macro-hell#51125
bertmaher wants to merge 7 commits intogh/bertmaher/57/basefrom
gh/bertmaher/57/head

Conversation

@bertmaher
Copy link
Copy Markdown
Contributor

@bertmaher bertmaher commented Jan 26, 2021

Stack from ghstack:

The big pile of X-macros used for emitting (possibly vectorized)
intrinsics makes it really difficult to change that code in any systematic
way (which I'm about to do in a later diff).

We can factor most of what the macro does into a fairly simple function. There
are still macros but they're just a bunch of case/call helper/break
boilerplate.

Differential Revision: D26078384

…-hell

The big pile of X-macros used for emitting (possibly vectorized)
intrinsics makes it **really** difficult to change that code in any systematic
way (which I'm about to do in a later diff).

We can factor most of what the macro does into a fairly simple function.  There
are still macros but they're just a bunch of case/call helper/break
boilerplate.

Differential Revision: [D26078384](https://our.internmc.facebook.com/intern/diff/D26078384/)

[ghstack-poisoned]
@facebook-github-bot facebook-github-bot added cla signed oncall: jit Add this issue/PR to JIT oncall triage queue labels Jan 26, 2021
@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Jan 26, 2021

💊 CI failures summary and remediations

As of commit 2e9b866 (more details on the Dr. CI page):


  • 1/1 failures introduced in this PR

1 failure not recognized by patterns:

Job Step Action
CircleCI pytorch_linux_xenial_py3_6_gcc5_4_test Run tests 🔁 rerun

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

…nt of macro-hell"

The big pile of X-macros used for emitting (possibly vectorized)
intrinsics makes it **really** difficult to change that code in any systematic
way (which I'm about to do in a later diff).

We can factor most of what the macro does into a fairly simple function.  There
are still macros but they're just a bunch of case/call helper/break
boilerplate.

Differential Revision: [D26078384](https://our.internmc.facebook.com/intern/diff/D26078384/)

[ghstack-poisoned]
bertmaher added a commit that referenced this pull request Jan 26, 2021
…-hell

Pull Request resolved: #51125

The big pile of X-macros used for emitting (possibly vectorized)
intrinsics makes it **really** difficult to change that code in any systematic
way (which I'm about to do in a later diff).

We can factor most of what the macro does into a fairly simple function.  There
are still macros but they're just a bunch of case/call helper/break
boilerplate.
ghstack-source-id: 120425678

Differential Revision: [D26078384](https://our.internmc.facebook.com/intern/diff/D26078384/)
…nt of macro-hell"

The big pile of X-macros used for emitting (possibly vectorized)
intrinsics makes it **really** difficult to change that code in any systematic
way (which I'm about to do in a later diff).

We can factor most of what the macro does into a fairly simple function.  There
are still macros but they're just a bunch of case/call helper/break
boilerplate.

Differential Revision: [D26078384](https://our.internmc.facebook.com/intern/diff/D26078384/)

[ghstack-poisoned]
…nt of macro-hell"

The big pile of X-macros used for emitting (possibly vectorized)
intrinsics makes it **really** difficult to change that code in any systematic
way (which I'm about to do in a later diff).

We can factor most of what the macro does into a fairly simple function.  There
are still macros but they're just a bunch of case/call helper/break
boilerplate.

Differential Revision: [D26078384](https://our.internmc.facebook.com/intern/diff/D26078384/)

[ghstack-poisoned]
…ing on "[nnc] Refactor generation of intrinsics to reduce the amount of macro-hell"

The big pile of X-macros used for emitting (possibly vectorized)
intrinsics makes it **really** difficult to change that code in any systematic
way (which I'm about to do in a later diff).

We can factor most of what the macro does into a fairly simple function.  There
are still macros but they're just a bunch of case/call helper/break
boilerplate.

Differential Revision: [D26078384](https://our.internmc.facebook.com/intern/diff/D26078384/)

[ghstack-poisoned]
Copy link
Copy Markdown

@ZolotukhinM ZolotukhinM left a comment

Choose a reason for hiding this comment

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

Awesome, looks much cleaner now! I didn't check the logic assuming it stays the same.

…nt of macro-hell"

The big pile of X-macros used for emitting (possibly vectorized)
intrinsics makes it **really** difficult to change that code in any systematic
way (which I'm about to do in a later diff).

We can factor most of what the macro does into a fairly simple function.  There
are still macros but they're just a bunch of case/call helper/break
boilerplate.

Differential Revision: [D26078384](https://our.internmc.facebook.com/intern/diff/D26078384/)

[ghstack-poisoned]
… Refactor generation of intrinsics to reduce the amount of macro-hell"

The big pile of X-macros used for emitting (possibly vectorized)
intrinsics makes it **really** difficult to change that code in any systematic
way (which I'm about to do in a later diff).

We can factor most of what the macro does into a fairly simple function.  There
are still macros but they're just a bunch of case/call helper/break
boilerplate.

Differential Revision: [D26078384](https://our.internmc.facebook.com/intern/diff/D26078384/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 1114fd6.

@facebook-github-bot facebook-github-bot deleted the gh/bertmaher/57/head branch February 1, 2021 15:19
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
…-hell (pytorch#51125)

Summary:
Pull Request resolved: pytorch#51125

The big pile of X-macros used for emitting (possibly vectorized)
intrinsics makes it **really** difficult to change that code in any systematic
way (which I'm about to do in a later diff).

We can factor most of what the macro does into a fairly simple function.  There
are still macros but they're just a bunch of case/call helper/break
boilerplate.
ghstack-source-id: 120614089

Test Plan: `buck test mode/opt -c python.package_style=inplace //caffe2/benchmarks/cpp/tensorexpr:bench_ops`

Reviewed By: ZolotukhinM

Differential Revision: D26078384

fbshipit-source-id: 843548033f73d88c5d9a031c285b92f73be21390
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants