mxnet
mxnet copied to clipboard
compute in GPU , astype('int32') overflow problem
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.