我正在尝试使用 Nsight Visual Studio Edition 或 Visual Profiler 使用managedCuda 分析用 C# 编写的 CUDA 应用程序。两个分析器都可以很好地与普通的 C++ CUDA 应用程序配合使用。要使用 managedCuda 测试分析器,我想在ManagedCudaSamples中分析项目“vectorAdd” 。
首先,我尝试使用 VS 2013 中集成的 Nvidia Nsight Visual Studio Edition 5.0。我使用 x64 Debug 配置。如果我尝试在 Nsight 性能分析的“应用程序控制”中启动应用程序,我会收到一条错误消息:
Analysis Session - Start Application
Unable to launch 64-bit managed application '...\ManagedCudaSamples\vectorAdd\bin\x64\Debug\vectorAdd.exe'.
此外,我尝试使用 Nvidia Visual Profiler 7.5 来分析相同的应用程序。在运行 vectorAdd.exe nvprof 控制台显示以下输出:
==2944== NVPROF is profiling process 2944, command: ...\ManagedCudaSamples\vectorAdd\bin\x64\Debug\vectorAdd.exe
==2944== Warning: Some profiling data are not recorded. Make sure cudaProfilerStop() or cuProfilerStop() is called before application exit to flush profile data.
==2944== Generated result file: ...\nvvp_workspace\.metadata\.plugins\com.nvidia.viper\launch\7\api_2944.log
我是 CUDA 的新手,如果有任何关于如何分析 managedCuda 应用程序的建议,我将不胜感激。