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

[Tensorize][TOPI] Add AMX Tensorizing for int8 batch matmul #13745

Merged
merged 6 commits into from
Jan 11, 2023

Conversation

Qianshui-Jiang
Copy link
Contributor

This PR is to tensorize X86 int8 batch matmul based on last AMX PR: #13642
unified batch matmul VNNI and AMX to batch_matmul_int8, then chose different SIMD(VNNI or AMX) of the target to finish tensorizing.
(basicly the same way to x86 dense_int8)

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jan 10, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: tensorize, topi See #10317 for details

Generated by tvm-bot

@Qianshui-Jiang Qianshui-Jiang changed the title [Tensorize][TOPI] Add AMX Tensorizing for batch matmul. [Tensorize][TOPI] Add AMX Tensorizing for int8 batch matmul. Jan 10, 2023
@Qianshui-Jiang Qianshui-Jiang changed the title [Tensorize][TOPI] Add AMX Tensorizing for int8 batch matmul. [Tensorize][TOPI] Add AMX Tensorizing for int8 batch matmul Jan 10, 2023
@Qianshui-Jiang
Copy link
Contributor Author

@tvm-bot rerun

layout_trans = op.input_tensors[1]
batch_matmul_vnni_schedule(cfg, s, op.output(0), outs[0], layout_trans)
print(layout_trans)
Copy link
Member

Choose a reason for hiding this comment

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

remove

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

lib = relay.build(mod, target=target)

asm = lib.lib.get_source("asm")
assert "vpdpbusd" in asm
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a VNNI intrin

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@masahi just for local test and forget to change it back, now already fixed

@masahi masahi merged commit 77b6f0e into apache:main Jan 11, 2023
fzi-peccia pushed a commit to fzi-peccia/tvm that referenced this pull request Mar 27, 2023
…3745)

* amx int8 tensorized x86 bmm

* remove the unused amx schedule

* fix lint

* fix lint

* remove unused import

* fix Instr. assert in testcase.
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.

3 participants