Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot do mul for int tensors #633

Open
joddiy opened this issue Mar 24, 2020 · 1 comment
Open

Cannot do mul for int tensors #633

joddiy opened this issue Mar 24, 2020 · 1 comment

Comments

@joddiy
Copy link
Member

joddiy commented Mar 24, 2020

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
Copy link
Member Author

joddiy commented Mar 25, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant