apache / singa

a distributed deep learning platform
Apache License 2.0
3.35k stars 1.24k forks source link

Cannot do mul for int tensors #633

Open joddiy opened 4 years ago

joddiy commented 4 years ago

Hi, @dcslin , we cannot do the mul operator for int tensors:

The error is:

F0324 05:04:22.542809 14739 tensor.cc:932] Unknown combination of data type kInt and language kCuda

please use this test case:

x1 = np.array([1], dtype=np.int32)
x2 = np.array([256], dtype=np.int32)
x1 = tensor.from_numpy(x1)
x1.to_device(gpu_dev)
x2 = tensor.from_numpy(x2)
x2.to_device(gpu_dev)

y = autograd.Mul()(x1, x2)
print(tensor.to_numpy(y[0]))
joddiy commented 4 years ago

same issue for sub, add, div, and reshape operators.