Skip to content

Commit

Permalink
Merge branch 'main' into sasha/snitch-toy
Browse files Browse the repository at this point in the history
  • Loading branch information
superlopuh committed Nov 1, 2023
2 parents c11e050 + 211c806 commit 55181e9
Show file tree
Hide file tree
Showing 33 changed files with 2,067 additions and 321 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci-experiments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run experiments

on:
push:
branches:
- main
pull_request:

jobs:
run-experiments:
runs-on: ubuntu-latest
container: ghcr.io/nazavode/snitch-toolchain:2.3
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Run experiments
run: scripts/run.sh --abort-on-error --tag cirun
- name: Read CSV
id: csv
uses: juliangruber/read-file-action@v1
with:
path: results/cycles_cirun.csv
- name: Create MD
uses: petems/csv-to-md-table-action@master
id: csv-table-output
with:
csvinput: ${{ steps.csv.outputs.content }}
- uses: mshick/add-pr-comment@v1
with:
message: |
${{steps.csv-table-output.outputs.markdown-table}}
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub tokens
allow-repeats: true
16 changes: 1 addition & 15 deletions kernels/dsum/8x16xf32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,14 @@

include ../../../snitch/Makefile.rules

PRES =
PRES += pres_0_llvm.x
PRES += pres_1_llvm_clean.x
PRES += pres_2_ssr_loop.x
PRES += pres_3_ssr_frep.x

TESTS = $(PRES)
TESTS =
TESTS += baseline.x
TESTS += noalias.x
TESTS += ssr1d.x
TESTS += ssr1d_frep1d.x
TESTS += ssr2d.x
TESTS += linalg.x
TESTS += vector.x
TESTS += scf.x
TESTS += linalg_2.x

include ../../Makefile.kernels

# Presentation specific

all-pres: $(PRES)

allrun-pres: TESTS=$(PRES)
allrun-pres: $(RUN)
31 changes: 0 additions & 31 deletions kernels/dsum/8x16xf32/pres_0_llvm.S.txt

This file was deleted.

30 changes: 0 additions & 30 deletions kernels/dsum/8x16xf32/pres_1_llvm_clean.S.txt

This file was deleted.

34 changes: 0 additions & 34 deletions kernels/dsum/8x16xf32/pres_2_ssr_loop.S.txt

This file was deleted.

31 changes: 0 additions & 31 deletions kernels/dsum/8x16xf32/pres_3_ssr_frep.S.txt

This file was deleted.

9 changes: 9 additions & 0 deletions kernels/matmul/16x16xf64/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DEFAULT_GOAL := all

include ../../../snitch/Makefile.rules

TESTS =
TESTS += baseline.x
TESTS += linalg.x

include ../../Makefile.kernels
16 changes: 16 additions & 0 deletions kernels/matmul/16x16xf64/baseline.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "data.h"

#include <snrt.h>

#include <stdint.h>

void matmul(const double* x, const double* y, double* g) {
for (uint32_t i = 0; i < M; ++i) {
for (uint32_t j = 0; j < N; ++j) {
for (uint32_t k = 0; k < K; ++k) {
// row-major accesses
g[i * N + j] += x[i * K + k] * y[k * N + j];
}
}
}
}
Loading

0 comments on commit 55181e9

Please sign in to comment.