Add FP16 and I64 support for wasi-nn WinML backend. (#8964)
* Add FP16 and I64 support for wasi-nn WinML backend.
Some devices may not support FP32.
prtest:full
* Remove unnecessary features.
* Address comments.
* Check alignment before from_raw_parts.
* Implement PartialEq for Tensor.
* Remove duplicated shape info from set_input.
* Update alignment checker.
* Add comments about creating TensorFloat16Bit from f32 array.
* Use PartialEq attribute.
* Audit new WinML dependencies
---------
Co-authored-by: Andrew Brown <andrew.brown@intel.com>
// f16 is not official supported by stable version of Rust. https://github.com/rust-lang/rust/issues/116909
// Therefore we create TensorFloat16Bit from f32 array. https://microsoft.github.io/windows-docs-rs/doc/windows/AI/MachineLearning/struct.TensorFloat16Bit.html#method.CreateFromArray
notes="This crate has no dependencies, no build.rs, and contains no unsafe code."
[[audits.base64]]
who="Andrew Brown <andrew.brown@intel.com>"
criteria="safe-to-deploy"
delta="0.21.3 -> 0.22.1"
[[audits.bitflags]]
who="Jamey Sharp <jsharp@fastly.com>"
criteria="safe-to-deploy"
@ -2408,6 +2413,12 @@ who = "Pat Hickey <phickey@fastly.com>"
criteria="safe-to-deploy"
delta="0.21.0 -> 0.21.6"
[[audits.rustls]]
who="Andrew Brown <andrew.brown@intel.com>"
criteria="safe-to-deploy"
delta="0.22.4 -> 0.23.7"
notes="No new unsafe code."
[[audits.rustls-webpki]]
who="Pat Hickey <phickey@fastly.com>"
criteria="safe-to-deploy"
@ -2727,6 +2738,12 @@ criteria = "safe-to-deploy"
version="2.9.1"
notes="As advertised, the crate is a blocking HTTP client library; it uses no `unsafe`. Security-conscious users might want to audit its dependencies for crypto-related functionality (e.g., TLS)."
[[audits.ureq]]
who="Andrew Brown <andrew.brown@intel.com>"
criteria="safe-to-deploy"
delta="2.9.6 -> 2.10.0"
notes="No `unsafe` changes; this audit observed mainly license and documentation changes."
[[audits.url]]
who="Alex Crichton <alex@alexcrichton.com>"
criteria="safe-to-deploy"
@ -3419,6 +3436,12 @@ criteria = "safe-to-run"
delta="4.4.0 -> 5.0.0"
notes="Only one `unsafe` block, it's what a `which` crate is expected to be."
[[audits.windows-implement]]
who="Andrew Brown <andrew.brown@intel.com>"
criteria="safe-to-deploy"
version="0.52.0"
notes="Procedural macros for accessing COM interfaces; necessarily `unsafe` but safety rationale is clearly documented."
[[audits.winx]]
who="Dan Gohman <dev@sunfishcode.online>"
criteria="safe-to-deploy"
@ -3491,6 +3514,12 @@ criteria = "safe-to-deploy"
version="1.2.0"
notes="This crate contains `unsafe` calls to libc `extattr_*` functions as one would expect from the crate's purpose."