Skip to content

[TVMScript] Infer T.reads() for DeclBuffer nodes - #16663

Merged
tqchen merged 1 commit into
apache:mainfrom
Lunderberg:tvmscript_infer_decl_buffer_access_region
Mar 4, 2024
Merged

tqchen merged 1 commit into
apache:mainfrom
Lunderberg:tvmscript_infer_decl_buffer_access_region

Conversation

@Lunderberg

Copy link
Copy Markdown
Contributor

Prior to this commit, the automatic T.reads() and T.writes() annotations were only generated for buffers appearing as function arguments, as T.alloc_buffer in a T.block, or as T.match_buffer in a T.block. However, inferred T.reads() for a buffer defined by the "tir.BindParams" pass would be erroneously missing. These annotations may be required for correct scheduling (see discussion in PR#16660).

This commit updates the TVMScript parsing to infer T.reads() and T.writes() annotations for buffers defined with DeclBuffer nodes.

@Lunderberg

Copy link
Copy Markdown
Contributor Author

@tvm-bot rerun

@github-actions

github-actions Bot commented Mar 1, 2024

Copy link
Copy Markdown
Contributor

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

Details
Traceback (most recent call last):
  File "ci/scripts/github/github_tvmbot.py", line 595, in comment_failure
    raise item
  File "ci/scripts/github/github_tvmbot.py", line 701, in run
    pr.rerun_jenkins_ci()
  File "ci/scripts/github/github_tvmbot.py", line 554, in rerun_jenkins_ci
    post(url, auth=("tvm-bot", TVM_BOT_JENKINS_TOKEN))
  File "/home/runner/work/tvm/tvm/ci/scripts/jenkins/git_utils.py", line 53, in post
    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 404: Not Found

with response

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404 Not Found</h2>
<table>
<tr><th>URI:</th><td>/job/tvm-arm/job/PR-16663/buildWithParameters</td></tr>
<tr><th>STATUS:</th><td>404</td></tr>
<tr><th>MESSAGE:</th><td>Not Found</td></tr>
<tr><th>SERVLET:</th><td>Stapler</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 10.0.11</a><hr/>

</body>
</html>

Prior to this commit, the automatic `T.reads()` and `T.writes()`
annotations were only generated for buffers appearing as function
arguments, as `T.alloc_buffer` in a `T.block`, or as `T.match_buffer`
in a `T.block`.  However, inferred `T.reads()` for a buffer defined by
the `"tir.BindParams"` pass would be erroneously missing.  These
annotations may be required for correct scheduling (see discussion in
[PR#16660](apache#16660)).

This commit updates the TVMScript parsing to infer `T.reads()` and
`T.writes()` annotations for buffers defined with `DeclBuffer` nodes.
@Lunderberg
Lunderberg force-pushed the tvmscript_infer_decl_buffer_access_region branch from 6784bf4 to b215657 Compare March 1, 2024 17:53
@tqchen
tqchen merged commit 31bb4b5 into apache:main Mar 4, 2024
@Lunderberg
Lunderberg deleted the tvmscript_infer_decl_buffer_access_region branch March 5, 2024 23:50
Lunderberg added a commit to Lunderberg/tvm that referenced this pull request Mar 12, 2024
Prior to this commit, the automatic `T.reads()` and `T.writes()`
annotations were only generated for buffers appearing as function
arguments, as `T.alloc_buffer` in a `T.block`, or as `T.match_buffer`
in a `T.block`.  However, inferred `T.reads()` for a buffer defined by
the `"tir.BindParams"` pass would be erroneously missing.  These
annotations may be required for correct scheduling (see discussion in
[PR#16660](apache#16660)).

This commit updates the TVMScript parsing to infer `T.reads()` and
`T.writes()` annotations for buffers defined with `DeclBuffer` nodes.
thaisacs pushed a commit to thaisacs/tvm that referenced this pull request Apr 3, 2024
Prior to this commit, the automatic `T.reads()` and `T.writes()`
annotations were only generated for buffers appearing as function
arguments, as `T.alloc_buffer` in a `T.block`, or as `T.match_buffer`
in a `T.block`.  However, inferred `T.reads()` for a buffer defined by
the `"tir.BindParams"` pass would be erroneously missing.  These
annotations may be required for correct scheduling (see discussion in
[PR#16660](apache#16660)).

This commit updates the TVMScript parsing to infer `T.reads()` and
`T.writes()` annotations for buffers defined with `DeclBuffer` nodes.
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