mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-27 20:04:35 +00:00
metal : put warning in kernel_norm to not combine the loops
This commit is contained in:
parent
5e1c4089d8
commit
ed92c3d4b2
@ -235,6 +235,12 @@ kernel void kernel_norm(
|
|||||||
|
|
||||||
// VARIANCE
|
// VARIANCE
|
||||||
// parallel sum
|
// parallel sum
|
||||||
|
//
|
||||||
|
// WARNING: combining this loop with the one above will give you wrong results for nth == 256
|
||||||
|
// I have no idea why, so for now I am keeping them separate. But this behavior is very concerning.
|
||||||
|
// Tested with:
|
||||||
|
// ./perplexity -m ./falcon-7b/ggml-model-q4_0.gguf -f wiki.test.raw -ngl 1 -t 4
|
||||||
|
//
|
||||||
sum[tpitg] = 0.0f;
|
sum[tpitg] = 0.0f;
|
||||||
for (int i00 = tpitg; i00 < ne00; i00 += ntg) {
|
for (int i00 = tpitg; i00 < ne00; i00 += ntg) {
|
||||||
sum[tpitg] += y[i00] * y[i00];
|
sum[tpitg] += y[i00] * y[i00];
|
||||||
|
Loading…
Reference in New Issue
Block a user