-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BYOC] Allow custom codegens to register their own constant updater #6697
Conversation
It seems the custom updater I registered in the test persists between tests in CI and causes failures. Is there a way to unregister a function? @tqchen |
this is because pytest will run all testcases together, remove a global func exist in c++ API https://github.com/apache/incubator-tvm/blob/main/src/runtime/registry.cc#L77 we could expose that as a PackedFunc in tvm._ffi.remove_global_func(name) |
Currently, all codegens using BYOC must make use of the default ConstantUpdater pass. However, certain codegens, like Ethos-N, don't want to store any constants in metadata module. This provides an interface (via a global) to register a custom constant updating method and assigns a 'null' updater for the Ethos-N codegen. Change-Id: Ibd71d3091f992362eeede5d894eedb373b2dbc8f
Change-Id: I0ade81af9002d413c5b20a50488018e8cd8d8bad
Change-Id: Iea9ee0f689683512fa114afeadeccb7fc9048e4f
Change-Id: I8009940bb2ac949f2c3f0d72c943a5b74afd6954
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there some CI issue within the validation of this PR, maybe just need to re trigger it.
FWIW, I successfully tested this locally on my machine to generate Ethos-N compiled modules.
Change-Id: I83c8c6f92cfe3be3a7e811e98a4eec17590186ff
…pache#6697) * [BYOC] Allow custom codegens to register their own constant updater Currently, all codegens using BYOC must make use of the default ConstantUpdater pass. However, certain codegens, like Ethos-N, don't want to store any constants in metadata module. This provides an interface (via a global) to register a custom constant updating method and assigns a 'null' updater for the Ethos-N codegen. Change-Id: Ibd71d3091f992362eeede5d894eedb373b2dbc8f * Fix to use symbol in const name Change-Id: I0ade81af9002d413c5b20a50488018e8cd8d8bad * Remove ; Change-Id: I61967bc4997efb87f87b49dad7e0a660c536ef35 * Remove ccompiler constant updater Change-Id: Iea9ee0f689683512fa114afeadeccb7fc9048e4f * Unregister updater after test Change-Id: I8009940bb2ac949f2c3f0d72c943a5b74afd6954 * Create UpdateConstants utility function Change-Id: I83c8c6f92cfe3be3a7e811e98a4eec17590186ff
…pache#6697) * [BYOC] Allow custom codegens to register their own constant updater Currently, all codegens using BYOC must make use of the default ConstantUpdater pass. However, certain codegens, like Ethos-N, don't want to store any constants in metadata module. This provides an interface (via a global) to register a custom constant updating method and assigns a 'null' updater for the Ethos-N codegen. Change-Id: Ibd71d3091f992362eeede5d894eedb373b2dbc8f * Fix to use symbol in const name Change-Id: I0ade81af9002d413c5b20a50488018e8cd8d8bad * Remove ; Change-Id: I61967bc4997efb87f87b49dad7e0a660c536ef35 * Remove ccompiler constant updater Change-Id: Iea9ee0f689683512fa114afeadeccb7fc9048e4f * Unregister updater after test Change-Id: I8009940bb2ac949f2c3f0d72c943a5b74afd6954 * Create UpdateConstants utility function Change-Id: I83c8c6f92cfe3be3a7e811e98a4eec17590186ff
…pache#6697) * [BYOC] Allow custom codegens to register their own constant updater Currently, all codegens using BYOC must make use of the default ConstantUpdater pass. However, certain codegens, like Ethos-N, don't want to store any constants in metadata module. This provides an interface (via a global) to register a custom constant updating method and assigns a 'null' updater for the Ethos-N codegen. Change-Id: Ibd71d3091f992362eeede5d894eedb373b2dbc8f * Fix to use symbol in const name Change-Id: I0ade81af9002d413c5b20a50488018e8cd8d8bad * Remove ; Change-Id: I61967bc4997efb87f87b49dad7e0a660c536ef35 * Remove ccompiler constant updater Change-Id: Iea9ee0f689683512fa114afeadeccb7fc9048e4f * Unregister updater after test Change-Id: I8009940bb2ac949f2c3f0d72c943a5b74afd6954 * Create UpdateConstants utility function Change-Id: I83c8c6f92cfe3be3a7e811e98a4eec17590186ff
Currently, all codegens using BYOC must make use of the default ConstantUpdater pass. However, certain codegens, like Ethos-N, don't want to store any constants in metadata module. This provides an interface (via a global) to register a custom constant updating method and assigns a 'null' updater for the Ethos-N codegen.