Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] CuPy/Cumlarray UnownedMemory error on ARM CI jobs #5100

Open
dantegd opened this issue Dec 20, 2022 · 0 comments
Open

[BUG] CuPy/Cumlarray UnownedMemory error on ARM CI jobs #5100

dantegd opened this issue Dec 20, 2022 · 0 comments
Labels
? - Needs Triage Need team to review and classify bug Something isn't working

Comments

@dantegd
Copy link
Member

dantegd commented Dec 20, 2022

Describe the bug

FAILED test_adapters.py::test_check_array - RuntimeError: UnownedMemory requires explicit device ID for a null pointer.
[2147](https://github.com/rapidsai/cuml/actions/runs/3734738186/jobs/6337919174#step:6:2148)
FAILED test_svm.py::test_svm_no_support_vectors - RuntimeError: UnownedMemory requires explicit device ID for a null pointer.

Steps/Code to reproduce bug
Tests will be xfailed to merge GHA PR, but can be seen here: https://github.com/rapidsai/cuml/actions/runs/3734738186/jobs/6337919174

Full error:

 _______________________________ test_check_array _______________________________
 [gw0] linux -- Python 3.9.15 /opt/conda/envs/test/bin/python3.9
 
     def test_check_array():
         # accept_sparse
         arr = coo_matrix((3, 4), dtype=cp.float64)
         check_array(arr, accept_sparse=True)
         with pytest.raises(ValueError):
             check_array(arr, accept_sparse=False)
     
         # dtype
         arr = cp.array([[1, 2]], dtype=cp.int64)
         check_array(arr, dtype=cp.int64, copy=False)
     
         arr = cp.array([[1, 2]], dtype=cp.float32)
         new_arr = check_array(arr, dtype=cp.int64)
         assert new_arr.dtype == cp.int64
     
         # order
         arr = cp.array([[1, 2]], dtype=cp.int64, order='F')
         new_arr = check_array(arr, order='F')
         assert new_arr.flags.f_contiguous
         new_arr = check_array(arr, order='C')
         assert new_arr.flags.c_contiguous
     
         # force_all_finite
         arr = cp.array([[1, cp.inf]])
         check_array(arr, force_all_finite=False)
         with pytest.raises(ValueError):
             check_array(arr, force_all_finite=True)
     
         # ensure_2d
         arr = cp.array([1, 2], dtype=cp.float32)
         check_array(arr, ensure_2d=False)
         with pytest.raises(ValueError):
             check_array(arr, ensure_2d=True)
     
         # ensure_2d
         arr = cp.array([[1, 2, 3], [4, 5, 6]], dtype=cp.float32)
         check_array(arr, ensure_2d=True)
     
         # ensure_min_samples
         arr = cp.array([[1, 2]], dtype=cp.float32)
         check_array(arr, ensure_min_samples=1)
         with pytest.raises(ValueError):
             check_array(arr, ensure_min_samples=2)
     
         # ensure_min_features
         arr = cp.array([[]], dtype=cp.float32)
 >       check_array(arr, ensure_min_features=0)
 
 python/cuml/tests/test_adapters.py:124: 
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 /opt/conda/envs/test/lib/python3.9/site-packages/cuml/thirdparty_adapters/adapters.py:288: in check_array
     X, n_rows, n_cols, dtype = input_to_cupy_array(array,
 /opt/conda/envs/test/lib/python3.9/contextlib.py:79: in inner
     return func(*args, **kwds)
 /opt/conda/envs/test/lib/python3.9/site-packages/cuml/internals/input_utils.py:434: in input_to_cupy_array
     return out_data._replace(array=out_data.array.to_output("cupy"))
 /opt/conda/envs/test/lib/python3.9/site-packages/cuml/internals/memory_utils.py:85: in cupy_rmm_wrapper
     return func(*args, **kwargs)
 /opt/conda/envs/test/lib/python3.9/contextlib.py:79: in inner
     return func(*args, **kwds)
 /opt/conda/envs/test/lib/python3.9/site-packages/cuml/internals/array.py:630: in to_output
     return output_mem_type.xpy.asarray(
 /opt/conda/envs/test/lib/python3.9/site-packages/cupy/_creation/from_data.py:76: in asarray
     return _core.array(a, dtype, False, order)
 cupy/_core/core.pyx:2249: in cupy._core.core.array
     ???
 cupy/_core/core.pyx:2261: in cupy._core.core.array
     ???
 cupy/_core/core.pyx:2301: in cupy._core.core._array_from_cuda_array_interface
     ???
 cupy/_core/core.pyx:2632: in cupy._core.core._convert_object_with_cuda_array_interface
     ???
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 
 >   ???
 E   RuntimeError: UnownedMemory requires explicit device ID for a null pointer.
 
 cupy/cuda/memory.pyx:190: RuntimeError
 _________________________ test_svm_no_support_vectors __________________________
 [gw1] linux -- Python 3.9.15 /opt/conda/envs/test/bin/python3.9
 
     def test_svm_no_support_vectors():
         n_rows = 10
         n_cols = 3
         X = cp.random.uniform(size=(n_rows, n_cols), dtype=cp.float64)
         y = cp.ones((n_rows, 1))
         model = cuml.svm.SVR(kernel="linear", C=10)
         model.fit(X, y)
         pred = model.predict(X)
     
         assert svm_array_equal(pred, y, 0)
     
         assert model.n_support_ == 0
         assert abs(model.intercept_ - 1) <= 1e-6
         assert svm_array_equal(model.coef_, cp.zeros((1, n_cols)))
 >       assert model.dual_coef_.shape == (1, 0)
 
 python/cuml/tests/test_svm.py:552: 
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 /opt/conda/envs/test/lib/python3.9/site-packages/cuml/common/array_descriptor.py:134: in __get__
     return self._to_output(instance, output_type)
 /opt/conda/envs/test/lib/python3.9/site-packages/cuml/common/array_descriptor.py:99: in _to_output
     output = cuml_arr.to_output(output_type=to_output_type,
 /opt/conda/envs/test/lib/python3.9/site-packages/cuml/internals/memory_utils.py:85: in cupy_rmm_wrapper
     return func(*args, **kwargs)
 /opt/conda/envs/test/lib/python3.9/contextlib.py:79: in inner
     return func(*args, **kwds)
 /opt/conda/envs/test/lib/python3.9/site-packages/cuml/internals/array.py:630: in to_output
     return output_mem_type.xpy.asarray(
 /opt/conda/envs/test/lib/python3.9/site-packages/cupy/_creation/from_data.py:76: in asarray
     return _core.array(a, dtype, False, order)
 cupy/_core/core.pyx:2249: in cupy._core.core.array
     ???
 cupy/_core/core.pyx:2261: in cupy._core.core.array
     ???
 cupy/_core/core.pyx:2301: in cupy._core.core._array_from_cuda_array_interface
     ???
 cupy/_core/core.pyx:2632: in cupy._core.core._convert_object_with_cuda_array_interface
     ???
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 
 >   ???
 E   RuntimeError: UnownedMemory requires explicit device ID for a null pointer.
 

Environment details (please complete the following information):

  • Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)]
  • Linux Distro/Architecture: [Ubuntu 16.04 amd64]
  • GPU Model/Driver: [V100 and driver 396.44]
  • CUDA: [9.2]
  • Method of cuDF & cuML install: [conda, Docker, or from source]
    • If method of install is [conda], run conda list and include results here
    • If method of install is [Docker], provide docker pull & docker run commands used
    • If method of install is [from source], provide versions of cmake & gcc/g++ and commit hash of build

Additional context
Related to #4095

@dantegd dantegd added bug Something isn't working ? - Needs Triage Need team to review and classify labels Dec 20, 2022
@github-actions github-actions bot added this to Needs prioritizing in Bug Squashing Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify bug Something isn't working
Projects
Bug Squashing
Needs prioritizing
Development

No branches or pull requests

1 participant