-
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
Performance issue with NaN functions #2086
Comments
@jeshi96 , could you please specify what dpnp version you used? |
I'm using |
Hi, I just wanted to follow up on this and see if you had any idea of the possible cause -- I saw that there was a new release, and reran the tests on the latest commits (of both dpnp and dpctl), but with the same effect. Thanks! |
Thanks so much for the update! I will take a look! |
Hi,
I've been testing dpnp on CPU with some standard NaN functions (nan_to_num, nansum), and my performance results seem to show that dpnp is quite slow single-threaded compared to NumPy. I was wondering if you had any insight to why this might be the case (e.g., if there is something specific dpnp does in handling NaNs), and/or if there was a fix for this.
Here are some of the scalability plots (number of threads vs. running time) comparing dpnp and NumPy (and Numba), for nan_to_num and nansum respectively:
While the dpnp scaling looks good, the single-threaded performance in particular is almost an order of magnitude worse. The test environment is an Intel Xeon Platinum 8380 processor, with 80 threads. Both tests were run on arrays with 6.4e9 float32s, taking the average (median) over 10 runs and discarding the first run (so the cache is warm).
Here was the code to generate the input array for all of these tests:
For dpnp, I ran
array_1 = dpnp.asarray(array_1, device="cpu")
before starting the tests (not included in the timing results). The times were measuring onlyarray_out = np.nan_to_num(array_1)
orarray_out = dpnp.nan_to_num(array_1)
(similarly fornansum
).Any help is much appreciated -- thanks!
Best,
Jessica
The text was updated successfully, but these errors were encountered: