Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

array_api_tests unittest failure on macosx- may be mxnet.numpy.eye() misbehavior or Cython enablement issue #20963

Closed
DickJC123 opened this issue Mar 16, 2022 · 1 comment · Fixed by #20965

Comments

@DickJC123
Copy link
Contributor

Description

I'm trying to understand the following failure in the array_api_tests on macosx: https://github.com/apache/incubator-mxnet/runs/5560545610?check_suite_focus=true

The failing test case is strange: mxnet.numpy.eye(n_rows=0, n_cols=None, k=-9223372036854775809, dtype=dtype('int8'))
It could be the test is looking for both mxnet.numpy.eye and the 'golden standard' to match in producing an error due to the k value of approximately -sys.maxsize.

mxnet.numpy produces here:

    return _api_internal.eye(N, M, int(k), device, dtype)
mxnet/_ffi/_cython/./function.pxi:192: in mxnet._ffi._cy3.core.FunctionBase.__call__
    ???
mxnet/_ffi/_cython/./function.pxi:136: in mxnet._ffi._cy3.core.FuncCall
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   OverflowError: Python int too large to convert to C long

But the other possible issue is, on macosx, is Cython properly disabled? One would think that it should be because of the MXNET_ENABLE_CYTHON=0 line and comment here for the corresponding centos cpu testing:

https://github.com/apache/incubator-mxnet/blob/master/ci/docker/runtime_functions.sh#L879-L884

However, the macosx run script uses MXNET_ENFORCE_CYTHON, which actually only effects whether an error is raised if MXNET_ENABLE_CYTHON=1 and Cython is not available. Thus, on macosx, Cython looks to be still enabled. Should MXNET_ENFORCE_CYTHON be instead MXNET_ENABLE_CYTHON in the lines for the macosx script here:

https://github.com/apache/incubator-mxnet/blob/master/.github/workflows/os_x_staticbuild.yml#L50-L67

Thoughts @barry-jin?

@barry-jin
Copy link
Contributor

@DickJC123 Good catch! This line should be replaced with MXNET_ENABLE_CYTHON: 0 to disable cython.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants