-
Notifications
You must be signed in to change notification settings - Fork 22
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
Improve performance of dnp.nan_to_num
#2228
Open
ndgrigorian
wants to merge
15
commits into
IntelPython:master
Choose a base branch
from
ndgrigorian:improve-nan-to-num-performance
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Improve performance of dnp.nan_to_num
#2228
ndgrigorian
wants to merge
15
commits into
IntelPython:master
from
ndgrigorian:improve-nan-to-num-performance
+770
−19
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ndgrigorian
requested review from
antonwolfy,
AlexanderKalistratov,
vlad-perevezentsev and
vtavana
as code owners
December 10, 2024 05:38
antonwolfy
reviewed
Dec 10, 2024
dpnp/backend/extensions/ufunc/elementwise_functions/nan_to_num.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/nan_to_num.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/nan_to_num.cpp
Outdated
Show resolved
Hide resolved
antonwolfy
reviewed
Dec 10, 2024
ndgrigorian
force-pushed
the
improve-nan-to-num-performance
branch
from
December 26, 2024 18:39
48f623b
to
0693c0b
Compare
ndgrigorian
force-pushed
the
improve-nan-to-num-performance
branch
from
January 12, 2025 02:13
0693c0b
to
50c28f7
Compare
ndgrigorian
force-pushed
the
improve-nan-to-num-performance
branch
2 times, most recently
from
January 28, 2025 19:16
0c6d3f8
to
54dfaf5
Compare
Use std::conditional and value_type_of_t struct to avoid constexpr branches with redundant code
ndgrigorian
force-pushed
the
improve-nan-to-num-performance
branch
from
February 2, 2025 22:36
5d19afb
to
d1fb595
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a dedicated kernel for
dnp.nan_to_num
to improve its performance. This reduces the number of kernel calls to at most one in all cases.A kernel for both strided and contiguous inputs have been added, to avoid additional allocation of device memory for trivial strides when input is fully C- or F-contiguous.
For example of performance gains, using Max GPU
master:
on branch: