Skip to content

cross-device compute-follow-data issue for dpnp.geomspace #2352

Open
@vtavana

Description

@vtavana

The following example works for dpnp.linspace and dpnp.logspace but not for dpnp.geomspace.

>>> import dpnp
>>> x=dpnp.array([2,3,4,5], device="gpu")
>>> dpnp.linspace(1, x[2:4], 4, device="cpu")
# array([[1.        , 1.        ],
#      [2.        , 2.33333333],
#      [3.        , 3.66666667],
#      [4.        , 5.        ]])

>>> dpnp.logspace(1, x[2:4], 4, device="cpu")
# array([[1.00000000e+01, 1.00000000e+01],
#      [1.00000000e+02, 2.15443469e+02],
#      [1.00000000e+03, 4.64158883e+03],
#      [1.00000000e+04, 1.00000000e+05]])

>>> dpnp.geomspace(1, x[2:4], 4, device="cpu")
File ~/dpnp/dpnp_algo/dpnp_arraycreation.py:102, in dpnp_geomspace(start, stop, num, dtype, device, usm_type, sycl_queue, endpoint, axis)
    99         stop[all_imag] = stop[all_imag].imag
   100         out_sign[all_imag] = 1j
--> 102 both_negative = (dpt.sign(start) == -1) & (dpt.sign(stop) == -1)
   103 if dpnp.any(both_negative):
   104     dpt.negative(start[both_negative], out=start[both_negative])
ExecutionPlacementError: Execution placement can not be unambiguously inferred from input arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions