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
Describe the bug
Currently we support using the environment variables RAPIDS_NO_INITIALIZE and CUDF_NO_INITIALIZE to defer GPU initialization on import so that cudf will import successfully on machines without a GPU. However, this does not currently work with cudf.pandas because cudf.pandas tries to initialize a managed memory resource when it starts, leading to an error failing to find the CUDA driver.
Note that I would not expect this to occur with cudf-polars since cudf-polars only initializes the mr when the first collect call happens, not on import.
Steps/Code to reproduce bug
Install cudf on a machine without a GPU (probably easiest to test in a container without GPUs mounted) and run RAPIDS_NO_INITIALIZE=1 python -m cudf.pandas -c 'import pandas as pd'
Expected behavior
The above command should work. We can probably fix this by nesting the calls to pylibcudf.utils._is_concurrent_managed_access_supported inside a try-except block that can catch these failures and ignore them. We could also do some eager check for a GPU existing, but since the vast majority of practical use cases will have them I don't think LBYL is worthwhile.
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently we support using the environment variables
RAPIDS_NO_INITIALIZE
andCUDF_NO_INITIALIZE
to defer GPU initialization on import so that cudf will import successfully on machines without a GPU. However, this does not currently work with cudf.pandas because cudf.pandas tries to initialize a managed memory resource when it starts, leading to an error failing to find the CUDA driver.Note that I would not expect this to occur with cudf-polars since cudf-polars only initializes the mr when the first collect call happens, not on import.
Steps/Code to reproduce bug
Install cudf on a machine without a GPU (probably easiest to test in a container without GPUs mounted) and run
RAPIDS_NO_INITIALIZE=1 python -m cudf.pandas -c 'import pandas as pd'
Expected behavior
The above command should work. We can probably fix this by nesting the calls to
pylibcudf.utils._is_concurrent_managed_access_supported
inside a try-except block that can catch these failures and ignore them. We could also do some eager check for a GPU existing, but since the vast majority of practical use cases will have them I don't think LBYL is worthwhile.The text was updated successfully, but these errors were encountered: