#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
- const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float x = ((float *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*(dst->nb[1])))[k];
GGML_UNUSED(x);
assert(!isnan(x));
assert(!isinf(x));
}
-#endif
+#endif // NDEBUG
}
}
#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
- const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*( dst->nb[1])))[k];
const float v = GGML_CPU_FP16_TO_FP32(x);
GGML_UNUSED(v);
assert(!isnan(v));
assert(!isinf(v));
}
-#endif
+#endif // NDEBUG
}
}
#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
- const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float x = ((float *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*(dst->nb[1])))[k];
GGML_UNUSED(x);
assert(!isnan(x));
assert(!isinf(x));
}
-#endif
+#endif // NDEBUG
}
}
#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
- const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*( dst->nb[1])))[k];
const float v = GGML_CPU_FP16_TO_FP32(x);
GGML_UNUSED(v);
assert(!isnan(v));
assert(!isinf(v));
}
-#endif
+#endif // NDEBUG
}
}
#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
- const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float x = ((float *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*(dst->nb[1])))[k];
GGML_UNUSED(x);
assert(!isnan(x));
assert(!isinf(x));
}
-#endif
+#endif // NDEBUG
}
}
#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
- const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*( dst->nb[1])))[k];
const float v = GGML_CPU_FP16_TO_FP32(x);
GGML_UNUSED(v);
assert(!isnan(v));
assert(!isinf(v));
}
-#endif
+#endif // NDEBUG
}
}
#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
- const float x = ((float *) ((char *) dst->data + i1*(dst->nb[1])))[k];
+ const float x = ((float *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*(dst->nb[1])))[k];
GGML_UNUSED(x);
assert(!isnan(x));
assert(!isinf(x));
}
-#endif
+#endif // NDEBUG
}
}
#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
- const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*(dst->nb[1])))[k];
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*( dst->nb[1])))[k];
const float v = GGML_CPU_FP16_TO_FP32(x);
GGML_UNUSED(v);
assert(!isnan(v));
assert(!isinf(v));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(x));
assert(!isinf(x));
}
-#endif
+#endif // NDEBUG
}
}
(ggml_fp16_t *) ((char *) src1->data + i1*(src1->nb[1])),
(ggml_fp16_t *) ((char *) grad->data + i1*(grad->nb[1])));
- #ifndef NDEBUG
+#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
const float x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
const float v = GGML_CPU_FP16_TO_FP32(x);
assert(!isnan(v));
assert(!isinf(v));
}
- #endif
+#endif // NDEBUG
}
}
assert(!isnan(x));
assert(!isinf(x));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(v));
assert(!isinf(v));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(x));
assert(!isinf(x));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(v));
assert(!isinf(v));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(x));
assert(!isinf(x));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(v));
assert(!isinf(v));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(x));
assert(!isinf(x));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(x));
assert(!isinf(x));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(v));
assert(!isinf(v));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(x));
assert(!isinf(x));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(v));
assert(!isinf(v));
}
-#endif
+#endif // NDEBUG
}
}
//printf("p[%d] = %f\n", i, p[i]);
assert(!isnan(wp[i]));
}
-#endif
+#endif // NDEBUG
float max = -INFINITY;
ggml_vec_max_f32(ne00, &max, wp);
assert(!isnan(dp[i]));
assert(!isinf(dp[i]));
}
-#endif
+#endif // NDEBUG
}
}
}
assert(!isnan(dy[i]));
assert(!isnan(y[i]));
}
-#endif
+#endif // NDEBUG
// Jii = yi - yi*yi
// Jij = -yi*yj
// J = diag(y)-y.T*y
assert(!isnan(dx[i]));
assert(!isinf(dx[i]));
}
-#endif
+#endif // NDEBUG
}
}
assert(!isnan(s0[i]));
assert(!isnan(s1[i]));
}
-#endif
+#endif // NDEBUG
float max = -INFINITY;
ggml_vec_max_f32(nc, &max, s0);
assert(!isnan(st[i]));
assert(!isinf(st[i]));
}
-#endif
+#endif // NDEBUG
}
sums[ith] = sum_thread;
ggml_barrier(params->threadpool);
assert(!isnan(s0[i]));
assert(!isnan(s1[i]));
}
-#endif
+#endif // NDEBUG
// soft_max
float max = -INFINITY;
assert(!isnan(ds0[i]));
assert(!isinf(ds0[i]));
}
-#endif
+#endif // NDEBUG
}
}