-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[Texture support][Part 1] TIR lowering and OpenCL support #7686
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
Merged
ZihengJiang
merged 59 commits into
apache:main
from
csullivan:texture2d/codegen_and_device_runtime
Aug 20, 2021
Merged
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
245ed1d
Add support for kTexture storage rank.
csullivan 9c09213
Add scaffolding for texture_flatten pass.
csullivan d76878c
Add scaffolding for texture allocation.
csullivan e7c276b
Implement 2d texture flattening to builtin tir.text2d_alloca.
csullivan bf321c9
Lower BufferStore/Load to builtin texture store/load.
csullivan 8afb611
Add vectorizable attribure to texture load and store.
csullivan 17ca755
Support auto-vectorization on the innermost (RGBA) axis.
csullivan 560baa9
Add read/write_imagef opencl codegen for builtin texture load/store.
csullivan 14806f5
Add TextureType support.
csullivan 0a321d1
Add InferTextureAccess pass to deduce __read_only
csullivan b96daaf
Implement texture allocation as external function in TIR lowering.
csullivan 83e9af3
Remove commented lines.
csullivan fd0d23a
Add nd->2d texture flattening.
csullivan 5645112
Bug fixes in opencl codegen (row<>col, access quals.)
csullivan 34549c7
Improve texture codegen by explicitly allocating local vector
csullivan 623f2eb
Remove automatic vectorization
csullivan 5f9ebd1
Improve SSA local use when storing texture read to scalar buffer.
csullivan d8fbcfd
Define texture flattening convention such
csullivan b81620f
Add tir lowering and opencl codegen support for float16 textures.
csullivan 557e07d
Disable SSA when texture load is immediately casted.
csullivan 19469c6
Allow RGBA extent to be of length 1.
csullivan 8b3b3de
Add pass to forward externally allocated textures
csullivan d7d3195
Add buffer_common.h to house buffer offset simplification routines.
csullivan 6be6e60
More refactor and clean up in texture lowering.
csullivan 48cf179
Add IsTextureType to tir and allow buffer
csullivan 91f00ee
Bug fix in texture access qualifier inference pass
csullivan 0ac0875
Step toward handling external texture buffer forwarding
csullivan 50d4ee5
[Part 2/3] Support texture:weight lowering convention for externally …
csullivan fba2d3f
Bug fix in texture access qualifier inference pass
csullivan 2fc4238
Tighten constraint on external buffer forwarding --
csullivan 384dad0
Use texture lowering convention from texture runtime util.
csullivan 3c1b122
Use updated texture lowering utilities
csullivan 137da36
Use inherited visitor overloads in texture flattener.
csullivan 5b6787e
Add check in codegen for float/half until
csullivan c839505
Rename tir texture builtins
csullivan 8041cc9
Remove codegen and tir runtime dependence on for TVMBackendAlloc/Free…
csullivan 684e513
Dispatch texture allocas via target specialized tir.tvm_call_packed
csullivan 069ec77
Remove kTexture scope and use kGlobal with texture tag.
csullivan 86bb2e6
Remove TextureType.
csullivan 3e17295
Remove TextureType from OpenCL codegen.
csullivan b3cdc52
Remove TextureType from TIR lowering.
csullivan 17b8808
Remove dependency on MergeMulMod.
csullivan c758eb9
Revert "Add buffer_common.h to house buffer offset simplification rou…
csullivan a794abd
Prune include list
csullivan 11fe640
Add more documentation to texture flattening.
csullivan 89d832f
Add TextureFlatten transform to refactored tvm lower API.
csullivan 349eb51
Apply clang formatting.
csullivan da3e146
Blacken python APIs.
csullivan b43e0e7
Apply cpplint changes.
csullivan 6138726
Attempt to extract storage scope from pointer scope.
csullivan bd084c0
Remove ExternalBufferForwarding (cache_read cancellation) for now.
csullivan d2f8bda
Apply MyPy.
csullivan b0ea283
Clang format
csullivan 1102731
Only visit RealizeBuffer body for texture storage.
csullivan 46ae5ab
Fix bad merge.
csullivan 9fa362d
Utilize OpenCL preprocessor to switch between
csullivan 213492c
Add texture codegen test example.
csullivan 7d76707
Refactor tests to use pytest parameterization.
csullivan 2903e53
Respond to CRs.
csullivan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does
restrictmean here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the no-aliasing qualifier for opencl kernels. A compiler hint that pointer aliasing does not occur among the restricted pointer arguments.