jroesch commented on a change in pull request #8597:
URL: https://github.com/apache/tvm/pull/8597#discussion_r684524881



##########
File path: src/relay/backend/interpreter.cc
##########
@@ -283,251 +361,301 @@ class Interpreter : public ExprFunctor<ObjectRef(const 
Expr& n)>,
     return MakeClosure(func);
   }
 
-  Array<Shape> ComputeDynamicShape(const Function& func, const 
Array<ObjectRef>& args) {
-    CCacheKey key(func, Target("llvm"));
-    auto cfunc = compiler_->LowerShapeFunc(key);
-    size_t arity = cfunc->inputs.size() + cfunc->outputs.size();
+  /*!
+   * \brief Returns the packed function implementing the TIR function bound to 
\p tir_fn_var.
+   *
+   * \param tir_fn_var Global var for the already lowered TIR function.
+   * \param all_tir_fn_vars Global vars for all lowered TIR functions the above
+   * may reference, plus \p tir_fn_var itself.
+   * \param target Target for which the TIR function should be compiled. For 
primitives this
+   * will be the interpreter's target_. However for shape functions this will 
be the generic
+   * 'cpu' target, since shape functions are always executed on the host cpu.
+   */
+  PackedFunc TIRToPackedFunc(const GlobalVar& tir_fn_var, const 
Array<GlobalVar>& all_tir_fn_vars,

Review comment:
       Is this useful outside for the interpreter?




-- 
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]


Reply via email to