Skip to content

Allow example tests to be run on subprocesses #197

Closed

Description

@leofang

Right now we just exec all tests in the main test process

exec(script, env if env else {})

which is fine if there is no subtle bugs in the examples. However, it is not the end user experience (ex: from user perspective CUDA contexts are implicitly created/tear down between each sample runs). We should allow configuring it in the future.

Activity

  1. added
    cuda.coreEverything related to the cuda.core module
    P2Low priority - Nice to have
    testImprovements or additions to tests
    on Oct 29, 2024
  2. cpcloud commented on Aug 26, 2025

    @cpcloud
    Contributor

    Is this still in use?

    It seems like there's not much going on in that script beyond the standard python script.py run. Happy to take a crack at deleting this file and replacing whatever is invoking it with something a bit less custom.

  3. rwgk commented on Aug 26, 2025

    @rwgk
    Contributor

    JIC/FYI: In the meantime I added this for testing cuda_pathfinder dynamic library loading in independent processes:

    """Run `target` in a spawned child process, capturing stdout/stderr.
    The provided `target` must be defined at the top level of a module, and must
    be importable in the spawned child process. Lambdas, closures, or interactively
    defined functions (e.g., in Jupyter notebooks) will not work.
    If `rethrow=True` and the child process exits with a nonzero code,
    raises ChildProcessError with the captured stderr.
    """

    I guess it could also be useful to isolate the cuda_core examples from each other?

  4. removed this from the cuda.bindings backlog milestone on Apr 2, 2026
  5. leofang commented on Jul 1, 2026

    @leofang
    MemberAuthor

    I think this is done by Mike in #1800 and #1842. Closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Low priority - Nice to havecuda.bindingsEverything related to the cuda.bindings modulecuda.coreEverything related to the cuda.core moduletestImprovements or additions to tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions