Skip to content

Conversation

@adstraw
Copy link
Contributor

@adstraw adstraw commented Sep 30, 2022

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
Copy link
Contributor Author

adstraw commented Sep 30, 2022

CC @masahi

sched = tvm.testing.parameter("cache_read", "cache_read_write")


@tvm.testing.fixture
Copy link
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)?

Copy link
Contributor Author

@adstraw adstraw Oct 3, 2022

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.

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

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
Copy link
Contributor Author

adstraw commented Oct 3, 2022

@tvm-bot rerun

@tmoreau89 tmoreau89 merged commit 1ea1a0b into apache:main Oct 4, 2022
@tmoreau89
Copy link
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