Skip to content

[Node] Allow alternative root names in ObjectPath::Root()#14569

Merged
tqchen merged 2 commits intoapache:mainfrom
Lunderberg:objectpath_custom_name_of_root_obj
Apr 12, 2023
Merged

[Node] Allow alternative root names in ObjectPath::Root()#14569
tqchen merged 2 commits intoapache:mainfrom
Lunderberg:objectpath_custom_name_of_root_obj

Conversation

@Lunderberg
Copy link
Copy Markdown
Contributor

Previously, the ObjectPath utility allowed tracking of an object's location within a tree-like structure. However, the base of the path structure was hard-coded to be the string <root>. For use cases such as StructuralEqual, there is a clear root node. However, other cases such as using ObjectPath to specify an object's location relative to a known variable, would require using that known variable's name as the root, rather than the hard-coded string <root>.

This commit adds an optional parameter to provide an alternative name for the root node, to allow for these use cases.

Previously, the `ObjectPath` utility allowed tracking of an object's
location within a tree-like structure.  However, the base of the path
structure was hard-coded to be the string `<root>`.  For use cases
such as `StructuralEqual`, there is a clear root node.  However, other
cases such as using `ObjectPath` to specify an object's location
relative to a known variable, would require using that known
variable's name as the root, rather than the hard-coded string
`<root>`.

This commit adds an optional parameter to provide an alternative name
for the root node, to allow for these use cases.
@tvm-bot
Copy link
Copy Markdown
Collaborator

tvm-bot commented Apr 10, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: node See #10317 for details

Generated by tvm-bot

@tqchen tqchen merged commit b4c1995 into apache:main Apr 12, 2023
@Lunderberg Lunderberg deleted the objectpath_custom_name_of_root_obj branch April 12, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants