-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I found a strange bug. Let me consider the simplest kernel
__global__ void makezeros(
float4* spin
) {
int blockId = blockIdx.x + blockIdx.y * gridDim.x + gridDim.x * gridDim.y * blockIdx.z;
int gid = blockId * (blockDim.x * blockDim.y) + (threadIdx.y * blockDim.x) + threadIdx.x;
spin[gid].x = 0.001;
}
It works absolutely perfect. However, it is enough to add a square root operation
__global__ void makezeros(
float4* spin
) {
int blockId = blockIdx.x + blockIdx.y * gridDim.x + gridDim.x * gridDim.y * blockIdx.z;
int gid = blockId * (blockDim.x * blockDim.y) + (threadIdx.y * blockDim.x) + threadIdx.x;
float empty = sqrt(3.3f);
spin[gid].x = 0.001;
}
and the, the array spin
will not be affected. However, It doesn't show any errors.
It looks like that this kernel code was not even called.
Metadata
Metadata
Assignees
Labels
No labels