Skip to content

the GPU devices number problem #6431

Closed
@Ethan-niu

Description

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

Multi-GPU

Bug

First thank you for your great work!
In the latest verson, when i make the opt parameter device="0", it also use all GPUs.
When I check the function select_device, I found that the potision of 'os.environ['CUDA_VISIBLE_DEVICES'] = device' has an effect on the results. When I put it on the first line of the 'elif device' section, then it works, I dont know why ?

Environment

No response

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

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