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

[nnc] Disable opaque pointers mode in LLVM backend to allow getPointerElementType #88798

Closed
wants to merge 5 commits into from

Conversation

bertmaher
Copy link
Contributor

@bertmaher bertmaher commented Nov 10, 2022

Stack from ghstack (oldest at bottom):

As of LLVM 15 typed pointers are going away:
https://llvm.org/docs/OpaquePointers.html. Thus
getPointerElementType is no longer legal, since pointers are all
opaque. I don't totally remember why we use it so prolifically, or
whether there's an easy change to get rid of it, or whether we'd need
a significant refactor to carry around Types alongside Values.

But in any case, NNC is deprecated (see: TorchInductor) and will
hopefully be gone before LLVM 16 is a thing. For now, we can apply
the hack of turning off opaque pointer mode on the LLVMContext.

Differential Revision: D41176215

cc @EikanWang @jgong5

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 10, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/88798

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 482760c:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: jit release notes category label Nov 10, 2022
bertmaher added a commit that referenced this pull request Nov 10, 2022
…rElementType

ghstack-source-id: 350c13e8803a507fb8251251d28f79ef90bc14f6
Pull Request resolved: #88798
@github-actions github-actions bot added the NNC label Nov 10, 2022
…w getPointerElementType"

cc EikanWang jgong5

[ghstack-poisoned]
bertmaher added a commit that referenced this pull request Nov 10, 2022
…rElementType

ghstack-source-id: 6cfba69f27c320f1ac99b673e423131ae9741da4
Pull Request resolved: #88798
bertmaher added a commit that referenced this pull request Nov 10, 2022
…rElementType

ghstack-source-id: 6cfba69f27c320f1ac99b673e423131ae9741da4
Pull Request resolved: #88798
…w getPointerElementType"

As of LLVM 15 typed pointers are going away:
https://llvm.org/docs/OpaquePointers.html.  Thus
`getPointerElementType` is no longer legal, since pointers are all
opaque.  I don't totally remember why we use it so prolifically, or
whether there's an easy change to get rid of it, or whether we'd need
a significant refactor to carry around `Type`s alongside `Value`s.

But in any case, NNC is deprecated (see: TorchInductor) and will
hopefully be gone before LLVM 16 is a thing.  For now, we can apply
the hack of turning off opaque pointer mode on the LLVMContext.

[ghstack-poisoned]
bertmaher added a commit that referenced this pull request Nov 10, 2022
…rElementType

As of LLVM 15 typed pointers are going away:
https://llvm.org/docs/OpaquePointers.html.  Thus
`getPointerElementType` is no longer legal, since pointers are all
opaque.  I don't totally remember why we use it so prolifically, or
whether there's an easy change to get rid of it, or whether we'd need
a significant refactor to carry around `Type`s alongside `Value`s.

But in any case, NNC is deprecated (see: TorchInductor) and will
hopefully be gone before LLVM 16 is a thing.  For now, we can apply
the hack of turning off opaque pointer mode on the LLVMContext.

ghstack-source-id: 6cfba69f27c320f1ac99b673e423131ae9741da4
Pull Request resolved: #88798
…w getPointerElementType"

As of LLVM 15 typed pointers are going away:
https://llvm.org/docs/OpaquePointers.html.  Thus
`getPointerElementType` is no longer legal, since pointers are all
opaque.  I don't totally remember why we use it so prolifically, or
whether there's an easy change to get rid of it, or whether we'd need
a significant refactor to carry around `Type`s alongside `Value`s.

But in any case, NNC is deprecated (see: TorchInductor) and will
hopefully be gone before LLVM 16 is a thing.  For now, we can apply
the hack of turning off opaque pointer mode on the LLVMContext.

[ghstack-poisoned]
bertmaher added a commit that referenced this pull request Nov 10, 2022
…rElementType

As of LLVM 15 typed pointers are going away:
https://llvm.org/docs/OpaquePointers.html.  Thus
`getPointerElementType` is no longer legal, since pointers are all
opaque.  I don't totally remember why we use it so prolifically, or
whether there's an easy change to get rid of it, or whether we'd need
a significant refactor to carry around `Type`s alongside `Value`s.

But in any case, NNC is deprecated (see: TorchInductor) and will
hopefully be gone before LLVM 16 is a thing.  For now, we can apply
the hack of turning off opaque pointer mode on the LLVMContext.

ghstack-source-id: 6cfba69f27c320f1ac99b673e423131ae9741da4
Pull Request resolved: #88798
@bertmaher
Copy link
Contributor Author

@bertmaher has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@bertmaher
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 10, 2022
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
…rElementType (pytorch#88798)

As of LLVM 15 typed pointers are going away:
https://llvm.org/docs/OpaquePointers.html.  Thus
`getPointerElementType` is no longer legal, since pointers are all
opaque.  I don't totally remember why we use it so prolifically, or
whether there's an easy change to get rid of it, or whether we'd need
a significant refactor to carry around `Type`s alongside `Value`s.

But in any case, NNC is deprecated (see: TorchInductor) and will
hopefully be gone before LLVM 16 is a thing.  For now, we can apply
the hack of turning off opaque pointer mode on the LLVMContext.

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

Pull Request resolved: pytorch#88798
Approved by: https://github.com/desertfire
pruthvistony pushed a commit to ROCm/pytorch that referenced this pull request Mar 10, 2023
…rElementType (pytorch#88798)

As of LLVM 15 typed pointers are going away:
https://llvm.org/docs/OpaquePointers.html.  Thus
`getPointerElementType` is no longer legal, since pointers are all
opaque.  I don't totally remember why we use it so prolifically, or
whether there's an easy change to get rid of it, or whether we'd need
a significant refactor to carry around `Type`s alongside `Value`s.

But in any case, NNC is deprecated (see: TorchInductor) and will
hopefully be gone before LLVM 16 is a thing.  For now, we can apply
the hack of turning off opaque pointer mode on the LLVMContext.

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

Pull Request resolved: pytorch#88798
Approved by: https://github.com/desertfire
@facebook-github-bot facebook-github-bot deleted the gh/bertmaher/175/head branch June 8, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged NNC release notes: jit release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants