The NVIDIA® Tools Extension SDK (NVTX) is a C-based Application Programming Interface (API) for annotating events, code ranges, and resources in your applications.
Apache License 2.0
309
stars
48
forks
source link
[python] Automatic annotation with function name #85
Ah, good catch @merlinND -- any chance you are interested in submitting the fix as a pull request? If so, I'm happy to merge, test locally, and cut a release.
Hello,
As of
nvtx 0.2.8
(installed from Pypi), the feature automatically annotating functions with their name when using@nvtx.annotate()
no longer works.I believe this is due to the following check: https://github.com/NVIDIA/NVTX/blob/fcc56f8d439ab33249ab1d702c7daa6e73a353d7/python/nvtx/nvtx.py#L107
Indeed,
self.attributes.message
seems to be created regardless of whethermessage
was provided in the constructor: https://github.com/NVIDIA/NVTX/blob/fcc56f8d439ab33249ab1d702c7daa6e73a353d7/python/nvtx/nvtx.py#L78Changing the check to:
locally seems to give back the expected behavior (however I don't know if this is the correct fix).