| /wasmtime-44.0.1/crates/wasi-nn/src/backend/ |
| H A D | openvino.rs | 227 impl From<TensorType> for ElementType { 228 fn from(tensor_type: TensorType) -> Self { in from() 230 TensorType::Fp16 => ElementType::F16, in from() 231 TensorType::Fp32 => ElementType::F32, in from() 232 TensorType::Fp64 => ElementType::F64, in from() 233 TensorType::U8 => ElementType::U8, in from() 234 TensorType::I32 => ElementType::I32, in from() 235 TensorType::I64 => ElementType::I64, in from() 236 TensorType::Bf16 => ElementType::Bf16, in from() 242 impl TryFrom<ElementType> for TensorType { implementation [all …]
|
| H A D | pytorch.rs | 275 impl TryFrom<TensorType> for Kind { 280 TensorType::Fp16 => Ok(Kind::Half), in try_from() 281 TensorType::Fp32 => Ok(Kind::Float), in try_from() 283 TensorType::U8 => Ok(Kind::Uint8), in try_from() 284 TensorType::I32 => Ok(Kind::Int), in try_from() 285 TensorType::I64 => Ok(Kind::Int64), in try_from() 295 impl TryFrom<Kind> for TensorType { implementation 300 Kind::Half => Ok(TensorType::Fp16), in try_from() 303 Kind::Uint8 => Ok(TensorType::U8), in try_from() 304 Kind::Int => Ok(TensorType::I32), in try_from() [all …]
|
| H A D | onnx.rs | 7 use crate::wit::types::{ExecutionTarget, GraphEncoding, Tensor, TensorType}; 320 ty: TensorType, 374 fn convert_value_type(vt: &ValueType) -> Result<(Vec<i64>, TensorType), BackendError> { in convert_value_type() argument 393 impl TryFrom<TensorElementType> for TensorType { implementation 397 TensorElementType::Float32 => Ok(TensorType::Fp32), in try_from() 398 TensorElementType::Float64 => Ok(TensorType::Fp64), in try_from() 399 TensorElementType::Uint8 => Ok(TensorType::U8), in try_from() 400 TensorElementType::Int32 => Ok(TensorType::I32), in try_from() 401 TensorElementType::Int64 => Ok(TensorType::I64), in try_from() 412 TensorType::Fp32 => {
|
| H A D | winml.rs | 14 use crate::wit::{ExecutionTarget, GraphEncoding, Tensor, TensorType}; 286 TensorType::Fp16 => unsafe { in to_inspectable() 294 TensorType::Fp32 => unsafe { in to_inspectable() 302 TensorType::I64 => unsafe { in to_inspectable() 324 ty: TensorType::Fp16, in to_tensor() 335 ty: TensorType::Fp32, in to_tensor() 346 ty: TensorType::I64, in to_tensor() 380 ty: TensorType::Fp16, in fp16() 408 ty: TensorType::Fp32, in fp32() 432 ty: TensorType::I64, in i64()
|
| /wasmtime-44.0.1/crates/wasi-nn/src/ |
| H A D | witx.rs | 273 impl From<generated::types::TensorType> for crate::wit::types::TensorType { implementation 274 fn from(value: generated::types::TensorType) -> Self { in from() 276 generated::types::TensorType::F16 => crate::wit::types::TensorType::Fp16, in from() 277 generated::types::TensorType::F32 => crate::wit::types::TensorType::Fp32, in from() 278 generated::types::TensorType::U8 => crate::wit::types::TensorType::U8, in from() 279 generated::types::TensorType::I32 => crate::wit::types::TensorType::I32, in from() 280 generated::types::TensorType::I64 => crate::wit::types::TensorType::I64, in from() 281 generated::types::TensorType::F64 => crate::wit::types::TensorType::Fp64, in from()
|
| H A D | lib.rs | 7 use crate::wit::generated_::wasi::nn::tensor::TensorType; 76 pub ty: TensorType, 155 pub fn new(dimensions: Vec<u32>, ty: TensorType, data: Vec<u8>) -> Self { in new() argument
|
| H A D | wit.rs | 143 pub use generated::tensor::{Tensor, TensorType}; 147 pub use generated::tensor::{Tensor, TensorData, TensorDimensions, TensorType}; 291 ty: TensorType, in new() argument 308 fn ty(&mut self, tensor: Resource<Tensor>) -> wasmtime::Result<TensorType> { in ty() argument
|
| /wasmtime-44.0.1/crates/test-programs/src/ |
| H A D | nn.rs | 25 use self::wasi::nn::tensor::{Tensor, TensorType}; 49 let tensor = Tensor::new(&vec![1, 3, 224, 224], TensorType::Fp32, &input.1); in classify() 89 use wasi_nn::{Graph, GraphBuilder, TensorType}; 117 context.set_input(0, TensorType::F32, &[1, 3, 224, 224], &tensor)?; in classify()
|
| /wasmtime-44.0.1/crates/wasi-nn/examples/classification-component-onnx/src/ |
| H A D | main.rs | 17 tensor::{Tensor, TensorData, TensorDimensions, TensorType}, 74 TensorType::Fp32, in main()
|
| /wasmtime-44.0.1/crates/wasi-nn/examples/classification-example-named/src/ |
| H A D | main.rs | 18 .set_input(0, TensorType::F32, &[1, 3, 224, 224], &tensor_data) in main()
|
| /wasmtime-44.0.1/crates/wasi-nn/examples/classification-example-pytorch/src/ |
| H A D | main.rs | 23 let precision = wasi_nn::TensorType::F32; in main()
|
| /wasmtime-44.0.1/crates/wasi-nn/examples/classification-example-winml/src/ |
| H A D | main.rs | 29 .set_input(0, wasi_nn::TensorType::F32, &[1, 3, 224, 224], &tensor_data) in main()
|