编译cuda代码 [英] Compiling cuda code

查看:107
本文介绍了编译cuda代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Visual Studio 2017,我想从命令行编译一个cude命令。我打开了开发人员cmd并运行了"nvcc file.cu"。但是我遇到了很多错误。似乎我必须设置一些其他的东西,例如路径,能够从
命令行编译。

With Visual studio 2017, I want to compile a cude command from the command line. I opened the developer cmd and ran "nvcc file.cu" but I got a lot of errors. It seems that I have to set some other things, e.g. paths, to be able to compile from command line.

有任何想法吗?

推荐答案

嗨mahmoodn,

欢迎来到MSDN论坛。

请参阅您的说明,请查看此文档:
适用于Microsoft Windows的CUDA安装指南

按照上述文档中的详细指南步骤操作,确保您的操作系统符合要求系统要求,验证系统是否具有支持CUDA的GPU 并安装NVIDIA
CUDA工具包。

Follow the detail guide steps from the above doc, make sure your OS meet the system requirement, verify the system has a CUDA-capable GPU and install the NVIDIA CUDA Toolkit.

要验证安装,可以通过在命令提示符窗口(开始>所有程序>附件>命令提示符)中运行
nvcc -V 来检查CUDA工具包的版本。您还可以编译并运行一些包含的示例程序以进行更多测试。

To verify the installation, the version of the CUDA Toolkit can be checked by running nvcc -V in a Command Prompt windows (Start > All Programs > Accessories > Command Prompt). You can also compile and run some of the included sample programs to have more tests.

如果您仍然遇到有关CUDA的其他编译问题,请重定向到这个适当的论坛:
https://devtalk.nvidia.com/ 寻求更好的支持,因为我们的论坛是讨论VS IDE和CUDA是第三方软件,谢谢你的理解。

If you still meet other compile issues about CUDA, please redirect to this appropriate forum: https://devtalk.nvidia.com/ to seek for a better support, since our forum is to discuss the VS IDE and CUDA is a third-party software, thank you for your understanding.

最好的问候,

Sara


这篇关于编译cuda代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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