Am 2015-08-16 12:51, schrieb Henry Gomersall:
On 15/08/15 04:21, Andreas Kloeckner wrote:
Am 2015-08-14 05:40, schrieb Henry Gomersall:
I haven't been able to test with an Nvidia machine today and I won't
be able to until Monday, but from memory the numbers were similar and
were what prompted my last email.
I performed some micro-optimizations based on the profiles you
submitted, and according to my measurements most of the code paths
that
showed up in those profiles should now essentially be gone. The
mysterious thing is that these code paths were never such a big deal
on
my machine in first place, so that overall the net gain from these
optimizations on my machine is pretty small, perhaps 10%. But then,
the
machine is already spending about 60% of its time waiting for OpenCL
anyway, so that even the ideal case gain would be pretty small. I
would
love to hear what you find with this updated code, currently in git
master.
Great, we're now getting pretty close. The pstats files are attached
and the timings are as follows:
cl_test_master_master_16082015: 1.804 s
cl_test_preallocated_master_16082015: 1.62 s (the fastest so far)
So there is still a ~10% slow down on this platform (Intel Beignet on
Linux) for including the memory allocation. Is this reasonable and to
be expected?
I just spent little bit of time looking at the profile you sent, and I
think from here on out trying to get this to go any faster might be a
game of diminishing returns. There are no obvious huge offenders, and
some operations that are slow on the OpenCL implementation on which you
are testing might be quite a bit faster on another implementation. As
such, trying to optimize one use case may pessimize another. In
addition, a 10% difference is something that I can live with for
now--the "new" PyOpenCL is not yet as mature code base as the " old"
code base, which had several years of maturing under its belt, and
things are bound to get better over time.
No problem at all. I hope my contributions are useful!
Very much so, and once again thank you!
Andreas
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl