Hi all, I have programmed a function to be executed at GPU using arrayfun call. I need to debug it but when I set breakpoints the program does not stop!!. How can I execute it step by step on GPU?.

 Respuesta aceptada

Edric Ellis
Edric Ellis el 23 de Dic. de 2016

1 voto

The body of an arrayfun call is run on the GPU using a translation of the MATLAB code to a native form for the GPU. This gives much better performance, but does not allow debugging. Depending on your function, you might simply be able to call the function directly with gpuArray arguments, and debug that way. I.e. replace
out = arrayfun(@myFcn, in)
with
out = myFcn(in)
Obviously, this depends on whether your function can be run in vectorised form as well as element-wise form.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 22 de Dic. de 2016

Respondida:

el 23 de Dic. de 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by