Skip to content

Instantly share code, notes, and snippets.

@samaid
Created May 17, 2023 02:14
Show Gist options
  • Save samaid/b4510dbcd7285ceed36b42dd96acf30c to your computer and use it in GitHub Desktop.
Save samaid/b4510dbcd7285ceed36b42dd96acf30c to your computer and use it in GitHub Desktop.
Compute-follows-data breaks on the inverse operation
import dpnp as np
x = np.asarray([1.0, 2.0, 3.0], device="gpu").astype(np.float32)
y = np.float32(1.0) / x
print(type(x))
print(type(y))
assert isinstance(y, np.dpnp_array.dpnp_array)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment