Skip to content

Commit

Permalink
Add cuda-python dependency to pyproject.toml (#994)
Browse files Browse the repository at this point in the history
When trying to install rmm with pip using the git url, I ran into some Cython CUDA compile errors:
```
(rapids) root@5a38f55ffbdd:/rmm/python#  pip install -e 'git+https://github.com/rapidsai/[email protected]#egg=rmm&subdirectory=python'
...
/src/rmm/python/rmm/_lib/cuda_stream.pxd:16:0: 'cuda/ccudart.pxd' not found
        Error compiling Cython file:
        ------------------------------------------------------------
        cimport cython
        from cuda.ccudart cimport cudaStream_t
        ^
...
```
Adding `cuda-python` to the pyproject.toml requires (as suggested by @vyasr and @shwina) helped solve the issue:
```
(rapids) root@5a38f55ffbdd:/rmm/python# pip install .
Processing /rmm/python
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
...
(rapids) root@5a38f55ffbdd:/rmm/python# python -c 'import rmm; buf = rmm.DeviceBuffer(size=100); print(buf.size); print(buf.ptr)'
100
140379508703232
(rapids) root@5a38f55ffbdd:/rmm/python#
```

Authors:
  - Sevag Hanssian (https://github.com/sevagh)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Ashwin Srinath (https://github.com/shwina)

URL: #994
  • Loading branch information
sevagh authored Mar 14, 2022
1 parent 39dc9f7 commit 4997097
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ requires = [
"scikit-build>=0.13.1",
"cmake>=3.20.1",
"ninja",
"cuda-python>=11.5,<12.0",
]

[tool.black]
Expand Down

0 comments on commit 4997097

Please sign in to comment.