mbs-octoml commented on a change in pull request #9065:
URL: https://github.com/apache/tvm/pull/9065#discussion_r713373564
##########
File path: src/tir/transforms/lower_tvm_builtin.cc
##########
@@ -115,7 +115,8 @@ class BuiltinLower : public StmtExprMutator {
int64_t nbytes = GetVectorBytes(op->dtype);
if (device_type_.defined()) {
Review comment:
Could you put a comment here explaining this is a heuristic for leaving
small tensors on the stack but only for CPU and global scope. Thanks.
##########
File path: src/relay/backend/aot_executor_codegen.cc
##########
@@ -623,8 +623,13 @@ class AOTExecutorCodegen : public MixedModeVisitor {
// Define the storage allocator ids
for (auto kv : storage_device_map_) {
for (auto sid : kv.second->storage_ids) {
+ // The buffer_var is created with storage_scope to be global.workspace
to be serviced by
+ // TVMBAWs, explicitly. The reasoning being the executor allocates
should be serviced by
Review comment:
For poor folks like me: use TVMBackendAllocWorkspace at least once.
##########
File path: src/tir/transforms/storage_rewrite.cc
##########
@@ -478,6 +478,10 @@ class StoragePlanRewriter : public StmtExprMutator {
uint64_t bits_offset{0};
};
+ bool IsSpecialTaggedMemory(const StorageScope& scope) {
Review comment:
Comment please.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]