Skip to content

Commit

Permalink
fixup! Stack-allocate DLTensor instances when necessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
areusch committed Jan 5, 2022
1 parent b16f605 commit 94bcb1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/relay/backend/aot_executor_codegen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,11 @@ class AOTExecutorCodegen : public MixedModeVisitor {
Integer workspace_byte_alignment =
executor_config->GetAttr<Integer>("workspace-byte-alignment").value_or(16);
use_unpacked_api_ = executor_config->GetAttr<Bool>("unpacked-api").value_or(Bool(false));
use_call_cpacked_ = Bool(interface_api == "c");
use_call_cpacked_ =
(Bool(interface_api == "c") ||
// for now, C runtime does not support calling functions on other devices. therefore,
// opt to call PackedFunc directly by name rather than TVMBackendGetFuncFromEnv.
runtime_config->name == kTvmRuntimeCrt);

// Validate choice of use_unpacked_api_ and use_call_cpacked_
if (runtime_config->name == kTvmRuntimeCrt) {
Expand Down

0 comments on commit 94bcb1c

Please sign in to comment.