cuda流是否具有自己的__constant__内存副本?

时间:2019-04-24 09:36:57

标签: cuda stream gpu-constant-memory

我有一个内核,该内核多次使用少量__constant__内存,并且每次都需要将不同的值复制到__constant__内存中。最近,我需要使该内核多流并发。

如何使每个流复制该__constant__内存?

1 个答案:

答案 0 :(得分:1)

  

如何使每个流复制该__constant__内存?

不能。 __constant__变量具有上下文/设备级别范围。如果您的代码仅使用少量的常量内存,请将其作为内核参数传递。内核参数存储在所有受支持的体系结构上的专用常量存储库中。