陈述 "All the threads that run on a given SM may cooperate" 是对还是错?

Is the statement "All the threads that run on a given SM may cooperate" true or false?

在 Udacity 上的测验:"Intro to Parallel Programming" 的线程和块中,它询问语句 "All the threads that run on a given SM may cooperate to solve a problem" 是对还是错。答案是错误的,但我认为它应该是正确的,因为:

我对它有什么误解吗?

并非在所有情况下都是如此。

在协作线程的典型 CUDA 意义上,协作线程必须属于同一个块(以便能够使用像 __syncthreads()__shared__ 内存这样的协作机制)。

但是,一个 SM 可以包含同时执行的多个块。

来自不同块的线程,即使驻留在同一个 SM 上,也不能合作,在典型的 CUDA 意义上 "cooperating threads"。

CUDA 官方material[1]提到了 Robert Crovella 在第 8 页所说的话:

  • 不同块中的线程无法协作。

[1] https://www.nvidia.com/content/cudazone/download/Getting_Started_w_CUDA_Training_NVISION08.pdf