Skip to content

How to get number of Intel GPUs without dpctl? #1256

@harborn

Description

@harborn

Hi,

I have a question about get device count of Intel GPUs.

By using dpctl, I can easily get count with len(dpctl.get_devices("level_zero", "gpu"))
However, using this API should import dpctl,
If I don't want to import dpctl, how can I get the device count?
Like Nvidia GPU detection: by check the driver list in folder /proc/driver/nvidia/gpus

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions