Visual Studio 2010中的NVIDIA Visual Profiler,调试和发布模式 [英] NVIDIA Visual Profiler, Debug and Release modes in Visual Studio 2010

查看:759
本文介绍了Visual Studio 2010中的NVIDIA Visual Profiler,调试和发布模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚使用Visual Studio 2010,因为我习惯用nvcc编译我的CUDA代码,使用Linux作为操作系统。顺便说一下,在这个和NVIDIA开发人员论坛的一些帖子,我已经阅读警告正确编译在Visual Studio(调试/发布模式,请参阅

问题是:



1)如何从调试模式切换到释放模式?是否足够使用属性 - >配置属性并选择释放而不是活动(调试)?此外,我注意到,我必须重复的选择,每次我想重建项目。



2)这是否足以正确使用Visual Profiler? / p>

非常感谢你。

解决方案

在错误的地方重新从Debug切换到Release。您使用的设置仅用于选择要查看或修改的构建设置。您应该使用 Build |配置管理器或(更容易)标准工具栏中的解决方案配置如果没有看到标准工具栏,请在菜单的工具栏区域中右键单击,然后在那里选择它。您会发现现在不必重新选择每个构建的设置。



2)即使在调试模式下,CUDA编译器也会积极优化。我不知道你使用的配置是否重要。两者都应该工作。您可以尝试看看是否得到任何不同的结果。


I'm new to Visual Studio 2010, as I was used to compile my CUDA codes with nvcc using Linux as operating system. Incidentally in some posts of this and the NVIDIA Developer Zone forums, I have read warnings on proper compilation in Visual Studio (Debug/Release modes, see link for the difference between the two) to correctly use of the NVIDIA Visual Profiler. In my (poor) understanding, Visual Studio automatically compiles under a "Debug" mode, but for a successful profile the "Release" mode is necessary.

My (simple) questions are:

1) How do I switch from the "Debug" mode to the "Release" mode? Is it enough to use Properties -> Configuration Properties and select "Release" instead of "Active(Debug)"? Also, I noticed that I have to repeat the selection each time I want to Rebuild the project.

2) Is this enough for a correct usage of the Visual Profiler?

Thank you very much in advance.

解决方案

1) You're switching from Debug to Release in the wrong place. The setting you're using is just for selecting which build settings to view or edit. You should use Build | Configuration Manager or (easier) the Solution Configurations dropdown box in the Standard toolbar. If you don't see the Standard toolbar, right click in the toolbar area by the menu, and select it there. You will find that you don't have to reselect the setting for each build now.

2) The CUDA compiler optimizes aggressively even in Debug mode. I don't know if it matters which configuration you use. Both should work. You can try and see if you get any different results.

这篇关于Visual Studio 2010中的NVIDIA Visual Profiler,调试和发布模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆