Skip to content

"Invalid device_id argument supplied" -> typo #723

@GitMensch

Description

@GitMensch

You know, if this would have been open source, then a quick PR would have fixed that...

  File "torch_directml\device.py", line 38, in device
    raise Exception(f"Invalid device_id argument supplied {device_id}. device_id must be in range [0, {num_devices}).")

So the fix seems to be something like:

-    raise Exception(f"Invalid device_id argument supplied {device_id}. device_id must be in range [0, {num_devices}).")
+    raise Exception(f"Invalid device_id argument supplied {device_id}. device_id must be in range [0, {num_devices - 1}].")

--> ] instead of ) and the number of devices is one-based, while the device-id is zero based.

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