首页 文章

CUDA 5.5:我不能在内核方法中使用“printf”,我应该在VisualStucio2010“compute_xx,sm_xx”中选择哪个设备?

提问于
浏览
0

这是deviceQuery.exe的propaty

Device 0: "NVS 4200M"
CUDA Driver Version / Runtime Version          5.5 / 5.5
CUDA Capability Major/Minor version number:    2.1
( 1) Multiprocessors, ( 48) CUDA Cores/MP:     48 CUDA Cores

我应该在VisualStucio2010中选择哪个设备?

compute_10,sm_10或compute_20,sm_20或compute_30,sm_30或compute_35,sm_35 ???

我想在kernel方法中使用printf . 但我无法使用printf();如何在内核端使用printf?

是什么意思"compute_xx"? sm等于流式多处理器,不是吗?我读了下面的文章,但他们不知道 . CUDA 4.1 printf() Error

1 回答

  • 2

    您可以将 compute_20,sm_20 与该设备一起使用 . 如果选择 compute_20,sm_20 ,则可以使用 printf in the kernel .

    compute_20选择特定的“虚拟架构”sm_20选择特定的“设备架构”

    设备代码编译器 nvcc 使用这两条信息来生成代码 .

    您可以在nvcc manual中通过编译器阅读有关这些体系结构说明符用法的更多信息 .

相关问题