Skip to content

Commit

Permalink
Update runq.c
Browse files Browse the repository at this point in the history
runq - Undo #pragma omp parallel sections for matmuls for now as there is no real benefit with low number of cores
  • Loading branch information
trholding committed Jul 20, 2024
1 parent 725faaa commit 16e223f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions runq.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,18 +636,9 @@ float* forward(Transformer* transformer, int token, int pos) {

// qkv matmuls for this position
quantize(&s->xq, s->xb, dim);

// L2E Addition
#pragma omp parallel sections
{
#pragma omp section
matmul(s->q, &s->xq, w->wq + l, dim, dim);
#pragma omp section
matmul(s->k, &s->xq, w->wk + l, dim, kv_dim);
#pragma omp section
matmul(s->v, &s->xq, w->wv + l, dim, kv_dim);
}
// END L2E Addition

// RoPE relative positional encoding: complex-valued rotate q and k in each head
for (int i = 0; i < dim; i+=2) {
Expand Down

0 comments on commit 16e223f

Please sign in to comment.