Questions tagged [gpu-atomics]

Modern GPUs support atomic operations in different memory spaces. These are different in implementation and in consequences on execution flow than atomic operations on CPUs.

On modern GPUs, atomic operations in global device memory may require synchronization among thousands of logical threads (or hundreds of warps/wavefronts). A GPU may also support atomic operations on an individual processing core's memory (shared memory in CUDA parlance, local memory in OpenCL parlance) - which behave differently (performance-wise and execution-flow-wise) than global memory atomics.

Reading on GPU atomics:

34 questions
0
votes
1 answer

Why does CUDA atomic function not work?

The problem is I want to apply atomicMin to an int array. My array has 6 elements and the code is: #include #include __global__ void kernel(int * globalmax, int * r){ int val = r[threadIdx.x]; *globalmax =…
kiki
  • 37
  • 1
  • 5
0
votes
1 answer

Atomic Operation in OpenCL kernel

When I try to find more details about the atomic operations in kernel, I found some thing strange. As I understand, when atomic operations are used on one number, then all this kind of operations from all threads will be serialized to launch on this…
user1682375
-1
votes
1 answer

CUDA Atomic operation on array in global memory

I have a CUDA program whose kernel basically does the following. I provide a list of n points in cartesian coordinates e.g. (x_i,y_i) in a plane of dimension dim_x * dim_y. I invoke the kernel accordingly. For every point on this plane (x_p,y_p) I…
-2
votes
1 answer

Atomic Add on Cuda not working..

My problem is to find out the number of integer points in n dimensional sphere using CUDA. I dont understand what is wrong with the below code but it is giving 0 output all the time. CUDA compute capability is 2.0 and tool kit version is…
NIDIA LAL
  • 23
  • 4
1 2
3