-
Notifications
You must be signed in to change notification settings - Fork 1
Add Feature: BLAS GEMM #217
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 adds a new BLAS GEMM implementation and a Global Average Pool node while also refactoring testing code for improved clarity and maintainability. Key changes include:
- Adding a new BLAS GEMM branch (using OpenBLAS) and its corresponding code paths.
- Introducing a GlobalAveragePool node and integrating it into the parser.
- Refactoring test files for image preprocessing and inference (renaming tests and removing kernel flipping code).
Reviewed Changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_image_to_guess.cpp | Refactored image preprocessing/inference tests using new helpers. |
| tests/test_ImageNet.cpp | Updated tests with a new default parameter for model JSON path and clearer test names. |
| src/nodes/global_avg_pool.cpp | Added implementation of the Global Average Pool node. |
| src/nodes/conv.cpp | Removed the kernel flipping functionality as intended. |
| src/include/nodes/global_avg_pool.hpp | Added the header for the Global Average Pool node. |
| src/include/nodes/conv.hpp | Removed obsolete flip_kernel declaration. |
| src/datastructures/tensor_operations_module.tpp | Introduced a new branch for BLAS-based GEMM. |
| src/datastructures/tensor_operation_functions.tpp | Added OpenBLAS GEMM implementation and required includes. |
| src/backend/mml_parser.cpp | Integrated GlobalAveragePool node support in the parser. |
Files not reviewed (3)
- CMakeLists.txt: Language not supported
- Makefile: Language not supported
- src/include/modularml: Language not supported
Comments suppressed due to low confidence (1)
src/nodes/global_avg_pool.cpp:94
- [nitpick] Consider clarifying or removing the ambiguous 'FIX' comment since a clearly named array_mml (in_index) is already used for indexing, to improve code readability.
// *** FIX: use a named array_mml to index ***
GillisC
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.
LGTM
Description
This PR closes multiple issues. See closes.
Adds: BLAS implementation that can be used similar to the AVX versions
Adds: New model to test imagenet against
Removes: flipping the kernel
Remoces: duplicate code
Issue
Closes #216 #215 #214 #213