You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import numpy as np
import cupynumeric as cn
x = np.ones((4,5))
y = x.transpose()
cn.asarray(y)
we get the following error:
Traceback (most recent call last):
File "/home/mpapadakis/b/cupynumeric/a.py", line 6, in <module>
cn.asarray(y)
File "runtime.pyx", line 1188, in legate.core._lib.runtime.runtime.track_provenance.decorator.wrapper
File "runtime.pyx", line 1189, in legate.core._lib.runtime.runtime.track_provenance.decorator.wrapper
File "/home/mpapadakis/b/cupynumeric/cupynumeric/_utils/coverage.py", line 105, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/mpapadakis/b/cupynumeric/cupynumeric/_module/creation_data.py", line 141, in asarray
thunk = runtime.get_numpy_thunk(a, share=True, dtype=dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mpapadakis/b/cupynumeric/cupynumeric/runtime.py", line 314, in get_numpy_thunk
return self.find_or_create_array_thunk(obj, transfer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mpapadakis/b/cupynumeric/cupynumeric/runtime.py", line 416, in find_or_create_array_thunk
raise NotImplementedError(
NotImplementedError: cuPyNumeric does not currently know how to attach to array views that are not affine transforms of their parent array.
Essentially cuPyNumeric is saying "I can't reverse-engineer how y is derived from x using an affine transformation", but a transpose is an affine transformation, so this is likely a bug in compute_parent_child_mapping.
At a high level, perhaps this check isn't necessary anymore. What cuPyNumeric is trying to avoid is this pattern:
x = np.ones(...)
a = cn.asarray(x[0:10])
b = cn.asarray(x[5:15])
where two different Stores are created by attaching to different pieces of the same ndarray. Instead of attaching to the sub-arrays, cuPyNumeric first attaches to the full x, then creates subregions for a and b.
@lightsighter do you remember why you needed to guard against this? @magnatelee do you expect any issue with current Legate, if you have two Stores created in this fashion?
The text was updated successfully, but these errors were encountered:
Reported by @elliottslaughter
When executing this file:
we get the following error:
Essentially cuPyNumeric is saying "I can't reverse-engineer how
y
is derived fromx
using an affine transformation", but a transpose is an affine transformation, so this is likely a bug incompute_parent_child_mapping
.At a high level, perhaps this check isn't necessary anymore. What cuPyNumeric is trying to avoid is this pattern:
where two different Stores are created by attaching to different pieces of the same ndarray. Instead of attaching to the sub-arrays, cuPyNumeric first attaches to the full
x
, then creates subregions fora
andb
.@lightsighter do you remember why you needed to guard against this? @magnatelee do you expect any issue with current Legate, if you have two Stores created in this fashion?
The text was updated successfully, but these errors were encountered: