We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a28d36 commit ec983bdCopy full SHA for ec983bd
sharktank/sharktank/utils/iree.py
@@ -26,6 +26,18 @@
26
def get_iree_devices(
27
*, driver: str | None = None, device_count: int = 1
28
) -> List[iree.runtime.HalDevice]:
29
+ """Gets a list of IREE HAL devices for the given driver.
30
+
31
+ The first available device_count devices will be created,
32
+ unless the IREE_DEVICE environment variable is set to an
33
+ explicit list of device URIs.
34
35
+ For example, to select HIP devices 5 and 3:
36
+ ```
37
+ export IREE_DEVICE=hip://5,hip://3
38
+ python ...
39
40
+ """
41
if "IREE_DEVICE" in os.environ:
42
device_uris = [d.strip() for d in os.environ["IREE_DEVICE"].split(",")]
43
driver_names = [n.split("://")[0] for n in device_uris]
0 commit comments