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 2022/03/01 16:35:45 UTC
[GitHub] [tvm] Mousius opened a new pull request #10424: [AOT] Introduce checks for return values from operators
Mousius opened a new pull request #10424:
URL: https://github.com/apache/tvm/pull/10424
This matches the lowering of `call_cpacked` which checks only for an
operator return of `0` in the main flow:
https://github.com/apache/tvm/blob/bd14a4d36e0d364ef9bd34b2ee96cc09ce64d4b3/src/target/source/codegen_c_host.cc#L207-L231
This replaces:
```c
(void)tvmgen_default_fused_add(x_buffer_var, y_buffer_var, output_buffer_var);
```
with:
```c
if (tvmgen_default_fused_add(x_buffer_var, y_buffer_var, output_buffer_var) != 0 ) return -1;
```
when AOT generates the C output.
--
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 #10424: [AOT] Introduce checks for return values from operators
Posted by GitBox <gi...@apache.org>.
Mousius commented on a change in pull request #10424:
URL: https://github.com/apache/tvm/pull/10424#discussion_r822821490
##########
File path: src/relay/backend/aot_executor_codegen.cc
##########
@@ -333,6 +333,19 @@ class AOTExecutorCodegen : public MixedModeVisitor {
args->insert(args->end(), sids.begin(), sids.end());
}
+ /*
+ * Wraps a call_extern with a tvm_check_return annotation if required otherwise
+ * returns the passed Call
+ */
+ tir::Call WrapCall(tir::Call existing_call) {
Review comment:
This is a much better name, will fix immediately as the old name wasn't great :smile_cat:
--
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 #10424: [AOT] Introduce checks for return values from operators
Posted by GitBox <gi...@apache.org>.
manupa-arm commented on pull request #10424:
URL: https://github.com/apache/tvm/pull/10424#issuecomment-1063429313
Thanks!
--
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 merged pull request #10424: [AOT] Introduce checks for return values from operators
Posted by GitBox <gi...@apache.org>.
manupa-arm merged pull request #10424:
URL: https://github.com/apache/tvm/pull/10424
--
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 #10424: [AOT] Introduce checks for return values from operators
Posted by GitBox <gi...@apache.org>.
manupa-arm commented on a change in pull request #10424:
URL: https://github.com/apache/tvm/pull/10424#discussion_r822816091
##########
File path: src/relay/backend/aot_executor_codegen.cc
##########
@@ -333,6 +333,19 @@ class AOTExecutorCodegen : public MixedModeVisitor {
args->insert(args->end(), sids.begin(), sids.end());
}
+ /*
+ * Wraps a call_extern with a tvm_check_return annotation if required otherwise
+ * returns the passed Call
+ */
+ tir::Call WrapCall(tir::Call existing_call) {
Review comment:
nit : maybe something like AddCheckReturn ?
--
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