Lunderberg commented on code in PR #16594:
URL: https://github.com/apache/tvm/pull/16594#discussion_r1499303688
##########
src/relax/transform/lift_transform_params.cc:
##########
@@ -37,405 +38,443 @@
namespace tvm {
namespace relax {
-/*! \brief Plan of lifting transform params */
-struct LiftTransformParamsInfoPlan {
- Function f_transform_params; // the lifted function that transforms the
parameters
- std::unordered_map<Var, int, ObjectPtrHash, ObjectPtrEqual>
- output_to_index; // the index of the original bindings in the output
tuple
- std::unordered_set<Var, ObjectPtrHash, ObjectPtrEqual>
- lifted_bindings; // the bindings of the original function that are
lifted
-};
+namespace {
-/*! \brief Builder of the function that transforms the parameters. */
-class TransformParamsFuncBuilder : public ExprMutator {
- public:
- TransformParamsFuncBuilder() { builder_->BeginDataflowBlock(); }
+struct CollectInfo {
+ /* \brief The analyzed function */
+ Function orig_func;
+
+ /* \brief The number of parameters unknown until runtime */
+ size_t num_runtime_params;
+
+ /*! \brief Bindings that can be lifted out into a pre-processing
+ *
+ * - All bindings in `liftable_bindings` are suitable for use in a
Review Comment:
Thank you, and that is exactly correct. I replaced all references, but
didn't grep the comments for spots that needed to be updated. Fixed.
--
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]