Metal: support unary abs (#1503)

* Metal: support unary abs

* cargo fmt
This commit is contained in:
Gonzalo
2023-12-29 20:00:12 -03:00
committed by GitHub
parent 87d7f81b43
commit 0a245e6fa4
3 changed files with 9 additions and 1 deletions

View File

@ -173,7 +173,10 @@ macro_rules! ops{
}
pub mod unary {
ops!(cos, sin, exp, sqr, sqrt, neg, log, gelu, ceil, floor, round, erf, gelu_erf, tanh, recip);
ops!(
cos, sin, exp, sqr, sqrt, neg, log, gelu, abs, ceil, floor, round, erf, gelu_erf, tanh,
recip
);
}
pub mod binary {
ops!(add, sub, mul, div, min, max, eq, ne, le, lt, ge, gt);

View File

@ -102,6 +102,7 @@ UNARY_OP(neg)
UNARY_OP(exp)
UNARY_OP(log)
UNARY_OP(gelu)
UNARY_OP(abs)
UNARY_OP(ceil)
UNARY_OP(floor)
UNARY_OP(round)