You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/09/30 19:07:12 UTC
[GitHub] [tvm] manupa-arm opened a new pull request #9168: Adding annotation for tir.allocate
manupa-arm opened a new pull request #9168:
URL: https://github.com/apache/tvm/pull/9168
This commit is adding annotations for tir.allocate node to be used as hints for future transformations.
Please refer to the discussion : https://github.com/apache/tvm-rfcs/pull/23
cc: @tqchen @junrushao1994 @areusch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] manupa-arm commented on a change in pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
manupa-arm commented on a change in pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#discussion_r722102627
##########
File path: include/tvm/tir/stmt.h
##########
@@ -817,9 +827,7 @@ class ForNode : public StmtNode {
* \brief Additional annotations about the loop.
*
* These annotations can be used as auxiliary hint
- * to future transformations. An annotation should
- * not change the control flow semantics of the loop
- * and can be ignored in most passes.
+ * to future transformations.
Review comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] manupa-arm commented on pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
manupa-arm commented on pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#issuecomment-937754830
@vinx13 @Hzfengsy merge?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] Mousius commented on a change in pull request #9168: Adding annotation for tir.allocate
Posted by GitBox <gi...@apache.org>.
Mousius commented on a change in pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#discussion_r719694491
##########
File path: python/tvm/tir/stmt.py
##########
@@ -318,13 +318,23 @@ class Allocate(Stmt):
body : Stmt
The body statement.
+ annotations: Optional[Mapping[str, Object]]
+ Additional annotation hints
+
span : Optional[Span]
The location of this itervar in the source code.
"""
- def __init__(self, buffer_var, dtype, extents, condition, body, span=None):
+ def __init__(self, buffer_var, dtype, extents, condition, body, annotations=None, span=None):
self.__init_handle_by_constructor__(
- _ffi_api.Allocate, buffer_var, dtype, extents, condition, body, span # type: ignore
+ _ffi_api.Allocate,
+ buffer_var,
+ dtype,
+ extents,
+ condition,
+ body,
+ annotations,
+ span, # type: ignore
Review comment:
I think this `# type: ignore` belongs with `_ffi_api.Allocate` as it's unreachable by `mypy`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] manupa-arm commented on a change in pull request #9168: Adding annotation for tir.allocate
Posted by GitBox <gi...@apache.org>.
manupa-arm commented on a change in pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#discussion_r720202609
##########
File path: python/tvm/tir/stmt.py
##########
@@ -318,13 +318,23 @@ class Allocate(Stmt):
body : Stmt
The body statement.
+ annotations: Optional[Mapping[str, Object]]
+ Additional annotation hints
+
span : Optional[Span]
The location of this itervar in the source code.
"""
- def __init__(self, buffer_var, dtype, extents, condition, body, span=None):
+ def __init__(self, buffer_var, dtype, extents, condition, body, annotations=None, span=None):
self.__init_handle_by_constructor__(
- _ffi_api.Allocate, buffer_var, dtype, extents, condition, body, span # type: ignore
+ _ffi_api.Allocate,
+ buffer_var,
+ dtype,
+ extents,
+ condition,
+ body,
+ annotations,
+ span, # type: ignore
Review comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] Hzfengsy commented on pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
Hzfengsy commented on pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#issuecomment-937757339
Sorry for the late response. Thanks @manupa-arm.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] manupa-arm commented on pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
manupa-arm commented on pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#issuecomment-934276755
Thanks @vinx13 .
I have addressed them now, PTAL.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] manupa-arm commented on pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
manupa-arm commented on pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#issuecomment-937754830
@vinx13 @Hzfengsy merge?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] Hzfengsy commented on pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
Hzfengsy commented on pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#issuecomment-937757339
Sorry for the late response. Thanks @manupa-arm.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] manupa-arm commented on a change in pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
manupa-arm commented on a change in pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#discussion_r722102716
##########
File path: include/tvm/tir/stmt.h
##########
@@ -521,20 +521,28 @@ class AllocateNode : public StmtNode {
PrimExpr condition;
/*! \brief The body to be executed. */
Stmt body;
+ /*!
+ * \brief Additional annotations about the loop.
Review comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] manupa-arm commented on pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
manupa-arm commented on pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#issuecomment-935927068
@Hzfengsy thanks for the review!
I think I've done the necessary changes now. PTAL.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] Hzfengsy commented on pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
Hzfengsy commented on pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#issuecomment-934340933
Please also update the three printers:
https://github.com/apache/tvm/blob/d9a5ff576f4e71694aa5c424e46b7184a97a4b2d/src/tir/ir/stmt.cc#L385
https://github.com/apache/tvm/blob/d9a5ff576f4e71694aa5c424e46b7184a97a4b2d/src/printer/tvmscript_printer.cc#L762
https://github.com/apache/tvm/blob/d9a5ff576f4e71694aa5c424e46b7184a97a4b2d/src/printer/tir_text_printer.cc#L449
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] vinx13 commented on a change in pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
vinx13 commented on a change in pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#discussion_r721830600
##########
File path: include/tvm/tir/stmt.h
##########
@@ -817,9 +827,7 @@ class ForNode : public StmtNode {
* \brief Additional annotations about the loop.
*
* These annotations can be used as auxiliary hint
- * to future transformations. An annotation should
- * not change the control flow semantics of the loop
- * and can be ignored in most passes.
+ * to future transformations.
Review comment:
this change is unrelated?
##########
File path: include/tvm/tir/stmt.h
##########
@@ -521,20 +521,28 @@ class AllocateNode : public StmtNode {
PrimExpr condition;
/*! \brief The body to be executed. */
Stmt body;
+ /*!
+ * \brief Additional annotations about the loop.
Review comment:
```suggestion
* \brief Additional annotations about the allocation.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] Hzfengsy merged pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
Hzfengsy merged pull request #9168:
URL: https://github.com/apache/tvm/pull/9168
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] Hzfengsy merged pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
Hzfengsy merged pull request #9168:
URL: https://github.com/apache/tvm/pull/9168
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] areusch commented on pull request #9168: Adding annotations for tir.allocate
Posted by GitBox <gi...@apache.org>.
areusch commented on pull request #9168:
URL: https://github.com/apache/tvm/pull/9168#issuecomment-933908410
please tag the tracking issue @manupa-arm
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org