You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/07/04 16:25:12 UTC

[GitHub] [tvm-rfcs] gigiblender commented on pull request #84: [RFC] Name mangling in IRModules

gigiblender commented on PR #84:
URL: https://github.com/apache/tvm-rfcs/pull/84#issuecomment-1173984996

   > A couple of thoughts...
   > 
   >     * We should have a common facility that represents a scope in which names need to be unique.  Conceptually it could be a set of "known" strings (that are presumed used), and something (like a private counter) to generate a unique suffix.  The use would be `new_name = GenerateName("foo")`.  If `foo` had already been generated, `new_name` would be set to `"foo4"` (for example).  This should not produce global variables (or any IR objects), just names.
   >
   > 
   >     * This RFC still doesn't settle the question whether "name_hint" is a final name or not.  I'm open to requiring that global symbols are given final names from the beginning, not hints.
   
   Thanks for the comments @kparzysz-quic. I agree that we could have the `NameSupply` methods return Strings and make sure that `GlobalVars` are created using strings provided by a NameSupply (eventually one contained within the IRModule). This way, the `NameSupply` could be used for other name mangling scenarios where GlobalVars are not needed.
   
   Regarding the `name_hint` being a final name. I am too of this opinion (it should be a final name) and believe that it already works this way. If I am not wrong, the only edge case is where we use the `global_symbol` attribute instead.
   
   @mbs-octoml  @tqchen any thoughts? 
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org