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

Cython tests need build instructions #244

Closed
vzhurba01 opened this issue Nov 14, 2024 · 2 comments · Fixed by #252
Closed

Cython tests need build instructions #244

vzhurba01 opened this issue Nov 14, 2024 · 2 comments · Fixed by #252
Assignees
Labels
cuda.bindings Everything related to the cuda.bindings module P0 High priority - Must do! test Addition or improved tests

Comments

@vzhurba01
Copy link
Collaborator

Currently the Cython tests are segregated to test_cython and there are no instructions on how to build them.
Should we have a setup.py? Can we avoid it with a simply cythonize + command approach?

Need updates to README for how to build them and use them.
Also, would it be better to have a folder layout such that we have:

  • cuda_bindings/tests/python/* for Python tests
  • cuda_bindings/tests/cython/* for Cython tests
@vzhurba01 vzhurba01 added cuda.bindings Everything related to the cuda.bindings module P0 High priority - Must do! test Addition or improved tests labels Nov 14, 2024
@vzhurba01 vzhurba01 self-assigned this Nov 14, 2024
@leofang
Copy link
Member

leofang commented Nov 15, 2024

Can we avoid it with a simply cythonize + command approach?

Yes I think so. I like doing things in a simple & easy-to-maintain way even if it might seem "silly", and this is one such case. We can just make Cython a test requirement (gcc/msvc are needed too, but we can't list them in requirements.txt or pyproject.toml...) and we can call cythonize() in a subprocess, similar to what we do in conda-forge.
https://github.com/conda-forge/cuda-python-feedstock/blob/4a12ae297e8ebf4784269fb8daa89a4d0a0a417f/recipe/meta.yaml#L95-L98

@leofang
Copy link
Member

leofang commented Nov 15, 2024

We also need the CUDA headers of the same major.minor as test dependencies (xref: #245), ex:
https://github.com/conda-forge/cuda-python-feedstock/blob/4a12ae297e8ebf4784269fb8daa89a4d0a0a417f/recipe/meta.yaml#L86-L89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda.bindings Everything related to the cuda.bindings module P0 High priority - Must do! test Addition or improved tests
Projects
None yet
2 participants