Skip to content

[AutoTVM] Added @functools.wraps to function decorators - #8237

Merged
masahi merged 1 commit into
apache:mainfrom
Lunderberg:autotvm_functools_wraps
Jun 10, 2021
Merged

[AutoTVM] Added @functools.wraps to function decorators#8237
masahi merged 1 commit into
apache:mainfrom
Lunderberg:autotvm_functools_wraps

Conversation

@Lunderberg

Copy link
Copy Markdown
Contributor

This helps in debugging, as the function name, arguments, and docstrings show the function name from the source code instead of the wrapper function.(e.g. <function tvm.topi.cuda.dense.dense_small_batch(cfg, data, weight, bias=None, out_dtype=None)> instead of <function tvm.autotvm.task.topi_integration.register_topi_compute.<locals>._decorate.<locals>.wrapper(*args, **kwargs)>.)

This helps in debugging, as the function name, arguments, and
docstrings show the function name from the source code instead of the
wrapper function.(e.g.
`<function tvm.topi.cuda.dense.dense_small_batch(cfg, data, weight, bias=None, out_dtype=None)>`
instead of
`<function tvm.autotvm.task.topi_integration.register_topi_compute.<locals>._decorate.<locals>.wrapper(*args, **kwargs)>`.)

@tkonolige tkonolige left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Thank you!

@masahi
masahi merged commit 217555f into apache:main Jun 10, 2021
@Lunderberg
Lunderberg deleted the autotvm_functools_wraps branch June 11, 2021 04:17
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jun 17, 2021
This helps in debugging, as the function name, arguments, and
docstrings show the function name from the source code instead of the
wrapper function.(e.g.
`<function tvm.topi.cuda.dense.dense_small_batch(cfg, data, weight, bias=None, out_dtype=None)>`
instead of
`<function tvm.autotvm.task.topi_integration.register_topi_compute.<locals>._decorate.<locals>.wrapper(*args, **kwargs)>`.)

Co-authored-by: Eric Lunderberg <elunderberg@octoml.ai>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jun 17, 2021
This helps in debugging, as the function name, arguments, and
docstrings show the function name from the source code instead of the
wrapper function.(e.g.
`<function tvm.topi.cuda.dense.dense_small_batch(cfg, data, weight, bias=None, out_dtype=None)>`
instead of
`<function tvm.autotvm.task.topi_integration.register_topi_compute.<locals>._decorate.<locals>.wrapper(*args, **kwargs)>`.)

Co-authored-by: Eric Lunderberg <elunderberg@octoml.ai>
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