fjarri/reikna

Keep compilation option

robertmaxton42 opened this issue · 3 comments

Sorry for all the issues :P.

It would be really, really nice to have an option like pycuda's keep for compilation. Tools like cuda-memcheck have grown very advanced, and with the right compilation flags will flat-out tell you line and column number of your memory errors - but unfortunately, that's of limited use to me since I can't actually access the files, leaving me to try and logic out the error from the thread and block id. -- At any rate, it directs me to a folder in /tmp/ that's no longer there. Is there any way this could be added?

Sorry, I am aware of this issue, I've just been busy with work lately. It seems easy to do, basically just pass the keep option or whatever to PyCUDA/PyOpenCL. Alternatively, each Program object in cluda retains its compiled source, but it may be a bit hard to get to if you only have a compiled computation (from memory, something like computation._kernel_calls[i]._kernel._program.source).

... oh man, wish I had known that earlier. That does indeed work as a stopgap, I'm printing out my Computation's CUDA code as we speak.

(Still could use the keep option, though, because while the kernel names help a lot, it's still possible to be confused about which PureParallel instance, say, cuda-memcheck is talking about)

Thanks!