Closed leofang closed 3 years ago
$ conda create -n test -c conda-forge -y python=3.8 cupy cudatoolkit=11.0 $ conda activate test $ python -c "import cupy; cupy.show_config()" Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/leofang/miniforge3/envs/test/lib/python3.8/site-packages/cupy/__init__.py", line 866, in show_config _sys.stdout.write(str(_cupyx.get_runtime_info())) File "/home/leofang/miniforge3/envs/test/lib/python3.8/site-packages/cupyx/_runtime.py", line 225, in __str__ props['name'].decode('utf-8')), AttributeError: 'str' object has no attribute 'decode'
For some reason CUDA_VERSION was either unset or set to 0 at build time, so this line was picked up: https://github.com/cupy/cupy/blob/89da620875741bbb167512234ab3a9f81b5ffc10/cupy_backends/cuda/api/runtime.pyx#L293 together with another byte <-> str bug (https://github.com/cupy/cupy/pull/4594) this error happens.
CUDA_VERSION
It's a sdist issue: cupy/cupy#4597
For the purpose of building Conda packages, one obvious way out is to build from GitHub source, which we already followed in the rc branch to circumvent another sdist issue.
rc
For some reason
CUDA_VERSION
was either unset or set to 0 at build time, so this line was picked up: https://github.com/cupy/cupy/blob/89da620875741bbb167512234ab3a9f81b5ffc10/cupy_backends/cuda/api/runtime.pyx#L293 together with another byte <-> str bug (https://github.com/cupy/cupy/pull/4594) this error happens.