Here's an MWE: ```python >>> import pycuda.autoinit >>> import pycuda.gpuarray as cu_np >>> a = cu_np.zeros(10, dtype="int32") + 1 >>> b = cu_np.zeros(10, dtype="int32") + 2 >>> a / b array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=int32) ``` while, Numpy returns an array of 0.5's ```python >>> import numpy as np >>> a = np.zeros(10, "int32") + 1 >>> b = np.zeros(10, "int32") + 2 >>> a / b array([0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]) ```
Activity
inducer commentedon Jun 30, 2022
That's clearly a bug. Believe it or not, PyCUDA predates
__truediv__, I think. 😲kaushikcfd commentedon Aug 26, 2022
There's a proposed fix for this at https://gitlab.tiker.net/inducer/pycuda/-/merge_requests/66.