用nvidia visual profiler加载.exe文件进行性能分析的时候老是加载失败并提示:Unable to read the entire session timeline. The displayed timeline may be empty or incomplete because the application aborted or failed to flush profile data before exiting. The application should call cudaDeviceReset() before exiting to ensure that all profile data is flushed.
但是我已经在程序的结尾加上了cudaDeviceReset()这个函数,求斑竹指导,谢谢!
楼主如果加了还遇到这种情况,
往往是您的kernel挂了。
请您确保您的kernel已经调试正确后,能正常运行,再尝试做profiling.
(请注意,如果您的kernel需要数据文件,建议使用绝对路径,避免打开文件失败)
(或者您可以设置正常的working directory后,也可以继续使用您的相对路径)
(working directory在建立session的时候可以指定,建议设置成您的exe正常运行时候的路径)
感谢您的来访。
果然成功了,谢谢斑竹!:handshake
恭喜您。
感谢您的来访。