diff --git a/wit/wasi-nn.wit b/wit/wasi-nn.wit index 3e54249..13f25b7 100644 --- a/wit/wasi-nn.wit +++ b/wit/wasi-nn.wit @@ -53,8 +53,17 @@ interface tensor { // Describe the type of element in the tensor (e.g., `f32`). ty: func() -> tensor-type; - // Return the tensor data. - data: func() -> tensor-data; + // Return the tensor data. Returns an error if not a cpu tensor. + data: func() -> result; + + //Copies tensor to cpu. + cpu: func() -> tensor; + + //Copies tensor to gpu. + gpu: func() -> tensor; + + //Copies tensor to device + to: func(device: execution-target) -> tensor; } }