Skip to content

Move dependencies from requirements.txt to an optional packaging extra #638

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

Merged
merged 7 commits into from
May 16, 2025

Conversation

kkraus14
Copy link
Collaborator

Description

Moves packages needed for testing to an optional dependency group and updates CI and docs to use said optional dependency group. Additionally removes some unused dependencies and specifies versions where they weren't previously specified but were required.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Copy link
Contributor

copy-pr-bot bot commented May 15, 2025

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@kkraus14 kkraus14 force-pushed the dependency_update branch from 906f845 to 23d48a9 Compare May 15, 2025 14:17
@kkraus14
Copy link
Collaborator Author

/ok to test

This comment has been minimized.

@kkraus14
Copy link
Collaborator Author

/ok to test

@leofang leofang added enhancement Any code-related improvements P1 Medium priority - Should do cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module labels May 15, 2025
@leofang leofang added this to the cuda.core beta 4 milestone May 15, 2025
"numpy>=1.21.1",
"pytest>=6.2.4",
"pytest-benchmark>=3.4.1",
"llvmlite"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but just to point out our options:

  • This could be left commented out (status quo), with
# Uncomment to generate MINIMAL_NVVMIR_BITCODE_STATIC for test_nvvm.py (see PR #443).
  • If we choose to make this an unconditional test dependency: I'll work on a follow-on PR to simplify the logic in cuda_bindings/tests/test_nvvm.py. I believe we can then remove the MINIMAL_NVVMIR_BITCODE_STATIC dictionary entirely.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something I wanted to discuss. I could pull it out into a separate optional dependency group of something like test-nvvm or something of the likes. One of my motivations for uncommenting it was to have it start being tested in CI.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My vote, based on the quick experiment below (pip install llvmlite takes less than 1 second):

  • Make llvmlite an unconditional test dependency, as you have it right now.
  • I'll do the follow-on PR (quickly, should be easy to squeeze in).

0db6015-lcedt.nvidia.com:~ $ python -m venv junk
0db6015-lcedt.nvidia.com:~ $ . junk/bin/activate
(junk) 0db6015-lcedt.nvidia.com:~ $ pip install --upgrade pip
...
Successfully installed pip-25.1.1
(junk) 0db6015-lcedt.nvidia.com:~ $ time pip install llvmlite
Collecting llvmlite
  Using cached llvmlite-0.44.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.0 kB)
Using cached llvmlite-0.44.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (42.4 MB)
Installing collected packages: llvmlite
Successfully installed llvmlite-0.44.0

real    0m0.867s
user    0m0.662s
sys     0m0.151s

@kkraus14
Copy link
Collaborator Author

/ok to test

@kkraus14
Copy link
Collaborator Author

/ok to test

@kkraus14
Copy link
Collaborator Author

/ok to test

@leofang
Copy link
Member

leofang commented May 16, 2025

/ok to test

@kkraus14 kkraus14 merged commit 4cb5389 into NVIDIA:main May 16, 2025
53 checks passed
Copy link

Doc Preview CI
Preview removed because the pull request was closed or merged.

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 cuda.core Everything related to the cuda.core module enhancement Any code-related improvements P1 Medium priority - Should do
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants