cuda : support non-contiguous i32 to i32 copy (#17326)

* support non-contiguous i32 to i32 copy

* add tests

* rename cpy_flt to cpy_scalar and reindent params
This commit is contained in:
Sigbjørn Skjæret
2025-11-23 11:13:34 +01:00
committed by GitHub
parent bc809e9c53
commit 96ac5a2329
4 changed files with 92 additions and 49 deletions
+3
View File
@@ -4115,6 +4115,9 @@ static bool ggml_backend_cuda_device_supports_op(ggml_backend_dev_t dev, const g
if (src0_type == GGML_TYPE_I32 && src1_type == GGML_TYPE_F32) {
return true;
}
if (src0_type == GGML_TYPE_I32 && src1_type == GGML_TYPE_I32) {
return true;
}
if (src0_type == src1_type && ggml_is_contiguous(op->src[0]) && ggml_is_contiguous(op->src[1])) {
return true;
}