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

bug: (libxsmm) fix the little matmul use case #3956

Merged
merged 2 commits into from
Feb 24, 2025

Conversation

qaco
Copy link
Collaborator

@qaco qaco commented Feb 24, 2025

The use case contained 4 bugs according to computing a matmul:
1- Bad order of vfmadd parameters (AT&T syntax instead of Intel syntax)
2- vfmadd231pd instead of vfmadd231ps (double precision instead of single precision)
3- Incosistency between B dimensions (4x2) and C dimensions (4x4)
4- (performance bug, avoidable dependency) Load all B columns in the same register

@qaco qaco added bug Something isn't working backend Compiler backend in xDSL labels Feb 24, 2025
@qaco qaco self-assigned this Feb 24, 2025
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.31%. Comparing base (403f084) to head (3250e56).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3956   +/-   ##
=======================================
  Coverage   91.31%   91.31%           
=======================================
  Files         468      468           
  Lines       58144    58144           
  Branches     5582     5580    -2     
=======================================
+ Hits        53094    53096    +2     
+ Misses       3623     3622    -1     
+ Partials     1427     1426    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@compor compor left a comment

Choose a reason for hiding this comment

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

I am not sure how to review this as (apart from the multiple issues), I have no way of verifying (easily) the above.

There are two aspects:

  1. Maybe it is time to invest in an "experiments repo"; I can see this being easily called in from a main() stub that provides the inputs. Moreover, I have a machine here that can run those if needed.
  2. I can't pretend that I understand the assembly code's performance, just by reading it on a PR, although it is still easily parsable by a human

Based on these take my "Approval" at face value.

Copy link
Contributor

@emmau678 emmau678 left a comment

Choose a reason for hiding this comment

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

It looks good to me

@qaco
Copy link
Collaborator Author

qaco commented Feb 24, 2025

I am not sure how to review this as (apart from the multiple issues), I have no way of verifying (easily) the above.

There are two aspects:

1. Maybe it is time to invest in an "experiments repo"; I can see this being easily called in from a `main()` stub that provides the inputs. Moreover, I have a machine here that can run those if needed.

2. I can't pretend that I understand the assembly code's performance, just by reading it on a PR, although it is still easily parsable by a human

Based on these take my "Approval" at face value.

Fully agree on your idea to enhance the testing framework. Do you think this "validation" step should be performed in a separate repo or in a subdirectory of xdsl/tests ?

@compor
Copy link
Collaborator

compor commented Feb 24, 2025

Fully agree on your idea to enhance the testing framework. Do you think this "validation" step should be performed in a separate repo or in a subdirectory of xdsl/tests ?

I don't think there is a perfect solution, but we've had success with a separate repo when using a setup that has quite hefty dependencies.

I think the case here is much simpler, although not without overhead (syncing the repos, etc.), but such is life :-)

@qaco qaco merged commit eb4b23a into xdslproject:main Feb 24, 2025
16 checks passed
@qaco qaco deleted the hugo/matmul_example branch February 24, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Compiler backend in xDSL bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants