metal : add FLOOR, CEIL, ROUND, TRUNC unary ops (#20930)

Co-authored-by: nryoo <nryoo@nryooui-MacBookPro.local>
This commit is contained in:
nuri
2026-03-24 10:13:07 +02:00
committed by GitHub
co-authored by nryoo
parent 342d6125bc
commit 92080b4396
4 changed files with 28 additions and 0 deletions
+4
View File
@@ -1039,6 +1039,10 @@ bool ggml_metal_device_supports_op(ggml_metal_device_t dev, const struct ggml_te
case GGML_UNARY_OP_EXP:
case GGML_UNARY_OP_SOFTPLUS:
case GGML_UNARY_OP_EXPM1:
case GGML_UNARY_OP_FLOOR:
case GGML_UNARY_OP_CEIL:
case GGML_UNARY_OP_ROUND:
case GGML_UNARY_OP_TRUNC:
return ggml_is_contiguous_rows(op->src[0]) && (op->src[0]->type == GGML_TYPE_F32 || op->src[0]->type == GGML_TYPE_F16);
default:
return false;