Spaces:
Running
Running
cuda : assert ggml_add sources to be contiguous
Browse files- ggml-cuda.cu +3 -0
ggml-cuda.cu
CHANGED
|
@@ -6142,6 +6142,9 @@ inline void ggml_cuda_op_add(
|
|
| 6142 |
const ggml_tensor * src0, const ggml_tensor * src1, ggml_tensor * dst,
|
| 6143 |
const float * src0_dd, const float * src1_dd, float * dst_dd, const cudaStream_t & main_stream) {
|
| 6144 |
|
|
|
|
|
|
|
|
|
|
| 6145 |
GGML_ASSERT(src1->type == GGML_TYPE_F32);
|
| 6146 |
|
| 6147 |
const int64_t ne10 = src1->ne[0];
|
|
|
|
| 6142 |
const ggml_tensor * src0, const ggml_tensor * src1, ggml_tensor * dst,
|
| 6143 |
const float * src0_dd, const float * src1_dd, float * dst_dd, const cudaStream_t & main_stream) {
|
| 6144 |
|
| 6145 |
+
GGML_ASSERT(ggml_is_contiguous(src0));
|
| 6146 |
+
GGML_ASSERT(ggml_is_contiguous(src1));
|
| 6147 |
+
|
| 6148 |
GGML_ASSERT(src1->type == GGML_TYPE_F32);
|
| 6149 |
|
| 6150 |
const int64_t ne10 = src1->ne[0];
|