Allow benchmark targets to link against a user-specified OpenBLAS library - #5953
Open
naoto-aoki-fy wants to merge 5 commits into
Open
Allow benchmark targets to link against a user-specified OpenBLAS library#5953naoto-aoki-fy wants to merge 5 commits into
naoto-aoki-fy wants to merge 5 commits into
Conversation
- Add OPENBLAS_LIB with the existing library path as the default - Replace direct ../$(LIBNAME) dependencies across benchmark .goto targets
- Add OPENBLAS_LIB_DEP for the default in-tree library dependency - Use OPENBLAS_LIB only on linker command lines - Avoid treating command-line library flags such as -lopenblaso as files
- Include OPENBLAS_LIB_DEP in the smallscaling linker command - Resolve unresolved BLAS symbol references
- Replace the dependency variable with the actual OpenBLAS library variable
This file contains hidden or 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
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.
Summary
This pull request allows benchmark binaries to be linked against a user-specified OpenBLAS library.
It separates the OpenBLAS link argument from the corresponding Make dependency:
OPENBLAS_LIBspecifies the library or linker argument used when linking benchmark binaries.OPENBLAS_LIB_DEPspecifies the file dependency used by Make when building against the in-tree OpenBLAS library.By default, benchmark targets continue to link against
../$(LIBNAME). WhenOPENBLAS_LIBis overridden, the in-tree library dependency is omitted so that linker arguments such as-lopenblaso-r0.3.29are not treated as file prerequisites.Motivation
The benchmark targets currently link directly against
../$(LIBNAME). This makes it difficult to build them against OpenBLAS packages supplied by Linux distributions or against other externally installed OpenBLAS libraries.Making the link argument configurable allows downstream packagers and users to build benchmark binaries against a system-provided OpenBLAS installation, including shared libraries.
For example:
When
OPENBLAS_LIBis not overridden, the existing build behavior is preserved.Changes
OPENBLAS_LIB_DEPas../$(LIBNAME)whenOPENBLAS_LIBis not explicitly set.$(OPENBLAS_LIB_DEP)as the Make prerequisite for.gotobenchmark targets.$(OPENBLAS_LIB)as the OpenBLAS link argument.OPENBLAS_LIBcommand-line variable.Additional notes
developbranch.