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 linalg and linalg_xdsl matmul f32 #317

Merged
merged 2 commits into from
Oct 21, 2024
Merged

add linalg and linalg_xdsl matmul f32 #317

merged 2 commits into from
Oct 21, 2024

Conversation

superlopuh
Copy link
Collaborator

No description provided.

@superlopuh superlopuh requested a review from compor October 18, 2024 21:20
@superlopuh superlopuh self-assigned this Oct 18, 2024
@@ -104,7 +104,11 @@ TESTSET_FAST = [
# 3d templated kernels
*expand(
"matmul_transb/4x16x16xf32/{variant}",
variant=["baseline", "snrt", "snitch_stream"],
variant=["linalg", "baseline", "snrt", "snitch_stream"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh yeah I added linalg here as well since it just works

Copy link
Contributor

Choose a reason for hiding this comment

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

linalg == "MLIR" flow? right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note that this isn't the input to "ours" as we cannot yet legalize it for f32 in xDSL

Copy link

kernels,baseline,linalg,linalg_xdsl,snitch_stream,snrt
conv2d_d1_s1_3x3 4x4xf64,667,858,308,,
ddot 128xf64,956,965,,213,577
dense 8x8xf64,3206,3530,,2741,2723
fill 4x4xf64,50,50,64,,
matmul 4x16x8xf64,2495,2694,708,,
matmul_transb 4x16x16xf32,3386,5038,,845,849
matmul_transb 4x16x16xf64,,5142,1295,,
pooling_nchw_max_d1_s2_3x3 4x4xf64,584,484,275,,
pooling_nchw_sum_d1_s2_3x3 4x4xf64,902,832,271,,
relu 4x4xf64,142,125,72,,
relu 4x8xf32,297,210,,67,85
saxpy 64xf32,634,634,,,140
sum 4x4xf64,129,162,87,,
sum 4x8xf32,238,247,87,,72
sum 8x8xf16,821,,65,,

Copy link

kernels,baseline,linalg,linalg_xdsl,snitch_stream,snrt
conv2d_d1_s1_3x3 4x4xf64,0.22,0.17,0.58,,
ddot 128xf64,0.13,0.13,,0.64,0.22
dense 8x8xf64,0.20,0.18,,0.26,0.26
fill 4x4xf64,0.02,0.02,0.28,,
matmul 4x16x8xf64,0.21,0.19,0.82,,
matmul_transb 4x16x16xf32,0.21,0.20,,0.76,0.79
matmul_transb 4x16x16xf64,,0.20,0.89,,
pooling_nchw_max_d1_s2_3x3 4x4xf64,0.39,0.30,0.65,,
pooling_nchw_sum_d1_s2_3x3 4x4xf64,0.22,0.17,0.66,,
relu 4x4xf64,0.13,0.14,0.25,,
relu 4x8xf32,0.33,0.16,,0.28,0.22
saxpy 64xf32,0.10,0.10,,,0.46
sum 4x4xf64,0.13,0.10,0.20,,
sum 4x8xf32,0.14,0.13,0.20,,0.24
sum 8x8xf16,0.31,,0.26,,

@superlopuh superlopuh merged commit 1fc89dd into main Oct 21, 2024
1 check passed
Copy link

kernels,baseline,linalg,linalg_xdsl,snitch_stream,snrt
conv2d_d1_s1_3x3 4x4xf64,667,858,308,,
ddot 128xf64,956,965,,213,577
dense 8x8xf64,3206,3530,,2741,2723
fill 4x4xf64,50,50,64,,
matmul 4x16x8xf64,2495,2694,708,,
matmul_transb 4x16x16xf32,3386,5038,,845,849
matmul_transb 4x16x16xf64,,5142,1295,,
pooling_nchw_max_d1_s2_3x3 4x4xf64,584,484,275,,
pooling_nchw_sum_d1_s2_3x3 4x4xf64,902,832,271,,
relu 4x4xf64,142,125,72,,
relu 4x8xf32,297,210,,67,85
saxpy 64xf32,634,634,,,140
sum 4x4xf64,129,162,87,,
sum 4x8xf32,238,247,87,,72
sum 8x8xf16,821,,65,,

Copy link

kernels,baseline,linalg,linalg_xdsl,snitch_stream,snrt
conv2d_d1_s1_3x3 4x4xf64,0.22,0.17,0.58,,
ddot 128xf64,0.13,0.13,,0.64,0.22
dense 8x8xf64,0.20,0.18,,0.26,0.26
fill 4x4xf64,0.02,0.02,0.28,,
matmul 4x16x8xf64,0.21,0.19,0.82,,
matmul_transb 4x16x16xf32,0.21,0.20,,0.76,0.79
matmul_transb 4x16x16xf64,,0.20,0.89,,
pooling_nchw_max_d1_s2_3x3 4x4xf64,0.39,0.30,0.65,,
pooling_nchw_sum_d1_s2_3x3 4x4xf64,0.22,0.17,0.66,,
relu 4x4xf64,0.13,0.14,0.25,,
relu 4x8xf32,0.33,0.16,,0.28,0.22
saxpy 64xf32,0.10,0.10,,,0.46
sum 4x4xf64,0.13,0.10,0.20,,
sum 4x8xf32,0.14,0.13,0.20,,0.24
sum 8x8xf16,0.31,,0.26,,

@superlopuh superlopuh deleted the sasha/matmul-f32 branch October 21, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants