mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

compute in GPU , astype('int32') overflow problem

Open gyshi opened this issue 7 years ago • 0 comments

this is in cpu

np.logspace(12.22,3.44,4, base = 33,).astype('int32') array([-2147483648, -2147483648, -2147483648, 167373], dtype=int32)

this in gpu.

np.logspace(12.22,3.44,4, base = 33,ctx=npx.gpu(0)).astype('int32') array([2147483647, 2147483647, 2147483647, 167373], dtype=int32, ctx=gpu(0)) (-np.logspace(12.22,3.44,4, base = 33,ctx=npx.gpu(0))).astype('int32') array([-2147483648, -2147483648, -2147483648, -167373], dtype=int32, ctx=gpu(0))

the result is different between cpu and gpu computation.

gyshi avatar Jul 07 '19 01:07 gyshi