Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a snitch_stream kernel for relu #62

Merged
merged 6 commits into from
Nov 3, 2023
Merged

add a snitch_stream kernel for relu #62

merged 6 commits into from
Nov 3, 2023

Conversation

superlopuh
Copy link
Collaborator

No description provided.

riscv.directive ".globl" "relu"
riscv.directive ".p2align" "2"
riscv_func.func @relu(%X : !riscv.reg<a0>, %Y : !riscv.reg<a1>) {
%X_moved = riscv.mv %X : (!riscv.reg<a0>) -> !riscv.reg<>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unallocated

%Y_moved = riscv.mv %Y : (!riscv.reg<a1>) -> !riscv.reg<>

%zero_int = riscv.get_register : () -> !riscv.reg<zero>
%zero_float = riscv.fcvt.d.w %zero_int : (!riscv.reg<zero>) -> !riscv.freg<ft3>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allocated in order not to clash with ft2, still haven't implemented that

Copy link

github-actions bot commented Nov 3, 2023

kernel size version cycles
relu 16x16xf64 baseline.x 1339
relu 16x16xf64 ssr.x 846
relu 16x16xf64 ssr_frep_unroll.x 334
relu 16x16xf64 snitch_stream.x 322
relu 16x16xf64 linalg.x 1337
relu 16x16xf64 ssr_frep.x 327
dsum 8x16xf32 baseline.x 1202
dsum 8x16xf32 ssr2d.x 273
dsum 8x16xf32 ssr1d_frep1d.x 187
dsum 8x16xf32 scf.x 1227
dsum 8x16xf32 ssr1d.x 253
dsum 8x16xf32 linalg.x 1089
dsum 8x16xf32 noalias.x 1202
matmul 8x8xf64 baseline.x 4230
matmul 8x8xf64 linalg.x 6214

@superlopuh superlopuh merged commit c693d2e into main Nov 3, 2023
2 checks passed
@superlopuh superlopuh deleted the sasha/relu-snst branch November 3, 2023 17:17
Copy link

github-actions bot commented Nov 3, 2023

kernel size version cycles
relu 16x16xf64 baseline.x 1339
relu 16x16xf64 ssr.x 846
relu 16x16xf64 ssr_frep_unroll.x 334
relu 16x16xf64 snitch_stream.x 322
relu 16x16xf64 linalg.x 1337
relu 16x16xf64 ssr_frep.x 327
dsum 8x16xf32 baseline.x 1202
dsum 8x16xf32 ssr2d.x 273
dsum 8x16xf32 ssr1d_frep1d.x 187
dsum 8x16xf32 scf.x 1227
dsum 8x16xf32 ssr1d.x 253
dsum 8x16xf32 linalg.x 1089
dsum 8x16xf32 noalias.x 1202
matmul 8x8xf64 baseline.x 4230
matmul 8x8xf64 linalg.x 6214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants