-
Notifications
You must be signed in to change notification settings - Fork 91
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
optimization on matrix-matrix mulitplication #172
Open
Fritzkefit
wants to merge
30
commits into
viennacl:master
Choose a base branch
from
Fritzkefit:gemmopt-avx
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…at-mat-mul seems to work now
…case in packing.hpp, mat-mat-mul seems to work now
… added a framework for reading cache sizes, used to calculate block sizes (not yet implemented).
…loads/stores, further bug fixes Renamed "get_cache_sizes.hpp" to "get_block_sizes.hpp", where get_block_sizes() is called evertime prod() is invoked, since we have to dynamically assign mr/nr as they depend on wether float or double entries are processed. The AVX-microkernels work for doubles and float, where the approach taken for float entries differs from that for doubles due to limitations of the AVX-instructions.
…pp), made sure standard-microkernel is working
… accordingly, unfortunately fails due to segfaults on amd-systems, intel-systems untested
The inline assembler in get_cache_sizes() gets a pointer to an array which should be stored in %rdi. This was the only way I could get it to work propperly, as specifying input/output operands would yield segfaults. Therefore, the inline assembler is in a seperate function and relies on the standard register or first function argument (i.e. %rdi). I do not know if this could cause problems on other systems => needs to be tested.
…thouroughly tested CPUID info can be obtained through cpuid-leaf2 or cpuid-leaf4 on intel CPUs. It depends on the CPU, which leaf to use. Both have been implemented and leaf2 works correctly on a core 2 quad q9400. Further,thorough testing and double checking of the huge switch-case for leaf2 has NOT been done.
quick tests did not show any performance impacts
Please enter the commit message for your changes. Lines starting
… of available threads Please enter the commit message for your changes. Lines starting
…emory_create() etc., fixed underflows when calculatiting num_of_blocks.. and num_residue_slivers..
…ther memory_create()s (buffer_A/B)
…lude in matrix_operations.hpp
…ned L1/2/3_AVX/SSE_DENOMs to quickly change what fraction of cache should be filled with the blocks
Thanks, @Fritzkefit ! For documentation purposes: In a face-to-face discussion we agreed that I'll take care of resolving the merge conflicts. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces a BLIS-like approach: a macro-kernel iterates over blocks (of sizes dependent on cache-sizes and available threads) of the matrices being multiplied and a micro-kernel executes the actual multiplication. Two micro-kernels -one using the AVX instruction set, the other using the SSE instruction set- are included.