def METHOD_NAME(dtype):
    q = get_queue_or_skip()
    skip_if_dtype_not_supported(dtype, q)
    nans_ = [dpt.nan, -dpt.nan]
    infs_ = [dpt.inf, -dpt.inf]
    finites_ = [-1.0, -0.0, 0.0, 1.0]
    inps_ = nans_ + infs_ + finites_
    c_ = [complex(*v) for v in itertools.product(inps_, repeat=2)]
    z = dpt.asarray(c_, dtype=dtype)
    r = dpt.abs(z)
    with warnings.catch_warnings():
        warnings.simplefilter("ignore")
        expected_np = np.abs(np.asarray(c_, dtype=dtype))
    expected = dpt.asarray(expected_np, dtype=dtype)
    tol = dpt.finfo(r.dtype).resolution
    assert dpt.allclose(r, expected, atol=tol, rtol=tol, equal_nan=True)