简体   繁体   English

如何在vim的syntastic插件中指定cuda计算架构?

[英]How to specify cuda compute architecture in vim's syntastic plugin?

I use the syntastic plugin for syntax checking. 我使用syntastic插件进行语法检查。 Is there a way I can customize the syntax checking to work for a different cuda compute architecture than the default? 有没有一种方法可以自定义语法检查,以使其适用于不同于默认值的cuda计算体系结构?

Currently is throws me an error when I use AtomicAdd function because it is not supported in the older compute architecture, but I am using a newer one. 当前,当我使用AtomicAdd函数时会抛出一个错误,因为较旧的计算体系结构不支持该函数,但是我使用的是较新的体系结构。

From the relevant wiki page : 在相关的Wiki页面上

By default, nvcc and thus syntastic, defaults to the most basic architecture. 默认情况下, nvcc (因此是合成的)默认为最基本的体系结构。 This can produce false errors if the developer intends to compile for newer hardware and use newer features, eg double precision numbers. 如果开发人员打算编译较新的硬件并使用较新的功能(例如双精度数字),则可能会产生错误的错误。 To pass a specific target arch to nvcc , eg add the following to your .vimrc: 要将特定的目标拱门传递给nvcc ,例如,将以下内容添加到您的.vimrc中:

let g:syntastic_cuda_arch = "sm_20"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM