Skip to content
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

Make all nvtx usage go through safe imports #5424

Merged
merged 8 commits into from
May 30, 2023

Conversation

dantegd
Copy link
Member

@dantegd dantegd commented May 17, 2023

No description provided.

@github-actions github-actions bot added the Cython / Python Cython or Python issue label May 17, 2023
@dantegd dantegd added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 17, 2023
@dantegd dantegd marked this pull request as ready for review May 18, 2023 15:01
@dantegd dantegd requested a review from a team as a code owner May 18, 2023 15:01
Copy link
Contributor

@wphicks wphicks left a comment

Choose a reason for hiding this comment

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

Looks good except for the use of null_decorator as a context manager. Should be an easy thing to fix, though.

@@ -153,7 +157,7 @@ def fprime_f(x):
warn_flag = np.zeros(num_batches)

while not all(converged):
with nvtx.annotate("LBFGS-ITERATION", domain="cuml_python"):
with nvtx_annotate("LBFGS-ITERATION", domain="cuml_python"):
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe null_decorator currently works as a context manager. That would be an easy thing to fix, though. We'd just need to make it an instance of contextlib.ContextDecorator, and we probably should do so since nvtx_annotate can be used as either one.

@dantegd
Copy link
Member Author

dantegd commented May 30, 2023

/merge

@rapids-bot rapids-bot bot merged commit 731f104 into rapidsai:branch-23.06 May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants