I have made a python package which uses CUDA code. Using autodoc_mock_imports
I managed a CUDA dependency error due to the import of PyCuda
. The issue I have right now is directly inside my package: at a point I try to write a Cubin PyCuda
(mocked) would create. Locally, without GPU, it works for some reason, on RTD though, it doesn't. The error I have is this :
self.compiled_source = self.try_load_cubin()
File "/home/docs/checkouts/readthedocs.org/user_builds/.../compiler_base.py", line 66, in try_load_cubin
cubin_file.write(cubin)
TypeError: a bytes-like object is required, not 'compile'
compile
in this error refers to a pycuda
function (mocked). The exact command executed is :
python -m sphinx -T -E -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html
Again, when I run it on my local environment which doesn't have a GPU this commands works. Would you know how ignore this part of the code or ignore the error or any type of solution ?