We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Integer div result with wrong data type(shoule be float but got int).
torch-xpu-ops commit: d19b7f6 Reproduce cases: diff --git a/test/python/examples/test_binary.py b/test/python/examples/test_binary.py index 4768a59..352644a 100644 --- a/test/python/examples/test_binary.py +++ b/test/python/examples/test_binary.py @@ -41,3 +51,20 @@ class TestSimpleBinary(TestCase): c_xpu = a_xpu / b_xpu c_cpu = a_cpu / b_cpu self.assertEqual(c_cpu, c_xpu.to(cpu_device)) +
a_cpu = torch.randint(2, 3, [8, 8])
b_cpu = torch.randint(2, 3, [8, 8])
a_xpu = a_cpu.to(xpu_device)
b_xpu = b_cpu.to(xpu_device)
c_xpu = a_xpu / b_xpu
c_cpu = a_cpu / b_cpu
self.assertEqual(c_cpu.dtype, c_xpu.dtype)
self.assertEqual(c_cpu, c_xpu.to(cpu_device))
The text was updated successfully, but these errors were encountered:
#34
Sorry, something went wrong.
No branches or pull requests
Integer div result with wrong data type(shoule be float but got int).
torch-xpu-ops commit: d19b7f6
Reproduce cases:
diff --git a/test/python/examples/test_binary.py b/test/python/examples/test_binary.py
index 4768a59..352644a 100644
--- a/test/python/examples/test_binary.py
+++ b/test/python/examples/test_binary.py
@@ -41,3 +51,20 @@ class TestSimpleBinary(TestCase):
c_xpu = a_xpu / b_xpu
c_cpu = a_cpu / b_cpu
self.assertEqual(c_cpu, c_xpu.to(cpu_device))
+
The text was updated successfully, but these errors were encountered: