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

enable cpu integer matmul #126

Closed
wants to merge 4 commits into from
Closed

enable cpu integer matmul #126

wants to merge 4 commits into from

Conversation

maktukmak
Copy link
Contributor

@maktukmak maktukmak commented Mar 20, 2024

Regarding issue #64, torch now supports integer matmul (toch._int_mm) on the CPU at its master branch with this PR merged. Here, I made small changes to enable this kernel on quanto. To use the new backend, install torch nightly build after quanto.

@maktukmak maktukmak requested a review from dacorvo as a code owner March 20, 2024 17:07
@dacorvo
Copy link
Collaborator

dacorvo commented Mar 21, 2024

Thank you for the pull-request ! I'd rather guard the call to int_mm CPU to a minimum pytorch version to avoid errors with current pytorch.
Something like:

from packaging import version

...
if version.parse(torch.__version__) >= version.parse(2.3.0):
    # Use CPU int_mm

@maktukmak
Copy link
Contributor Author

Got it. I added release version control so it can work with the current nightly build.

Copy link
Collaborator

@dacorvo dacorvo left a comment

Choose a reason for hiding this comment

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

Looks good to me, but you need to:

  • fix style (make style from the root directory),
  • rebase on main (no merge please: git rebase <commit-before-your-branch> --onto upstream/main).

@maktukmak
Copy link
Contributor Author

@dacorvo, I rebased and did make style. Let me know if I missed something

@dacorvo
Copy link
Collaborator

dacorvo commented Mar 24, 2024

Merged as #130

@dacorvo dacorvo closed this Mar 24, 2024
@dacorvo
Copy link
Collaborator

dacorvo commented Mar 24, 2024

@dacorvo, I rebased and did make style. Let me know if I missed something

I don't know how you applied styling, but it was all wrong ... I fixed your branch and created another pull-request.

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