__device__ __constant__ float3 a; __device__ __constant__ float3 b; SAFE_CALL ( cudaMemcpyToSymbol(a,(const void*)hostData1,sizeof(float3)*nElem) ) SAFE_CALL ( cudaMemcpyToSymbol(b,(const void*)hostData2,sizeof(float3)*nElem) )
The nElem = 2048
The .ptx says:
.const .align 4 .b8 a; .const .align 4 .b8 b;
The cudaMemcpyToSymbol does not fail because does not assert at all ( yes, i’m running debug mode ). With -deviceemu works ok too. However, when I erase the -deviceemu to run in a GF8500GT with CUDA 1.0 does not copy the data ( does not assert, returns cudaSuccess error ). Changing to Release mode yields the same results. Any idea why it does not copy the data?
I tryed also to put an “align” thing:
__device__ __constant__ __align__(16) float3 a;
but same result…
I was desperated and also removed the device from the start:
__constant__ float3 a;
Also is curious but if I do
__device__ /*__constant__*/ float3 a;
commenting the constant works ok using HW-acceleration.
Any idea why cudaMemcpyToSymbol cannot copy data from host to HW constant memory pls?