Closed shwina closed 3 years ago
Adds no-op methods of public APIs like annotate, which are used if the env var NVTX_DISABLE is defined.
annotate
NVTX_DISABLE
Depends on #23
Closes #12
Without NVTX_DISABLE:
In [1]: from nvtx import annotate In [2]: @annotate() ...: def foo(): ...: pass ...: In [3]: %timeit foo() 328 ns ± 0.411 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)
With NVTX_DISABLE:
In [1]: from nvtx import annotate In [2]: @annotate() ...: def foo(): ...: pass ...: In [3]: %timeit foo() 49.4 ns ± 0.0631 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)
Adds no-op methods of public APIs like
annotate
, which are used if the env varNVTX_DISABLE
is defined.Depends on #23
Closes #12
Without
NVTX_DISABLE
:With
NVTX_DISABLE
: