masahi commented on code in PR #14507:
URL: https://github.com/apache/tvm/pull/14507#discussion_r1158243493


##########
include/tvm/ir/name_supply.h:
##########
@@ -54,9 +54,11 @@ class NameSupplyNode : public Object {
    * \brief Generates a unique name from this NameSupply.
    * \param name The name from which the generated name is derived.
    * \param add_prefix If set to true, then the prefix of this NameSupply will 
be prepended to the
-   * name. \return A unique name.
+   * name.
+   * \param add_underscore If set to true, add '_' between prefix and a digit.
+   * \return A unique name.
    */
-  String FreshName(const String& name, bool add_prefix = true);
+  String FreshName(const String& name, bool add_prefix = true, bool 
add_underscore = true);

Review Comment:
   This change is only for backward-compat according to the variable naming 
convention of `BlockBuilder` (`lv1` vs `lv_1`). `NameSupply` adds an underscore 
before a digit by default. 
   
   If we are ok with introducing such trivial variable naming change, I'm more 
than happy to remove this diff.



##########
include/tvm/ir/name_supply.h:
##########
@@ -54,9 +54,11 @@ class NameSupplyNode : public Object {
    * \brief Generates a unique name from this NameSupply.
    * \param name The name from which the generated name is derived.
    * \param add_prefix If set to true, then the prefix of this NameSupply will 
be prepended to the
-   * name. \return A unique name.
+   * name.
+   * \param add_underscore If set to true, add '_' between prefix and a digit.
+   * \return A unique name.
    */
-  String FreshName(const String& name, bool add_prefix = true);
+  String FreshName(const String& name, bool add_prefix = true, bool 
add_underscore = true);

Review Comment:
   This change is only for backward-compat purpose according to the variable 
naming convention of `BlockBuilder` (`lv1` vs `lv_1`). `NameSupply` adds an 
underscore before a digit by default. 
   
   If we are ok with introducing such trivial variable naming change, I'm more 
than happy to remove this diff.



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