[Hexagon][Runtime] Better support for 2-tier memory#12574
[Hexagon][Runtime] Better support for 2-tier memory#12574tmoreau89 merged 1 commit intoapache:mainfrom
Conversation
3e8a668 to
aa3355b
Compare
|
@Lunderberg @csullivan @kparzysz-quic : Heads up, this should be ready for review once CI passes. |
a01b450 to
eba609d
Compare
|
@csullivan @Lunderberg @adstraw @kparzysz-quic: Looking at the CI results, I suspect there's a non-trivial issue with some existing code that uses "global" scope. PR won't be ready for review until I look into that. |
|
This might need fixing: |
e3d059d to
99346e4
Compare
- Introduce 'global.ddr' memory scope:
- Like 'global', this allocates memory from the Hexagon SoC's
DDR memory.
- Like 'global.vtcm', the specified tensor shape must be 1d
or 2d, where 2d indicates Hexagon's "indirect tensor"
(i.e., discontiguous) allocation scheme.
- Change memory-alignment strategy to always be 2048-byte aligned
on Hexagon. (This can be refined in the future, but for now it
ensures all allocations meet the strictest alignment requirements
for any Hexagon operations.)
I discussed this via DM with @csullivan. His impression is that having supporting |
|
@csullivan @jverma-quic : request for review |
nverke
left a comment
There was a problem hiding this comment.
I like this change! It might have saved me from a bug that was pushed to mainline a few days ago.
Ship it!
| shape = tvm.testing.parameter((128, 128)) | ||
|
|
||
| (scope, axis_separators,) = tvm.testing.parameters( | ||
| ("global", []), |
There was a problem hiding this comment.
nit: Could add an xfail test for ("global", [1]) to indicate this expectation explicitly.
adstraw
left a comment
There was a problem hiding this comment.
LGTM, thanks for the clarifying comments.
|
Thank you @cconvey @csullivan @adstraw @nverke, the PR has been merged. |
- Introduce 'global.ddr' memory scope:
- Like 'global', this allocates memory from the Hexagon SoC's
DDR memory.
- Like 'global.vtcm', the specified tensor shape must be 1d
or 2d, where 2d indicates Hexagon's "indirect tensor"
(i.e., discontiguous) allocation scheme.
- Change memory-alignment strategy to always be 2048-byte aligned
on Hexagon. (This can be refined in the future, but for now it
ensures all allocations meet the strictest alignment requirements
for any Hexagon operations.)
[hexagon][runtime] better support for 2-tier memory
Introduce 'global.ddr' memory scope:
DDR memory.
or 2d, where 2d indicates Hexagon's "indirect tensor"
(i.e., discontiguous) allocation scheme.
Change memory-alignment strategy to always be 2048-byte aligned
on Hexagon. (This can be refined in the future, but for now it
ensures all allocations meet the strictest alignment requirements
for any Hexagon operations.)
cc @areusch @mehrdadh