not able to use printf in cuda kernel function

前端 未结 2 1533
陌清茗
陌清茗 2020-12-21 10:54

It seems that printf doesn\'t work inside the Kernel of a cuda code

#include \"Common.h\"
#include
#include 

__dev         


        
2条回答
  •  执笔经年
    2020-12-21 11:11

    You need to use cuPrintf, as in this example. Note that printf is a pretty limited way of debugging, the Nsight or Nsight eclipse edition IDEs are much nicer.

提交回复
热议问题