Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[FEATURE] Include FlexiBLAS as available vendor. Find BLAS libs #21093

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ccoulombe
Copy link

Include FlexiBLAS as available vendor.
Find BLAS libs to link on Flexiblas.

@mxnet-bot
Copy link

Hey @ccoulombe , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [unix-cpu, unix-gpu, centos-gpu, miscellaneous, windows-cpu, edge, clang, windows-gpu, centos-cpu, sanity, website]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test labels Jul 11, 2022
@@ -33,7 +34,14 @@ if(USE_BLAS MATCHES "MKL" OR USE_BLAS MATCHES "mkl" OR NOT DEFINED USE_BLAS)
endif()
endif()

if(BLAS STREQUAL "Atlas" OR BLAS STREQUAL "atlas")
if(BLAS STREQUAL "FlexiBLAS" OR BLAS STREQUAL "flexiblas")
find_package(BLAS REQUIRED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to set BLA_VENDOR to FlexiBLAS here? https://cmake.org/cmake/help/latest/module/FindBLAS.html#blas-lapack-vendors

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as I do set it at CLI anyway.

It could be done for the others as well.

But I feel it is the same as setting the preferred BLAS with BLAS=FlexiBLAS. Unless you have in mind to refactor a bit so that find_package is by itself unless one set a preferred BLAS?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the other BLAS besides MKL this ChooseBlas.cmake does not rely on the upstream find_package(BLAS). My only concern is that with your PR, users can specify BLAS=FlexiBLAS, but your find_package(BLAS) will find any BLAS that may or may not be FlexiBLAS. That's why it will be helpful for you to force BLA_VENDOR=FlexiBLAS inside this if clause.

So, specifically I'm suggesting adding a set(BLA_VENDOR FlexiBLAS) before the current line but still inside the if clause.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right! Just updated and bumped minimum cmake version to support BLA_VENDOR=Flexiblas.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! How about keeping the CMakeLists.txt cmake_minimum_required as is and adding cmake_minimum_required(VERSION 3.19) before set(BLA_VENDOR FlexiBLAS) inside the if clause? That would avoid unnecessarily breaking users on Ubuntu 20.04 LTS

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is best to raise the minimum cmake version especially since there's a lot of nice to have and improvement in recent version. My opinion is : live in the present and look in front, not behind in terms of versions.

How would that break for users? (I mean except having to update their cmake version.)

Have two requirements in different places could be surprising.

Set BLA_VENDOR and bump minimum CMake version accordingly.
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Jul 27, 2022
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Nov 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-testing PR is reviewed and waiting CI build and test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants