-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TVMScript] Optionally output the address as part of variable names
When debugging IRModule transformations, it can be useful to know the exact C++ address of an object. For example, to determine whether an undefined TIR variable was caused by erroneous insertion of a new variable, or from failing to remove a previous variable. While TVMScript does de-duplicate all names within a single print statement, there isn't a convenient way to identify which variable in TVMScript corresponds to a specific variable in C++ logging statements. This commit adds `show_object_address` to the `PrinterConfig`. If false (the default), no change is made to the TVMScript variable names. If true, the address of the C++ object is appended to the variable name. For example, printing a `tir.Var('my_name','int64')` as `"my_name_0x1234abcd"`.
- Loading branch information
1 parent
fba10d7
commit 3827ac1
Showing
5 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters