-
Notifications
You must be signed in to change notification settings - Fork 1
Fix Bug: Port over optimizations and fixes #223
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR applies bug fixes and optimizations across multiple GEMM implementations while standardizing memory alignment.
- Refactored memory alignment allocation and added runtime alignment checks.
- Improved tensor gemm implementations for blocked, AVX2, and AVX512 including shape validations and error message adjustments.
- Updated CMake configurations and utility modules to support the new alignment and optimized settings.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/openblas/CMakeLists.txt | Removed hard-coded memory alignment setting to rely on global config. |
| src/default/datastructures/tensor_gemm.cpp | Minor refactoring with removal of extraneous blank line. |
| src/default/datastructures/tensor.cpp | Added new get_raw_data() method. |
| src/default/datastructures/mml_array.cpp | Integrated aligned memory allocation and added alignment validation. |
| src/blocked/datastructures/tensor_gemm.cpp | Revised loop structure for better performance in blocked GEMM. |
| src/blocked/CMakeLists.txt | Removed legacy memory alignment definition. |
| src/avx512/datastructures/tensor_gemm.cpp | Enhanced shape validation and updated AVX512 gemm with corrected error messages. |
| src/avx512/CMakeLists.txt | Updated compile options using target_compile_options for AVX512. |
| src/avx/datastructures/tensor_gemm.cpp | Improved AVX2 gemm with shape checks and aligned memory usage; updated error messaging. |
| src/avx/CMakeLists.txt | Updated compile options for AVX2 with additional flags. |
| include/utility/base64.hpp | Modified memory allocation to support aligned tensor data. |
| include/utility/avx_mask_helper.hpp | Added helper functions for mask creation in AVX2/AVX512 GEMM. |
| include/utility/aligned_alloc.hpp | Introduced aligned memory allocation utility. |
| include/datastructures/tensor.hpp | Documented and declared the new get_raw_data() method. |
| include/datastructures/mml_array.hpp | Updated include dependencies for aligned allocation. |
| CMakeLists.txt | Revised global tensor alignment configuration with new options; potential duplicate condition identified. |
willayy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of code and im not really up to speed XD, but if it works its good :D
|
@ehmc123 Quick question, if you look at avx_mask_helper that is currently sitting in the default folder, would i just be able to split it up and place the helper functions wherever in the avx and avx512 folders or is there some additional configuration that is needed in cmake? |
Description
Issue
Closes #219
Closes #222