vulkan: Additional type support for unary, binary, and copy (#13266)

Support f16->f32 copy.
Support f16->f16 and f32->f32 unary ops.
Support all combinations of f16/f32 for src0/src1/dst for add/sub/mul/div.
This commit is contained in:
Jeff Bolz
2025-05-04 00:17:16 -05:00
committed by GitHub
parent 3e959f0976
commit 8ae5ebcf85
5 changed files with 162 additions and 88 deletions

View File

@@ -16,5 +16,5 @@ void main() {
if (i >= p.KX) {
return;
}
data_d[i] = D_TYPE(1. - 2. / (exp(2.*data_a[i]) + 1.));
data_d[i] = D_TYPE(1. - 2. / (exp(2.*float(data_a[i])) + 1.));
}