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

Implement im2col packing for int8 GEMM #570

Merged
merged 3 commits into from
Feb 3, 2025
Merged

Implement im2col packing for int8 GEMM #570

merged 3 commits into from
Feb 3, 2025

Conversation

robertknight
Copy link
Owner

@robertknight robertknight commented Feb 2, 2025

Implement a method similar to Im2Col::pack_block that packs the image using the different layout used by int8 kernels.

On non-x64 systems there is an unnecessary u8 -> i8 -> u8 double conversion that happens because the Conv operator will receive the image in u8 format, it will create a copy in i8 format and then the kernel will re-convert back to u8 when packing. When a native u8 x u8 -> i32 GEMM is added in future, this can be avoided.

TODO:

  • Benchmark vs. f32 im2col

@robertknight robertknight force-pushed the im2col-int8 branch 3 times, most recently from 9b14925 to 49a4679 Compare February 3, 2025 07:36
@robertknight robertknight marked this pull request as ready for review February 3, 2025 07:40
@robertknight robertknight merged commit 352c986 into main Feb 3, 2025
2 checks passed
@robertknight robertknight deleted the im2col-int8 branch February 3, 2025 07:57
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.

1 participant