Skip to content

Commit 2a65dcb

Browse files
committed
parallelize matmul via openmp
1 parent ec8c8fe commit 2a65dcb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/infer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
static void matmul(float* xout, float* x, float* w, int n, int d) {
88
// W (d,n) @ x (n,) -> xout (d,)
99
int i;
10+
#pragma omp parallel for private(i)
1011
for (i = 0; i < d; i++) {
1112
float val = 0.0f;
1213
for (int j = 0; j < n; j++) {

0 commit comments

Comments
 (0)