CUDA C++编程指南(3.2.7)——内存同步域
AI-安全-功耗 CUBE 博客目录导读
目录
3.2.7.1. 内存栅栏干扰(Memory Fence Interference)
3.2.7.2. 使用域隔离流量
3.2.7.3. 在CUDA中使用域
3.2.7.1. 内存栅栏干扰(Memory Fence Interference)
某些CUDA应用程序可能会因内存栅栏/刷新(fence/flush)操作等待比CUDA内存一致性模型所需更多的事务(transactions)而导致性能下降。
__managed__ int x = 0; __device__ cuda::atomic<int, cuda::thread_scope_device> a(0); __managed__ cuda::atomic<int, cuda::thread_scope_system> b(0); |
