fjarri / reikna

Pure Python GPGPU library
http://reikna.publicfields.net/
MIT License
164 stars 16 forks source link

Naming of kernel functions for profiling #40

Closed robertmaxton42 closed 6 years ago

robertmaxton42 commented 6 years ago

Is there any way to name a Computation that NVVP/nvprof can recognize? Right now they're all just named _kernel_func, which makes optimizing a little difficult - also, for some reason there's six kernel calls but my Computation only has five in its plan, which rather surprised me to see.

fjarri commented 6 years ago

Would it be enough if you could supply a custom kernel name to plan.kernel_call()? That would be pretty easy to do. Of course, I'll have to go through the built-in computations and assign meaningful names to their kernels.

also, for some reason there's six kernel calls but my Computation only has five in its plan, which rather surprised me to see.

Are there some nested computations which might have two kernel calls in them?

robertmaxton42 commented 6 years ago

That would probably be enough, yeah. Whatever's currently just getting a constant _kernel_func, if that was replaceable with some custom name, that should be enough to make it show up.

Are there some nested computations which might have two kernel calls in them?

Yeah, I forgot that Scan has three sub-computations. (I actually missed a kernel call because it was incredibly short, amusingly.)