-
Notifications
You must be signed in to change notification settings - Fork 203
[cuda_pathfinder] Remove win32api
dependency (use ctypes
instead).
#751
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…AD_LIBRARY_SEARCH_*).
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
/ok to test |
|
/ok to test |
rwgk
added a commit
to rwgk/cuda-python
that referenced
this pull request
Jul 11, 2025
rwgk
added a commit
that referenced
this pull request
Jul 15, 2025
* Move files WITHOUT trying to make anything work. * First pass changing imports from cuda.bindings → cuda.path_finder WITHOUT trying to make anything work. * Move README.md one level up. * Move find_sub_dirs.py → ../_utils/find_sub_dirs.py * Move files from cuda_bindings/tests to cuda_path_finder/tests WITHOUT trying to make anything work. * First VERY ROUGH version of pyproject.toml * Change imports in tests/ WITHOUT trying to make anything work. * Clean up pyproject.toml (with the help of ChatGPT) WITHOUT trying to make anything work. * ruff automatic fix: Replace deprecated typing.Sequence with collections.abc.Sequence (Python 3.9+) * Add `dynamic = ["version"]` in pyproject.toml and cuda/path_finder/__init__.py (to make the dynamic version work). * Modernize `[project] license` line. * Change dir/file names: path_finder → pathfinder * Change imports: path_finder → pathfinder * Fix up broken imports. * add [project.optional-dependencies] test * Adopt cuda_core license. * cuda.pathfinder.nvidia_dynamic_libs.load_lib → cuda.pathfinder.load_nvidia_dynamic_lib * Revert "cuda.pathfinder.nvidia_dynamic_libs.load_lib → cuda.pathfinder.load_nvidia_dynamic_lib" This reverts commit 3678fb4. * Simple name changes for consistency: library -> lib * Implement consensus API * Use suggested version number 0.1.0 * Fix oversight: `license =` line in pyproject.toml * Simplify `description =` line in pyproject.toml * Remove Maintenance Requirements from main README. Add the list of "Likely candidates for updates" to supported_nvidia_libs.py instead. * Adjust cuda_bindings/cuda/bindings/path_finder.py to changes in cuda_pathfinder/ * First guess at what changes are needed to include cuda_pathfinder in .github/workflows * git mv nvidia_dynamic_libs.py __init__.py * Do not use `cibuildwheel` for a `noarch` package (`cuda-pathfinder`). Use `pip wheel` instead. #723 (comment) * twine cleanup * Hard-wire cuda-pathfinder artifact name and path for simplicity, similar to the approach used for cuda-python. * Change to __version__ = "1.0.0" * Import __version__ in cuda/pathfinder/__init__.py * Add missing line in step `name: List the cuda.pathfinder artifacts directory` * `Install cuda.pathfinder` before ` Build cuda.bindings Cython tests` * Add missing line in step `name: Check cuda.pathfinder wheel` * fix build workflow * Remove `__all__` in cuda/pathfinder/__init__.py * Fix `Check if the script was called with exactly 1 argument` implementation in ci/tools/run-tests * Add pathfinder install & test into ci/tools/run-tests * Add Download cuda-pathfinder, Run cuda.pathfinder tests in test-wheel-windows.yml * Download cuda-pathfinder-wheel into `./cuda_pathfinder` (not `.`) * Run cuda.pathfinder tests only after cuda.bindings tests, so that all wheels are installed already. * Drive-by fix: test_find_or_load → test_load * Introduce CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS environment variable. * CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS=supported_must_work|see_what_works (/ci/tools/run-tests). * Add cuda-pathfinder in .github/workflows/build-docs.yml * Remove 32-bit DLLs from SUPPORTED_WINDOWS_DLLS * Add guard: RuntimeError: cuda.pathfinder.load_nvidia_dynamic_lib() requires 64-bit Python. Currently running: 32-bit Python * is_suppressed_dll_file(): return path_basename.startswith(("cudart32_", "nvvm32")) * Add nvidia_wheels_cu12 to [project.optional-dependencies] in cuda_pathfinder/pyproject.toml * Install cuda.pathfinder nvidia_wheels_cu12 and run-tests pathfinder again with all_must_work * ci/tools/run-tests: use bash `-v` instead of `-z` to test if CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS is defined (to resolve `unbound variable` error). * Add missing `shell: bash` line in test-wheel-windows.yml * test_load_nvidia_dynamic_lib: increase timeout to 120 seconds for Windows (to see if that resolves the cusolver failures) * Add test_load_nvidia_dynamic_lib::test_runtime_error_on_non_64bit_python * Add DynamicLibNotFound exception type in load_dl_common.py and simplify test_load_nvidia_dynamic_lib() * Run cuda.pathfinder tests with see_what_works before running any other tests. * Use `if: startsWith(matrix.CUDA_VER, 12.)` to guard pathfinder tests with CUDA 12 wheels. * Get rid of "partially supported" concept. * Consistently use `IS_WINDOWS` (instead of `sys.platform == "win32"`). * Rename toolshed/build_pathfinder*.py scripts (no functional changes). * Rename toolshed/run_cuda_pathfinder.py * Make output of toolshed/build_pathfinder_dlls.py usable as-is. * Add DynamicLibNotFound to cuda/pathfinder/__init__.py * Fix accident in previous commit (DynamicLibNotFound) * Update README.md * mypy cleanup * Run mypy from pre-commit * Use SHA for mypy version in .pre-commit-config.yaml (generated with `pre-commit autoupdate --freeze`, but keeping only the change for mypy). * cuda_bindings/pyproject.toml: constrain "cuda-pathfinder ~= 1.0" * Make LoadedDL.handle an unsigned integer also for Windows. (cuda_pathfinder/tests pass, cuda_bindings/tests are broken). Interactive testing: CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS=all_must_work pytest -ra -s -v tests/ python ../toolshed/run_cuda_pathfinder.py * Rename LoadedDL.handle → LoadedDL._handle_uint This does not break any cuda_pathfinder tests. (cuda_bindings tests are "more broken".) * Move `_handle_uint` last in `LoadedDL`, to emphasize that this is private member. * Implement TEMPORARY BACKWARD COMPATIBILITY in /cuda/bindings/path_finder.py * Fix oversight discovered via local Windows testing. * Put the changes from #751 on top of this PR (723) * Add `cuda-pathfinder` to `options` in .github/workflows/release.yml * Move temporary backward compatibility code to _path_finder/temporary_backward_compatibility.py, to fully sanitize path_finder.py * Consolidate mypy configuration into pyproject.toml - Move mypy configuration from cuda_pathfinder/mypy.ini to [tool.mypy] section in pyproject.toml - Delete cuda_pathfinder/mypy.ini file - Update .pre-commit-config.yaml to point to pyproject.toml for mypy configuration - Maintain identical functionality with consolidated config Addresses review comment about preferring pyproject.toml over separate ini files. * Change "slated" to "deprecated and slated ... in the next ... major version release." Also fix pathfinder → path_finder oversights. * Remove mention of LoadedDL handle in README.md (it was an oversight that this wasn't removed before). --------- Co-authored-by: Leo Fang <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is on top of #723.
Almost all changes are auto-generated (claude.ai).