Tech
[Python] 为什么这段 cuda 的并行前缀算法不会数据竞争
比如在 iter=1 这一轮的时候,同时会写入和读取 sum_buf[1]
naive_ker = SourceModule("""
__global__ void naive_prefix(double *vec, double *out)
{
__shared__ double sum_buf[1024];
int tid = threadIdx.x;
sum_buf[tid] = vec[tid];
int iter = 1;
for (int i=0; i < 10; i++)
...
Read the full discussion on V2EX
This article was aggregated from V2EX. Click to join the conversation.
View on V2EX