Skip to content

Conversation

@bhashemian
Copy link
Member

@bhashemian bhashemian commented Aug 12, 2021

Fixes #2754

Description

This PR adds Range transform which accept a transform as an input and pushes an NVTX range before that transform, and pops it afterwards.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
@bhashemian bhashemian requested a review from wyli August 13, 2021 01:08
@bhashemian bhashemian requested a review from Nic-Ma August 13, 2021 02:57
@bhashemian bhashemian requested a review from Nic-Ma August 13, 2021 14:00
Copy link
Contributor

@Nic-Ma Nic-Ma 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 to me.
@wyli what do you think?

Thanks.

@bhashemian
Copy link
Member Author

@wyli, if you don't have any comment on this, I'll merge the PR. Please let me know. Thanks.

@wyli wyli merged commit 8b5ea0f into Project-MONAI:dev Aug 13, 2021
@wyli
Copy link
Contributor

wyli commented Aug 13, 2021

thanks @drbeh, I have a quick question, what will happen if we have the same type(transform).__name__ msg for different nvtx transforms?

@bhashemian
Copy link
Member Author

bhashemian commented Aug 13, 2021

thanks @drbeh, I have a quick question, what will happen if we have the same type(transform).__name__ msg for different nvtx transforms?

If we are profiling the same transform that is used multiple times in the compose, like ToTensor, currently, the only way to distinguish them is to assign different name to it. For instance: Range(ToTensor(), "ToTensor_1") instead of Range(ToTensor()).

@bhashemian bhashemian deleted the nvtx-transform branch August 13, 2021 16:44
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.

NVTX range push/pop transform

3 participants