You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Game of life example: dpnp on CPU is 4 times slower than NumPy #1402
data parallel has context switching resource and numpy is fast enough in local desktop
as we can see from the benchmark above, (IMO) dpnp is useful only in specialized case like a.. large amounts of data batch process (ex: Server which has lots of CPU core )
and in the case(Game of life Performance),
it will depend on which implementation you used, but in most cases(Game of life Impl with numpy) there does not seem to be any performance gain from the parallelization of dpnp. (IMO)
the main operations in the Game of life implementation are slicing and sum, which are not operations that benefit from internal parallelism.
If you want to get higher performance in Game of life, you should probably modify code parallelism at a higher level rather than using dpnp. (for example, execute def update(board) for each cell in parallel )
In other words, Game of life is not a good benchmark to measure the performance of dpnp.
Activity
antonwolfy commentedon Jun 19, 2023
The numbers with dpnp=0.12.0:
The result is in 2 times faster, but still not in the target.
AlexanderKalistratov commentedon Jul 19, 2023
Shouldn't it be closed?
KimSoungRyoul commentedon Sep 8, 2023
@antonwolfy
hi I'm not a contributor but I hope my comment will help you
you can see the dpnp performance by following the script below
in my case (
Xeon Skylake), I was able to see a significant performance difference1. benchmark result ( when Array Size = 2**20 )
1. benchmark result ( when Array Size = 2**20 )
but If the np array is not large enough (
NNUMBERS=2**13 (8192))2. benchmark result (when Array Size = 2**13)
2. benchmark result (when Array Size = 2**13)
data parallel has context switching resource and numpy is fast enough in local desktopas we can see from the benchmark above, (IMO) dpnp is useful only in specialized case like a.. large amounts of data batch process (ex: Server which has lots of CPU core )
and in the case(
Game of life Performance),it will depend on which implementation you used, but in most cases(
Game of life Impl with numpy) there does not seem to be any performance gain from the parallelization of dpnp. (IMO)the main operations in the Game of life implementation are slicing and sum, which are not operations that benefit from internal parallelism.
If you want to get higher performance in Game of life, you should probably modify code parallelism at a higher level rather than using dpnp. (for example, execute
def update(board)for each cell in parallel )In other words, Game of life is not a good benchmark to measure the performance of dpnp.
thanks