Name supplies usually have both a cache lookup:
```
name_supply.UniqueGlobalFor("__main__")
```
and a hinted fresh name generator:
```
name_supply.FreshGlobalWithPrefix("my_module", "my_var", "any_other_prefix")
```
---
[Visit
Topic](https://discuss.tvm.apache.org/t/pre-rfc-name-mangling-i
> How would we enforce this fixed global symbol? Also from name supply?
When a function need to fix a global name, it will attach an attr
"global_symbol" with the name. That attr can be used say by BYOC to pick a
name, attach the global symbol, so followup passes respect that constraint.
We c
[quote="mbs-octoml, post:6, topic:12944"]
Other than the plumbing, is there an issue with threading a name supply so that
globals have a unique and appropriately hinted name at birth?
[/quote]
One question in my mind is: there are some names which must be stable e.g.
`__main__`, `get_c_metadat
[quote="mbs-octoml, post:6, topic:12944"]
(While doing this we could also ensure names begin in GlobalVar form instead of
String form, since the latter causes multiple GlobalVars to be created with the
same name
[/quote]
Indeed the `name_hint` field in GlobalVar is supposed to work for that
p
Other than the plumbing, is there an issue with threading a name supply so that
globals have a unique and appropriately hinted name at birth? It's not too hard
to support name supply splitting such that names can be drawn from independent
supplies without collision. It is also possible to refi
i agree with that direction, but I think to do that requires us to merge the
IRModules so that mangling transforms are applied globally rather than to just
a part of the program. do you agree?
---
[Visit
Topic](https://discuss.tvm.apache.org/t/pre-rfc-name-mangling-in-irmodules/12944/5)
Agree that mangling should be deferred as long as possible. I think the keys is
not to push all mangling to a certain stage, but have a clear spec about what
can be mangled, and what cannot
---
[Visit
Topic](https://discuss.tvm.apache.org/t/pre-rfc-name-mangling-in-irmodules/12944/4)
to
One related thing was that we intended to consolidate all of the different
functions into one IRModule (e.g. those passed to external codegen with those
passed to ordinary TVM codegen). If we had done that, we could probably do the
following:
- If a Relay-to-Runtime hook is used, find a way t
This is somewhat related to linkage itself.
Specifically, depending on the progress of lowering, there can be a need to
decide on name earlier if some of the external codegen involved(e.g. BYOC that
pre-decides on "global_symbol" of the name, or user specifies that they would
like to "lock"
Hi all,
In [[mini-RFC] Name mangling in
AOT](https://discuss.tvm.apache.org/t/mini-rfc-name-mangling-in-aot/9907), we
discussed ways to accommodate the `runtime::Module` tree in an embedded
environment, where we prefer to call functions directly in the generated C
using their symbol name rat
10 matches
Mail list logo