Tweaks to run metavoice on metal (#1792)

* Enable tanh + tweak conv-transpose.

* Run the encodec decoding on cpu.

* Clippy fixes.
This commit is contained in:
Laurent Mazare
2024-03-03 07:46:44 +01:00
committed by GitHub
parent de11623752
commit 09e0148cce
3 changed files with 17 additions and 4 deletions

View File

@ -738,6 +738,7 @@ impl BackendStorage for MetalStorage {
("ufloor", DType::F32) => strided::floor::FLOAT,
("urelu", DType::F32) => strided::relu::FLOAT,
("uround", DType::F32) => strided::round::FLOAT,
("utanh", DType::F32) => strided::tanh::FLOAT,
("ucos", DType::F16) => strided::cos::HALF,
("usin", DType::F16) => strided::sin::HALF,
("usqr", DType::F16) => strided::sqr::HALF,
@ -754,6 +755,7 @@ impl BackendStorage for MetalStorage {
("ufloor", DType::F16) => strided::floor::HALF,
("urelu", DType::F16) => strided::relu::HALF,
("uround", DType::F16) => strided::round::HALF,
("utanh", DType::F16) => strided::tanh::HALF,
(name, dtype) => {
crate::bail!("Metal strided unary {name} {dtype:?} not implemented")
}