You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by co...@apache.org on 2022/09/26 20:47:42 UTC

[tvm] branch fix_placeholder created (now 2677a7c536)

This is an automated email from the ASF dual-hosted git repository.

comaniac pushed a change to branch fix_placeholder
in repository https://gitbox.apache.org/repos/asf/tvm.git


      at 2677a7c536 [Relay][TE] Add default param name if needed

This branch includes the following new commits:

     new 2677a7c536 [Relay][TE] Add default param name if needed

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[tvm] 01/01: [Relay][TE] Add default param name if needed

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

comaniac pushed a commit to branch fix_placeholder
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 2677a7c536078595e28eb4f58b834ca940d50882
Author: Cody Yu <co...@gmail.com>
AuthorDate: Mon Sep 26 20:47:30 2022 +0000

    [Relay][TE] Add default param name if needed
---
 src/relay/backend/te_compiler_cache.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/relay/backend/te_compiler_cache.cc b/src/relay/backend/te_compiler_cache.cc
index 17eac443ff..6f55402bad 100644
--- a/src/relay/backend/te_compiler_cache.cc
+++ b/src/relay/backend/te_compiler_cache.cc
@@ -131,8 +131,9 @@ class LowerToTECompute : public backend::MemoizedExprTranslator<Array<te::Tensor
     for (Var param : relay_func->params) {
       Array<tvm::te::Tensor> inputs;
       for (const auto& ttype : FlattenTupleType(param->checked_type())) {
-        tvm::te::Tensor tensor =
-            tvm::te::placeholder(GetShape(ttype->shape), ttype->dtype, param->vid->name_hint);
+        auto name_hint = param->vid->name_hint;
+        tvm::te::Tensor tensor = tvm::te::placeholder(
+            GetShape(ttype->shape), ttype->dtype, (name_hint == "") ? "placeholder" : name_hint);
         inputs.push_back(tensor);
         fn_inputs_.push_back(tensor);
       }