From 8202cfc395cd9930bae8ba5ac8b9d54ed64e76d4 Mon Sep 17 00:00:00 2001 From: Phillis Tang Date: Thu, 29 May 2025 16:59:30 -0700 Subject: [PATCH] define graph.devices --- index.bs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/index.bs b/index.bs index 1fe3a244..85eafe3f 100644 --- a/index.bs +++ b/index.bs @@ -1374,8 +1374,15 @@ A {{MLContext}} is lost if its The {{MLGraph}} interface represents a compiled computational graph. A compiled graph once constructed is immutable and cannot be subsequently changed. @@ -1405,6 +1412,17 @@ interface MLGraph { +### {{MLGraph/devices}} ### {#api-mlgraph-devices} +The devices attribute is a {{FrozenArray}} containing the list of {{MLDeviceType}}s that the {{MLGraph}} will be executed on. A graph could be executed on multiple types of devices that are one of following: +
+
"cpu"
+
CPU devices.
+
"gpu"
+
GPU devices.
+
"npu"
+
Devices that are not CPU or GPU and have ML acceleration.
+
+ ### {{MLGraph/destroy()}} ### {#api-mlgraph-destroy} The {{MLGraph/destroy()}} method can be called to release all resources associated with the graph.