Skip to content

[Bug]: Using pytest --forked when CUDA is not generally fork-safe #3557

Closed
@sangstar

Description

@sangstar

Your current environment

The environment vLLM uses to CI test a PR.

🐛 Describe the bug

Multiple tests for my pull request are failing due to pytest --forked trying to fork new child processes during testing, trying to re-initialize the CUDA context. I'm not sure how other PRs are passing these tests, but I don't know why pytest --forked is explicitly being used when CUDA isn't fork-safe.

This is fine as long as conftest.py doesn't ever initialize CUDA before forking, but this may be difficult to maintain and may be a cause of some sneaky bugs, like from #3487

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions