tqchen commented on a change in pull request #7829:
URL: https://github.com/apache/tvm/pull/7829#discussion_r612043653
##########
File path: src/tir/ir/script/script_complete.cc
##########
@@ -76,8 +76,15 @@ class ScriptCompleter : public StmtMutator {
for (const auto& alloc_buffer : op->alloc_buffers) {
buffer_var_map_->erase(alloc_buffer->data);
}
+ // Get access detection mask
+ // 0 for provided region, 1 and 3 for need detect read, 2 and 3 for need
detect write
+ int mask = 0;
+ auto it = op->annotations.find(attr::script_parsing_detect_access);
+ if (it != op->annotations.end()) {
+ mask = Downcast<IntImm>((*it).second)->value;
+ }
// ignore root block or blocks which already has reads/writes regions
- if (block->reads.empty() || block->writes.empty()) {
+ if (mask != 0) {
Review comment:
The reason being the that the reads/write empty may not be a good
indicator(since user might indicated the reads write being empty explicitly)
and we need requests from the parser side.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]