Skip to content

[Hexagon] 3-stage pipeline; multi queue async DMA for cache read / write#12954

Merged
tmoreau89 merged 2 commits into
apache:mainfrom
adstraw:straw-hexagon-3-stage-pipe
Oct 4, 2022
Merged

[Hexagon] 3-stage pipeline; multi queue async DMA for cache read / write#12954
tmoreau89 merged 2 commits into
apache:mainfrom
adstraw:straw-hexagon-3-stage-pipe

Conversation

@adstraw

@adstraw adstraw commented Sep 30, 2022

Copy link
Copy Markdown
Contributor

Add HexagonUserDMA support for multiple virtual queues which enables Async DMA for both cache_read and cache_write while maintaining a single descriptor chain to maintain overall FIFO ordering between virtual queues. Tested with runtime unit tests and at the python level for a simple operator.

@adstraw

adstraw commented Sep 30, 2022

Copy link
Copy Markdown
Contributor Author

CC @masahi

Comment thread tests/python/contrib/test_hexagon/test_software_pipeline_async.py
Comment thread tests/python/contrib/test_hexagon/test_software_pipeline_async.py
sched = tvm.testing.parameter("cache_read", "cache_read_write")


@tvm.testing.fixture

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With this PR, we could technically test any n-stage pipeline, correct (doesn't have to be limited to 3-stage)?

@adstraw adstraw Oct 3, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correct. This allows for any number of cache_read and cache_write stages to be lowered using Async DMA on Hexagon. Note that there is a known issue when trying to do cache_read for an op with multiple inputs in the same stage which will be addressed in a future PR. Future PR will modify compute on this test to be a + b instead of a + 1 and add support to lower cache_read of both a and b in the same stage to Async DMA.

@tmoreau89 tmoreau89 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR Adam, LGTM (left a few nits)

@adstraw

adstraw commented Oct 3, 2022

Copy link
Copy Markdown
Contributor Author

@tvm-bot rerun

@tmoreau89 tmoreau89 merged commit 1ea1a0b into apache:main Oct 4, 2022
@tmoreau89

Copy link
Copy Markdown
Contributor

Thanks @adstraw , the PR has been merged

@adstraw adstraw deleted the straw-hexagon-3-stage-pipe branch October 5, 2022 00:22
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
…ite (apache#12954)

* [Hexagon] 3-stage pipeline; multi queue async DMA for cache rd / wr

* add cache_write (no cache_read) schedule to python test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants