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 fp8 quantization for conv and linear layers #277

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

nithinsubbiah
Copy link
Contributor

@nithinsubbiah nithinsubbiah commented Oct 14, 2024

This is a follow-up to (#202) which injects fp8 linear and convolution kernels in punet.

@nithinsubbiah nithinsubbiah marked this pull request as draft October 14, 2024 16:33
@nithinsubbiah nithinsubbiah marked this pull request as ready for review October 14, 2024 23:56
@nithinsubbiah nithinsubbiah enabled auto-merge (squash) October 17, 2024 23:32
@nithinsubbiah nithinsubbiah merged commit ec5672e into nod-ai:main Oct 17, 2024
8 of 9 checks passed
nithinsubbiah added a commit that referenced this pull request Oct 17, 2024
@@ -80,7 +80,7 @@ def generate(self, ksel: KernelSelection, kb: KernelBuilder):
spec_sig = f"L{a_ident}_R{b_ident}"
template_file = "batch_matmul_transpose_b.mlir"
target_function_name = f"sharktank_batch_matmul_transpose_b_{spec_sig}"

cst_zero = "0." if "f" in str(accum_type) else "0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Be specific. Don't just use stringy char-in-str.

In this case, I think you can say something like:

cst_zero = "0" if IntegerType.isa(accum_type) else "0."

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