-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Lower cache_read and cache_write to Hexagon DMA via tensorize #10365
Conversation
HUGE thanks to @masahi who also contributed to this PR. |
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.
* Same semantics as memcpy(destination, source, size) | ||
* Allows for device specific implementations e.g. direct memory access (DMA) | ||
*/ | ||
TVM_DLL const Op& mem_copy(); |
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.
cc @tqchen @junrushao1994 if they want a better name 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.
Is it possible to make it more specific? We have a few examples above like texture2d_load/store. What about dma_mem_copy() or any hexagon-specific name?
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.
I was thinking about something with "DMA" in the name but I realized that DMA is more of an implementation detail. I ended up referencing DMA in the comments instead. Happy to take suggestions including dma_mem_copy
.
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.
I thought about:
mem_copy_local
(to emphasize the local nature of the intended usage, unlikeTVMArrayCopyFromTo
@junrushao1994 mentioned which might involve RPC)mem_copy_1d
(if we intend to add 2d rectangular memcpy later)
But both of them don't particularly sound better.
…#10365) * Lower cache_read and cache_write to Hexagon DMA via tensorize * rework test to be compatible with launcher * remove cpu device api mem_copy implementation and test
Adds support to lower
cache_read
andcache_write
schedule primitives to Hexagon User DMA usingtensorize
and newmem_copy
intrinsic.