Make `cuda-bindings` buildable against CTK wheels?
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Cython
- Star
- 3.4k
- Fork
- 329
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 116
Mô tả
The meaning of the title is that pip install . from source can work without a local CTK environment (no need to set CUDA_PATH and all that). Everything is purely pip-wheel based.
This is actually doable, I just don't believe there is a serious use case because we really want users to not build from source, nor do I want to spend my time on enabling it, but I can be convinced. Anyway it's worth writing this up somewhere in the public.
The whole thing relies on the fact that building bindings just need a host compiler; no NVCC is needed. The steps is as follows:
- We list needed CTK wheels in the
[build-system.requires]session. They will provide the needed headers. - Since
setuptoolsdoes not provide a way for us to programmatically query the path to the isolated build environment at build time, we search the potential paths based on the assumption thatsys.pathmust be updated forsetuptoolsto find the build env. - We pass
<build env path>tosetuptoolsso that the CUDA headers can be found by gcc/msvc.
I enabled this for nvmath-python and it did worked like a charm, but the situation was a lot simpler than driver/runtime modules that we have here.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách so sánh cấu hình build của cuda-python với pyproject.toml được tham chiếu của nvmath-python và cách tiếp cận trong builder/utils.py. Xác định xem việc cài đặt từ mã nguồn pip-wheel-only có thể tìm thấy các header CTK mà không cần CUDA_PATH hay không; được xem là hoàn thành khi pip install . thành công mà không có môi trường CTK cục bộ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- build-system
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100