Uh oh!
There was an error while loading. Please reload this page.
Merge main into 13.4.x - #2588
Draft
rwgk wants to merge 49 commits into
Draft
Conversation
…A#2434) Declare cdef locals at their point of initialization rather than at the top of the function, and replace field-by-field struct setup with Cython's struct-initializer syntax. Only complete initializers are converted. Cython does not zero-fill omitted members, so a partial initializer would leave them holding stack garbage; sites that depend on a preceding memset are left unchanged. Where every member is now supplied, the redundant memset is dropped. No behavior change.
…ersions.yml (NVIDIA#2306) * Got initial version to address issue 2183. Let pre-commit check covers pixi cuda version pins to ci/versions.yml * rename to be more accurate * make error message more readable and accurate * put cuda_bindings / cuda_core to error message to be best accurate * add docstring * rename cuda_feature from cu13 to cu{major} to support bumping major version, e.g. 13.x.x to 14.x.x * add extracted line from pixi files to shown when check OK * add concrete build version alon side with expected version * polish to fix cosmetic * address pre commit check * Pin pyyaml in check-pixi-cuda-version pre-commit hook
…stream, green context, and tensor map (NVIDIA#2404) Signed-off-by: Rui Luo <ruluo@nvidia.com>
…VIDIA#2347) * test(core): add cuda.core.__all__ vs public docs consistency check ClosesNVIDIA#2326. Parses docs/source/api.rst (autosummary entries and data directives while cuda.core is the active module) and compares the flat public names against cuda.core.__all__ in both directions. Dotted entries such as graph.Graph or checkpoint.Process are submodule namespaces and are excluded. Symbols documented in api_private.rst are accepted as documented so returned-helper docs do not fail the check. The tests skip when cuda.core.__all__ is not defined, so this lands independently of NVIDIA#2300 and activates once NVIDIA#2300 merges. Also adds the __all__-names-resolve guard suggested in the NVIDIA#2300 review. Signed-off-by: Aryan <aryansputta@gmail.com> * test(core): land cuda.core.__all__ and extend docs check to public subpackages Addresses review feedback that the consistency check was too narrow: - Define cuda.core.__all__ (flat public namespace) so the check runs instead of skipping, and add an aggregated __all__ to cuda.core.graph derived from its star-imported submodules. - Auto-discover public subpackages from cuda.core.__path__ (graph, system, texture, utils, and any added later; the internal cuNN wheel shims are excluded) and assert each defines a fully resolvable __all__. - Cross-check each documented subpackage's __all__ against api.rst, handling both the dotted (graph.Graph) and flat (currentmodule) doc conventions. system is documented in api_nvml.rst, so its doc cross-check is skipped. * test(core): parse API docs with docutils * Update content to pass current tests * Add docutils dependency to pyproject.toml * Simplify checks. No longer make sure that everything documented is public. * test(core): document intentional scope limits of api docs consistency check * Reorganize __all__ * Fix doc reference * Address findings in PR * Fix tests and make __all__ construction consistent * test(core): drop IPC types from _memory package contents expectation _ipc.__all__ is now empty, so `from cuda.core._memory import *` no longer binds IPCAllocationHandle or IPCBufferDescriptor. Update the expected list in test_package_contents to match. Signed-off-by: Aryan <aryansputta@gmail.com> --------- Signed-off-by: Aryan <aryansputta@gmail.com> Co-authored-by: Michael Droettboom <mdroettboom@nvidia.com> Co-authored-by: Michael Droettboom <mdboom@gmail.com>
…_bindings (NVIDIA#2451) * Fix version parsing in cuda_core * Fix enum checks
* chore: -Werror for cythonization in cuda.core * chore: -Werror for cythonization in cuda.bindings * address review feedback * fix other cython warnings missed locally
…e builds (NVIDIA#2424) * docs: document setuptools-scm clone requirements for source builds Signed-off-by: Bharat Raghunathan <bharatrgatech@gmail.com> * Applied review suggestions from @mdboom Signed-off-by: Bharat Raghunathan <bharatrgatech@gmail.com> --------- Signed-off-by: Bharat Raghunathan <bharatrgatech@gmail.com>
* feat(cuda.core): add event record node updates Use the generic node setter with failure-atomic attachment replacement, establishing the shared path for definition-level parameter mutation. * test(cuda.core): remove unused graph update import * feat(cuda.core): add event wait and host node updates Extend definition-level mutation to event waits and both Python and ctypes host callbacks while preserving old executable state and attachment ownership. * feat(cuda.core): require CUDA 12.2 for node updates Report unsupported driver or binding versions before preparing mutation attachments or calling the generic node setter. * feat(cuda.core): add memset node updates Allow partial memset parameter replacement while preserving graph-owned destination lifetimes and previously instantiated graph behavior. * feat(cuda.core): add memcpy node updates Support partial copy parameter replacement while preserving independent source and destination ownership across graph instantiations. * feat(cuda.core): add kernel node updates Support independent launch configuration and argument replacement while requiring explicit arguments when changing kernels. * feat(cuda.core): add child graph node updates Replace embedded child hierarchies while preserving attachment metadata, invalidating stale views, and keeping existing executables independent. * docs(cuda.core): document graph node updates Describe supported mutation methods, CUDA 12.2 requirements, and executable graph behavior in the API and release notes. * fix(cuda.core): avoid cross-extension deleter symbol Use type-erased shared ownership for prepared child updates so extension loading does not depend on a hidden C++ deleter symbol. * fix(cuda.core): align prepared child update stub Reflect shared ownership for the opaque child update transaction in the generated stub. * api(cuda.core): make partial node updates keyword-only Make memcpy and memset mutation calls explicit and unambiguous before the public API freezes. * fix(cuda.core): harden graph node updates Preserve memory-node contexts, reject unsupported node forms, and fail clearly when child graph metadata cannot be updated. * fix(cuda.core): support older bindings in node updates Resolve the CUDA 13.2 graph parameter getter dynamically so CUDA 12 binding builds remain compilable. * fix(cuda.core): harden memory node updates Clarify parameter handling and cover host/device memory transitions while exposing context-sensitive test teardown for follow-up. * test(cuda.core): reject updates to destroyed nodes Cover the public invalid-node state to ensure parameter updates fail cleanly without restoring graph membership.
…ocationHandle (NVIDIA#2418) Defect 4 of NVIDIA#2388. Signed-off-by: Aryan <aryansputta@gmail.com>
* Add identity preserving pattern to critical_sections this is annoying, but at least the library and probably kernel attributes should be idempotent. But critical sections *can and will be* released (similar to the GIL although not sure what is more likely). The important thing to note here is that the final attribute setting section is self-contained and holds the lock (even if another thread may have already set the attribute or still be executing the code above). * Use call-once pattern for module loading as double-load is problematic As per review by Keith * Minimal thread-unsafe initialization order fixes
…VIDIA#2393) * Make Windows pathfinder searches architecture-aware * Avoid Windows architecture detection on Linux * Rename unsupported architecture error * Skip CUDA 12 wheel paths on Windows ARM64 * Restore ARM64 cudla CTK search path * Group Windows search paths by architecture * Add architecture-specific Windows path tables * Make Windows CTK libnames architecture-aware * Add Windows architecture availability helper * Correct cuSPARSELt Windows ARM64 wheel path * Correct Windows CTK NVVM and CUPTI paths * Validate Windows NVVM binary architecture * Remove Windows architecture availability helper * Remove site-package catalog generation tool * Move pathfinder changes to 1.6.1 release notes * Remove pathfinder catalog generation tools * Restore site-packages collection scripts * Use platform-specific supported library names * Regenerate pathfinder 1.6.1 release notes * Remove redundant Windows libname consistency test * Mark agent-authored pathfinder tests * Clarify Windows binary architecture validation * Use all available dynamic library names * Test Windows site-package libraries by architecture * Require exactly one Windows architecture flag --------- Co-authored-by: Michael Wang <isVoid@users.noreply.github.com> Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
* Make pre-commit work on Windows * Update .pre-commit-config.yaml * Address some of the comments in the PR * Simplify type-checking * Address comments in PR * Simplifications * Fix simplifications * Fix type check * Add comment about stubgen-pyx issues * Update CONTRIBUTING.md Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com> * Update cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_dl_windows.py --------- Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com> Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
As Keith noted, this is needed for using the `py_safe_call_once` definitions, Cython 3.2.5 changelog: https://cython.readthedocs.io/en/latest/src/changes.html (I guess the bump in the pre-commit is likely not strictly needed, but there also were no stub changes.)
* ci: drop custom NumPy builds for Python 3.15 Signed-off-by: tirthpatel90 <tirthpatel5393@gmail.com> * ci: enable scientific-python-nightly-wheels index for Python 3.15 Signed-off-by: tirthpatel90 <tirthpatel5393@gmail.com> * ci: set PIP_ONLY_BINARY and relax numpy version pin for Python 3.15 Signed-off-by: tirthpatel90 <tirthpatel5393@gmail.com> * Fix NumPy version in pyproject.toml and try re-adding windows python 3.15 * Bump cibuildwheel to 4.1.1 (which uses containers with 3.15 b4) * Revert "Use Python 3.15b2 for now until cibuildwheel is updated (NVIDIA#2433)" This reverts commit 3ef82d6. * Add allow-prereleases to windows CI to try and run 3.15 * Exclude ml-dtypes from windows (builds in 1 minute on linux so kept it) * Drop windows 3.15t again as psutil doesn't have free-threaded wheels --------- Signed-off-by: tirthpatel90 <tirthpatel5393@gmail.com> Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
Compare raw NVML device architecture values so architectures newer than the generated DeviceArch enum do not raise ValueError before the threshold query. Add regression coverage for an unrecognized architecture value.
NVIDIA#2409) * fix(cuda.core): fall back to driver when nvJitLink < 12.3 is installed Stop probing nvJitLink availability via module.version(), which calls the unversioned nvJitLinkVersion symbol missing in nvJitLink 12.0-12.2. Use symbol pointer inspection via _nvjitlink_has_version_symbol() instead, restoring cuda-core 0.6.0 fallback behavior. FixesNVIDIA#2408 Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * test(cuda.core): add coverage for nvJitLink <12.3 driver fallback Add regression tests for Linker.which_backend() and _decide_nvjitlink_or_driver() when the nvJitLinkVersion symbol is missing (nvJitLink 12.0-12.2). Related to NVIDIA#2408 Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * docs(cuda.core): add 1.2.0 release note for nvJitLink <12.3 fallback fix Document the NVIDIA#2408 regression fix in the cuda.core 1.2.0 release notes. Related to NVIDIA#2408 Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cuda.core): probe nvJitLink version under DynamicLibNotFoundError guard Address review feedback: keep the >=12.3 version-symbol check inside _optional_cuda_import's probe so a missing nvJitLink dylib still falls back to cuLink. Continue avoiding module.version(), which raises FunctionNotFoundError on nvJitLink 12.0-12.2 (NVIDIA#2408). Add coverage for missing-dylib fallback and a guard that the probe does not call module.version(). Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cuda.core): use explicit try/except for nvJitLink version probe Address review feedback: drop the probe side-effect and catch DynamicLibNotFoundError around _nvjitlink_has_version_symbol so missing dylibs still fall back to cuLink. Keep avoiding module.version() for nvJitLink <12.3 (NVIDIA#2408). Mark newly added tests with agent_authored authorship markers. Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cuda.core): drop obsolete nvJitLink probe comments Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> --------- Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com> Co-authored-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Michael Wang <13521008+isVoid@users.noreply.github.com>
…uda_python_test_helpers (NVIDIA#2384) * Experiment: Install test_helpers as a package * Try something different in CI * Reorganize all the tests * Update a few more imports
NVSHMEM docs now live under /nvshmem/api/latest/; the old unversioned deep link 404s and breaks lychee on rendered docs.
…2484) * Add context sync to teardown in init_cuda fixture * Cap memory pool size in some tests
…#2481) * cuda.core: return CUmodule via as_py in ObjectCode.get_module Use the shared handle export path for legacy CUmodule interop instead of constructing driver.CUmodule directly. Signed-off-by: Jinfeng <jinfengl@nvidia.com> * cuda.core: drop unused intptr_t import in _module.pyx Satisfy cython-lint after switching get_module() to as_py(). Signed-off-by: Jinfeng <jinfengl@nvidia.com> * cuda.core: add as_intptr overload for CUmodule Route as_py(CUmodule) through as_intptr for consistency with other handle exports. * let as_cu supports CUModule --------- Signed-off-by: Jinfeng <jinfengl@nvidia.com>
… it (NVIDIA#2490) * cuda.core: resolve default-stream context per call instead of caching it LEGACY_DEFAULT_STREAM and PER_THREAD_DEFAULT_STREAM wrap default-stream tokens, which denote whatever context is current. Both are module-level singletons, and Stream_ensure_ctx / Stream_ensure_ctx_device stored the first context and device they observed on the object and never cleared them, so a process-wide object became permanently bound to one context. Replace the two helpers with resolvers that return the context and device through out-parameters and cache on the object only when the stream is not a default-stream token. Stream.context, .device, .resources, .record(), and __repr__ now follow the current context, a query no longer pins a context reference for the lifetime of the process, and the shared singletons are no longer written to from multiple threads. Object identity is preserved, so __eq__ and __hash__ keying off the handle are unaffected. FixesNVIDIA#2485 * fix(cuda.core): harden default-stream context resolution for NVIDIA#2485 Skip sticky context reuse on default-stream tokens, document ambient context behavior on device/resources/record, and cover resources in the multi-GPU regression test. --------- Co-authored-by: Andy Jost <ajost@nvidia.com>
* Add executable graph attachment ownership Install a private CUDA user object per graph executable so later node updates can retain replacement resources safely. * Add executable graph node updates Expose ephemeral graph-node views that update complete executable parameters while retaining every replacement resource CUDA may still use. * test(core): cover executable graph node updates Exercise public mutators, rollback, source reclamation, independent ownership, whole updates, and in-flight cleanup end to end. * refactor(core): own exec graph creation behind one handle function Instantiation and whole-graph update each went through a prepare/commit pair. That exposed an opaque transaction type over the internal C++ interface and split the exec ownership contract between C++ and Cython, unlike every other resource handle, which a single create_* function owns end to end. Replace the pairs with create_graph_exec_handle and graph_exec_update. Each stages a fresh attachment accumulator on the source graph, makes the CUDA call with the GIL released, and adopts or publishes the result, so the staging transaction becomes a stack guard in the anonymous namespace instead of a header type. Cython keeps only what belongs to it: filling the instantiation params and decoding the failure reasons. The two driver entry points move into the C++ loader table with the calls. Convert the attachment append transaction to the unique_ptr plus rollback deleter pattern that node attachments already use, which retires the committed flag in favor of the same release-and-delete mechanism. Drop GraphExecBox::attachment_object, which nothing reads. * test(core): cover executable attachment accumulator lifetimes Three gaps remained around owners attached to an executable graph. Sequential updates to the same node must keep the superseded owner reachable, because CUDA cannot detach user objects from an executable; verified by breaking the append into a replace, which fails the new test on exactly that assertion. Closing an executable while a launch is in flight must not retire the accumulator, since the launch still writes through the buffer that an individual node update attached. A child-graph update attaches no owner of its own and relies on CUDA cloning the replacement graph's user object references into the executable. Assert that contract directly: the callback outlives the definition that supplied it and is released with the executable. * docs(core): describe the executable attachment accumulator CUDA accepts user objects on a CUgraph only, so an executable graph can never receive an owner after it exists. Document the consequence: one accumulator is retained on the source graph, propagated by instantiation or whole-graph update, and then released from the source so the executable becomes its only owner. Record why an owner is never removed once appended, and correct the two Scope entries that still described executable graphs as untracked. State the retention limit in the release notes as well. The API reference already documents it, but the note is what a reader sees when adopting the feature, and retention that looks unbounded deserves the warning there. * docs(core): focus executable attachment docs on cuda.core behavior Describe retention and complete-replacement rules without framing the notes around CUDA limitations, and shorten the executable attachment design section to problem, solution, and append-vs-replace limits. * docs(core): clarify Graph.__getitem__ for executable node updates Describe how callers use the view rather than how the binding retains handles or when CUDA validates the node association. * Address review feedback on executable graph attachments Clarify attachment ownership and deferred-cleanup docs, trim the invariants list to the cross-cutting rules, initialize instantiate params with Cython struct syntax, and simplify the executable update test helper. * test(core): restore explicit executable update kwargs The shared replacement fixture carries extra fields that are not update parameters, so spreading it as kwargs breaks memset and kernel cases.
* Add check and agent guidance about uncapped mempools * Address review: move mempool check to pre-commit, share POOL_SIZE Review feedback on NVIDIA#2514: - Move the uncapped-pool check out of the live test suite into a check-mempool-hygiene pre-commit hook. The rule is about source text and needs no GPU, so a hook catches it earlier and for free. Its tests move to ci/tools/tests, alongside the other check scripts'. - Add helpers/constants.py and route the eleven ad-hoc POOL_SIZE definitions through it. - Qualify "device memory" as installed/physical where the doc explains what an uncapped pool reserves.
Resolve the CUDA path before importing cuda.bindings so the existing pathfinder import repairs PEP 517 namespace shadowing first. Reuse the resolved path for the CUDA include directory.
* Make static library discovery architecture-aware * Use architecture-specific static library paths --------- Co-authored-by: Michael Wang <isVoid@users.noreply.github.com>
…grammatic dependent launch (NVIDIA#2456) * feat(cuda.core): expose PDL via LaunchConfig.programmatic_stream_serialization Allow users to set CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION through LaunchConfig, matching the is_cooperative attribute pattern (NVIDIA#1334). * test(cuda.core): verify PDL overlap for primary/secondary launch Add an end-to-end Hopper+ test that launches primary and secondary kernels on the same stream with programmatic_stream_serialization, and asserts overlap only when the PDL attribute is enabled (NVIDIA#1334). * test(cuda.core): simplify PDL secondary kernel and log success Drop unused secondary sync/sleep from the overlap test, clarify the primary clock window comment, and print a short success line for CI. * add pre-commit passed * revise to xfail
…DIA#2504) check_cython_abi's private-module filter tested `so_path.parts` on the absolute path, so any ancestor directory starting with an underscore made every module look private. That is the normal layout under manylinux (/opt/_internal/cpython-*/) and in GitHub Actions containers (/__w/), where `generate` then writes zero ABI files and exits 0 -- a green run with no coverage at all. `check`'s new-module scan had no filter, while `generate` skipped private modules. Since `generate` never wrote an .abi.json for them, `check` reported every private module as "New module added" on every run and set has_allowed_changes, so it could not print "No changes found" for a package shipping private submodules (cuda.bindings has _bindings/, _internal/, _lib/). Extract the predicate into iter_public_extension_modules() so both paths use it, and match only on the path relative to the package root.
Part 4 of the series proposed in NVIDIA#2410. Filesystem predicates and path joining in the pathfinder tests now go through pathlib: os.path.isfile/isdir become Path.is_file()/is_dir(), os.path.basename becomes Path.name, os.path.join becomes Path joining, and the site-packages check uses Path.parts instead of splitting on os.path.sep. site_pkg_rel.replace("/", os.sep) is dropped in test_find_static_lib.py: Path already accepts forward slashes on Windows. Two files are left out on purpose. test_find_nvidia_binaries.py moves with part 3, whose signature changes it depends on. test_search_steps.py is being edited by NVIDIA#2489 (part 1), so converting it here would only create a conflict. Left on the stdlib modules: glob.glob in test_find_nvidia_headers.py, which expands an absolute pattern from the header catalog (Path.glob needs a base dir, and the wildcard is not pinned to the last component); os.pathsep in test_ctk_root_discovery.py, which builds PYTHONPATH, not a path; and os.sep in test_utils_env_vars.py, which builds a trailing separator on purpose. Signed-off-by: LeSingh1 <sshaurya914@gmail.com>
Windows coverage has not collected a test since 2026-03-17. The job builds its wheels with a plain `pip wheel`, which never reads [tool.cibuildwheel], so the delvewheel repair every other Windows build performs never ran here. Those wheels import a bare "MSVCP140.dll" and resolve it against whatever the test machine has in System32, which on the coverage runner is 14.00.24215.1, built in 2015. _resource_handles.pyd is compiled by MSVC 14.44 and imports exactly _Mtx_lock and _Mtx_unlock from that DLL -- never _Mtx_init_in_situ, because std::mutex has had a constexpr constructor since VS 2022 17.10. The 2015 runtime still expects that initialisation and dereferences a null handle on the first lock, which _stream.pyx takes while cuda.core is still importing. It is the only extension module in either package that locks a mutex, which is why cuda.bindings and cuda.pathfinder have always passed on the same machine. Repairing the wheels vendors msvcp140 14.44 into cuda_core.libs and rewrites the import tables to match, so the process no longer depends on what the test machine carries. Verified on the coverage runner: 18 failed, 2929 passed, 918 skipped in 346s, against three to seven seconds of dying beforehand, and the first Windows coverage data since March. The same commit pins cuda-bindings to the wheel built one step earlier. PIP_PRE is set so pip will consider that wheel at all -- it carries a .devN version -- but it also admits PyPI's pre-releases, and cuda-bindings 13.4.0b1, published 2026-07-29, outranks the local build. Its cydriver.pxd comes from CTK 13.4 headers where CUmemLocation has a `localized` field, while cuda.core compiles against the 13.3.0 mini-CTK where it does not, so the build has been failing on `error C2039` ever since. Signed-off-by: Rui Luo <ruluo@nvidia.com>
* cuda.core: accept ProgramOptions(name=None) ProgramOptions.name is annotated str | None, but __post_init__ called .encode() on it unconditionally, so passing None raised AttributeError before any CUDA call was reached. Normalize None to the documented default, matching how arch is handled in the same method. The encoded value is identical to the existing default path, so the bytes passed to nvrtcCreateProgram are unchanged. Signed-off-by: Aryan <aryansputta@gmail.com> * cuda.core: cover name=None through compile and add a release note Extend coverage past ProgramOptions construction to assert the normalized name reaches ObjectCode.name, matching the shape of test_program_compile_valid_target_type. Signed-off-by: Aryan <aryansputta@gmail.com> * cuda.core: drop the redundant compile-level test and the name constant ObjectCode.name receives an already-normalized options.name, so the compile-level assertion could not fail independently of the options test. Inline the default literal instead of a module constant, which kept a private symbol out of the generated stub. Signed-off-by: Aryan <aryansputta@gmail.com> --------- Signed-off-by: Aryan <aryansputta@gmail.com> Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* cuda.bindings tests: enable BAR lookup test on GH200 * cuda_bindings fixes --------- Co-authored-by: Ralf Juengling <rjuengling@utskinnyjoe-dvt-65.ipp2u1.colossus.nvidia.com>
* cuda.core: validate pinned pool support Reject unsupported host memory pools during allocation instead of allowing a later copy to fail with CUDA_ERROR_INVALID_VALUE. Signed-off-by: Uday Arora <udaya@nvidia.com> * cuda.core: tighten pinned host pool capability check Drop the unnecessary CUDA 12 fence around host_memory_pools_supported, raise RuntimeError instead of a synthetic CUDAError, and keep the regression test hardware-gated for devices without host memory pools. --------- Signed-off-by: Uday Arora <udaya@nvidia.com> Co-authored-by: Andy Jost <ajost@nvidia.com>
…VIDIA#2503) `VirtualMemoryResource.__init__` classifies "host", "host_numa" and "host_numa_current" all as host-located (it clears `self.device` for each), but `is_host_accessible` compared with `== "host"`. A resource configured with `location_type="host_numa"` or `"host_numa_current"` therefore reported `is_host_accessible is False` *and* `is_device_accessible is False` -- an impossible answer that propagates to `Buffer.is_host_accessible`, which forwards to the memory resource. Share a single `_HOST_LOCATION_TYPES` set between the constructor and the property so the two classifications cannot drift again.
…VIDIA#2525) * cuda.core: validate ctypes host callback signatures against CUhostFn Reject incompatible ctypes prototypes before CUDA sees them, document the required ABI, and note the stronger checking in the 1.2.0 release notes. * cuda.core: make ctypes flag lookups stubgen/mypy-friendly Use getattr for private ctypes calling-convention constants so the regenerated _host_callback.pyi type-checks cleanly. * cuda.core: check host callback prototypes via public ctypes attributes The previous check inspected ctypes' private _flags_ bits to identify the calling convention. That is wrong on Windows: CPython defines FUNCFLAG_STDCALL as 0, so a bitwise test can never match WINFUNCTYPE, and every win-64 test job rejected a valid callback. The 0x2 fallback used when _ctypes.FUNCFLAG_STDCALL is absent is FUNCFLAG_HRESULT, not stdcall. Drop the calling-convention check rather than repair the bit arithmetic. ctypes only honors stdcall when building a callback on 32-bit x86 Windows, which cuda.core does not support, and FUNCFLAG_PYTHONAPI is never consulted on the callback path, so CFUNCTYPE, WINFUNCTYPE, and PYFUNCTYPE all yield the same FFI_DEFAULT_ABI thunk. That leaves the declared result and argument types, which are reachable through the public restype/argtypes attributes. Reading those public attributes also lets a function pointer taken from a shared library be accepted once its restype and argtypes are declared, which the class-level lookup could never see.
* ci: constrain internal builds to exact local wheels * ci: keep CI tool tests in nightly workflow * ci: generate local wheel constraints in workflows
…IA#2532) NVIDIA#2384 inserted a pypi-dependencies header mid-table, moving conda test deps to PyPI without updating lockfiles. Fresh CI installs then dropped the local cuda-bindings/cuda-core source packages, causing ModuleNotFoundError.
…026-08-10+0131 # Conflicts: # .github/workflows/build-wheel.yml # cuda_bindings/cuda/bindings/_internal/cufile.pxd # cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx # cuda_bindings/cuda/bindings/_test_helpers/arch_check.py # cuda_bindings/cuda/bindings/cufile.pxd # cuda_bindings/cuda/bindings/cufile.pyx # cuda_bindings/cuda/bindings/cycufile.pxd # cuda_bindings/cuda/bindings/cycufile.pyx # cuda_core/tests/conftest.py # cuda_pathfinder/cuda/pathfinder/_dynamic_libs/descriptor_catalog.py # cuda_python_test_helpers/cuda_python_test_helpers/_pytest_plugin.py
Contributor
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
Sign up for freeto 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
Merge the current
mainhistory into13.4.xto establish a shared baseline for the next release-preparation update.The corresponding release changes will follow in a separate PR.