Skip to content
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

[Hexagon] 2-Stage Pipeline; Lower Async TIR primitives to Hexagon User DMA #12785

Merged
merged 8 commits into from
Sep 20, 2022

Conversation

adstraw
Copy link
Contributor

@adstraw adstraw commented Sep 14, 2022

Creates a 2-stage pipeline (DMA, compute) by lowering Async TIR primitives (see RFC) with memory copy semantics to builtin functions for DMA Copy and Wait. These builtins can then be lowered through the device API, with example lowering on Hexagon to the HexagonUserDMA class. The example test case contained in this PR creates a 2 stage pipeline which lowers to the following TIR which is built and run on Hexagon.

src/tir/transforms/lower_async_dma.cc Show resolved Hide resolved
src/driver/driver_api.cc Outdated Show resolved Hide resolved
@TejashShah
Copy link

cc @kparzysz-quic @jverma-quic

@adstraw
Copy link
Contributor Author

adstraw commented Sep 16, 2022

@tvm-bot rerun

include/tvm/tir/builtin.h Show resolved Hide resolved
include/tvm/tir/builtin.h Show resolved Hide resolved
src/tir/transforms/lower_async_dma.cc Show resolved Hide resolved
src/tir/transforms/lower_async_dma.cc Outdated Show resolved Hide resolved
src/tir/transforms/lower_async_dma.cc Show resolved Hide resolved
src/tir/transforms/lower_async_dma.cc Outdated Show resolved Hide resolved
@adstraw adstraw requested review from masahi and JosephTheOctonaut and removed request for mehrdadh and masahi September 20, 2022 00:16
src/tir/transforms/lower_async_dma.cc Outdated Show resolved Hide resolved
@github-actions github-actions bot requested review from mehrdadh and removed request for JosephTheOctonaut September 20, 2022 15:31
@adstraw
Copy link
Contributor Author

adstraw commented Sep 20, 2022

@tvm-bot rerun

@github-actions
Copy link
Contributor

Failed to re-run CI in https://github.com/apache/tvm/actions/runs/3091706323

Traceback (most recent call last):
  File "/home/runner/work/tvm/tvm/ci/scripts/git_utils.py", line 121, in _request
    with request.urlopen(req, data) as response:
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "ci/scripts/github_tvmbot.py", line 574, in comment_failure
    raise item
  File "ci/scripts/github_tvmbot.py", line 685, in run
    pr.rerun_github_actions()
  File "ci/scripts/github_tvmbot.py", line 563, in rerun_github_actions
    raise e
  File "ci/scripts/github_tvmbot.py", line 555, in rerun_github_actions
    actions_github.post(f"actions/runs/{workflow_id}/rerun-failed-jobs", data={})
  File "/home/runner/work/tvm/tvm/ci/scripts/git_utils.py", line 143, in post
    return self._request(self.base + url, data, method="POST")
  File "/home/runner/work/tvm/tvm/ci/scripts/git_utils.py", line 126, in _request
    raise RuntimeError(f"Error response: {msg}\n{error_data}")
RuntimeError: Error response: HTTP Error 403: Forbidden
{"message":"This workflow is already running","documentation_url":"https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs"}

@tmoreau89 tmoreau89 merged commit 5dfa8da into apache:main Sep 20, 2022
@tmoreau89
Copy link
Contributor

Thanks @adstraw, @JosephTheOctonaut and @masahi for the PR and the reviews, the PR has been merged!

@adstraw adstraw deleted the straw-hexagon-2-stage-pipe branch September 22, 2022 16:54
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
…r DMA (apache#12785)

* [Hexagon] 2-Stage Pipeline; Lower Async TIR primitives to HexagonUserDMA

* save queue ID in `copy`, inspect in `wait` transform; add comments

* improve testing; parameters for shape, scope, dtype

* add log statements and adjust comments to clarify pass behavior

* generalize use_async_copy for pass enable

* use DLOG instead of LOG

* trigger ci

* trigger ci again
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.

5 participants