-
Notifications
You must be signed in to change notification settings - Fork 705
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
{math}[foss/2022a] MXNet 1.9.1 w/ Python 3.10.4 #18251
Merged
boegel
merged 6 commits into
easybuilders:develop
from
deniskristak:20230630164902_new_pr_MXNet191
Aug 17, 2023
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
50b2319
adding easyconfigs: MXNet-1.9.1-foss-2022a.eb and patches: mxnet-fix_…
deniskristak 6dc69db
removing unnecessities from the patch + fixing the style of easyconfig
deniskristak 5c09992
code review updates
deniskristak 7f58fc8
added checksums
deniskristak dd5c31e
fix trivial code style issues in easyconfig for MXNet 1.9.1
boegel 801f0ef
refer to subdirectory of MXNet GitHub repo for source of commits for …
boegel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name = 'MXNet' | ||
version = '1.9.1' | ||
|
||
homepage = 'https://mxnet.io/' | ||
description = """Flexible and Efficient Library for Deep Learning""" | ||
|
||
toolchain = {'name': 'foss', 'version': '2022a'} | ||
toolchainopts = {'cstd': 'c++14', 'opt': True, 'pic': True, 'openmp': True, 'extra_cflags': '-lflexiblas'} | ||
|
||
# MXNet pulls in a bunch of submodules with specific commits | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add comment to mention source for these commit IDs: https://github.com/apache/mxnet/tree/1.9.1/3rdparty |
||
source_urls = [ | ||
'https://github.com/apache/mxnet/archive', | ||
'https://github.com/dmlc/ps-lite/archive/', | ||
'https://github.com/apache/tvm/archive/', | ||
'https://github.com/dmlc/dmlc-core/archive/', | ||
'https://github.com/dmlc/dlpack/archive/', | ||
'https://github.com/google/googletest/archive/', | ||
'https://github.com/kpu/intgemm/archive/', | ||
'https://github.com/NVlabs/cub/archive/', | ||
'https://github.com/onnx/onnx-tensorrt/archive/', | ||
'https://github.com/oneapi-src/oneDNN/archive/', | ||
] | ||
sources = [ | ||
'v%(version)s.tar.gz', # MXNet | ||
'34fd45cae457d59850fdcb2066467778d0673f21.tar.gz', # ps-lite | ||
boegel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
'efdac9439506d1de5eec91ecc795982c78e41909.tar.gz', # tvm | ||
'5df8305fe699d3b503d10c60a231ab0223142407.tar.gz', # dmlc-core | ||
'3efc489b55385936531a06ff83425b719387ec63.tar.gz', # dlpack | ||
'eb9225ce361affe561592e0912320b9db84985d0.tar.gz', # googletest | ||
'8f28282c3bd854922da638024d2659be52e892e9.tar.gz', # intgemm | ||
'0158fa19f28619886232defd412433974af89611.tar.gz', # cub | ||
'2eb74d933f89e1590fdbfc64971a36e5f72df720.tar.gz', # onnx-tensorrt | ||
'5818c40f07bdb6307f9bc64e929836fe036da644.tar.gz', # oneDNN | ||
] | ||
patches = [ | ||
'mxnet-1.9.1-add_flexiblas.patch', | ||
] | ||
checksums = [ | ||
{'v1.9.1.tar.gz': '9927f986b2c2c8315f2ba675e050ce1f4e24e84c4692e5f0a96248876784a8a7'}, | ||
{'34fd45cae457d59850fdcb2066467778d0673f21.tar.gz': | ||
'ec5d5baab8bbf0c3983ad5f18d7f963f15ae7cd4d154ec204b03c1dceccf209b'}, | ||
{'efdac9439506d1de5eec91ecc795982c78e41909.tar.gz': | ||
'656c38d66baeab885b0212602148bb55ad3cf7d22f52ded8ece53f88e103a2f5'}, | ||
{'5df8305fe699d3b503d10c60a231ab0223142407.tar.gz': | ||
'a8046f752f36005564d2924b4b6f73e1aea3cce7ff10f9e19d99ad6a22a045b2'}, | ||
{'3efc489b55385936531a06ff83425b719387ec63.tar.gz': | ||
'b59586ce69bcf3efdbf3cf4803fadfeaae4948044e2b8d89cf912194cf28f233'}, | ||
{'eb9225ce361affe561592e0912320b9db84985d0.tar.gz': | ||
'a4cb4b0c3ebb191b798594aca674ad47eee255dcb4c26885cf7f49777703484f'}, | ||
{'8f28282c3bd854922da638024d2659be52e892e9.tar.gz': | ||
'bc8bd8015613a13747eb769876385ec53e8c1ea7ae3f8414521dc53b8fcdfc65'}, | ||
{'0158fa19f28619886232defd412433974af89611.tar.gz': | ||
'43424c4c17a997d1d730c89ec14688671245de7941e02b388d7d3df6ea53777a'}, | ||
{'2eb74d933f89e1590fdbfc64971a36e5f72df720.tar.gz': | ||
'df99819727445c247fb5c21c2fd825ded3269376867457ae84fa6d6f1c0ae331'}, | ||
{'5818c40f07bdb6307f9bc64e929836fe036da644.tar.gz': | ||
'aeb8e65bb13d1a3171673ab749d41e8c3a6538371d922a7fa881afef277128ba'}, | ||
{'mxnet-1.9.1-add_flexiblas.patch': '92b3a9b9ffd87c3be30efe1b400b4d152ba3fe4e105970bc6c63906dfcb59084'}, | ||
] | ||
|
||
builddependencies = [ | ||
('CMake', '3.23.1'), | ||
] | ||
|
||
dependencies = [ | ||
('Python', '3.10.4'), | ||
('graphviz-python', '0.20.1'), | ||
('OpenCV', '4.6.0', '-contrib'), | ||
] | ||
|
||
moduleclass = 'math' |
33 changes: 33 additions & 0 deletions
33
easybuild/easyconfigs/m/MXNet/mxnet-1.9.1-add_flexiblas.patch
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
source: https://github.com/apache/mxnet/pull/21093 | ||
diff -ruN mxnet-1.9.1_orig/cmake/ChooseBlas.cmake mxnet-1.9.1/cmake/ChooseBlas.cmake | ||
--- mxnet-1.9.1_orig/cmake/ChooseBlas.cmake 2022-04-22 00:45:57.000000000 +0200 | ||
+++ mxnet-1.9.1/cmake/ChooseBlas.cmake 2023-07-10 12:13:14.448174000 +0200 | ||
@@ -16,10 +16,11 @@ | ||
# under the License. | ||
|
||
set(BLAS "Open" CACHE STRING "Selected BLAS library") | ||
-set_property(CACHE BLAS PROPERTY STRINGS "Atlas;Open;MKL") | ||
+set_property(CACHE BLAS PROPERTY STRINGS "Atlas;Open;MKL;FlexiBLAS") | ||
|
||
if(DEFINED USE_BLAS) | ||
set(BLAS "${USE_BLAS}") | ||
+ message(STATUS "BLAS is set to ${USE_BLAS}") | ||
else() | ||
if(USE_MKL_IF_AVAILABLE) | ||
if(NOT MKL_FOUND) | ||
@@ -31,7 +32,14 @@ | ||
endif() | ||
endif() | ||
|
||
-if(BLAS STREQUAL "Atlas" OR BLAS STREQUAL "atlas") | ||
+if(BLAS STREQUAL "FlexiBLAS" OR BLAS STREQUAL "flexiblas") | ||
+ set(BLA_VENDOR FlexiBLAS) | ||
+ find_package(BLAS REQUIRED) | ||
+ include_directories(SYSTEM ${BLAS_INCLUDE_DIR}) | ||
+ add_definitions(-DMSHADOW_USE_CBLAS=1) | ||
+ add_definitions(-DMSHADOW_USE_MKL=0) | ||
+ add_definitions(-DMXNET_USE_LAPACK=1) | ||
+elseif(BLAS STREQUAL "Atlas" OR BLAS STREQUAL "atlas") | ||
find_package(Atlas REQUIRED) | ||
include_directories(SYSTEM ${Atlas_INCLUDE_DIR}) | ||
list(APPEND mshadow_LINKER_LIBS ${Atlas_LIBRARIES}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
source: https://github.com/apache/mxnet/pull/21093 | ||
diff -ruN mxnet-1.9.1_orig/cmake/ChooseBlas.cmake mxnet-1.9.1/cmake/ChooseBlas.cmake | ||
--- mxnet-1.9.1_orig/cmake/ChooseBlas.cmake 2022-04-22 00:45:57.000000000 +0200 | ||
+++ mxnet-1.9.1/cmake/ChooseBlas.cmake 2023-06-21 13:23:41.986229000 +0200 | ||
@@ -16,10 +16,11 @@ | ||
# under the License. | ||
|
||
set(BLAS "Open" CACHE STRING "Selected BLAS library") | ||
-set_property(CACHE BLAS PROPERTY STRINGS "Atlas;Open;MKL") | ||
+set_property(CACHE BLAS PROPERTY STRINGS "Atlas;Open;MKL;FlexiBLAS") | ||
|
||
if(DEFINED USE_BLAS) | ||
set(BLAS "${USE_BLAS}") | ||
+ message(STATUS "BLAS is set to ${USE_BLAS}") | ||
else() | ||
if(USE_MKL_IF_AVAILABLE) | ||
if(NOT MKL_FOUND) | ||
@@ -31,7 +32,15 @@ | ||
endif() | ||
endif() | ||
|
||
-if(BLAS STREQUAL "Atlas" OR BLAS STREQUAL "atlas") | ||
+if(BLAS STREQUAL "FlexiBLAS" OR BLAS STREQUAL "flexiblas") | ||
+ set(BLA_VENDOR FlexiBLAS) | ||
+ find_package(BLAS REQUIRED) | ||
+ include_directories(SYSTEM ${BLAS_INCLUDE_DIR}) | ||
+ list(APPEND mshadow_LINKER_LIBS ${BLAS_LIBRARIES}) | ||
+ add_definitions(-DMSHADOW_USE_CBLAS=1) | ||
+ add_definitions(-DMSHADOW_USE_MKL=0) | ||
+ add_definitions(-DMXNET_USE_LAPACK=1) | ||
+elseif(BLAS STREQUAL "Atlas" OR BLAS STREQUAL "atlas") | ||
find_package(Atlas REQUIRED) | ||
include_directories(SYSTEM ${Atlas_INCLUDE_DIR}) | ||
list(APPEND mshadow_LINKER_LIBS ${Atlas_LIBRARIES}) |
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.
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.
To be still need extra manual cflags here despite including the patch to their cmakelists to support flexiblas?
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.
yep, won't build without it
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.
Then i wonder what good
does in the patch. If anything, I think the easyblock should fix this, or the patch
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.
you're right, this doesn't have to be in patch, removing...
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.
well, i don't think there is any advantage to modifying the patch. i'm mostly curious as to where it fails
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.
@Micket I think it's working now as is, but if you want, we could move the
-lflexiblas
option fromextra_cflags
in easyconfig to the easyblock somehow, however, I am not sure how to modify toolchainopts in easyblock...if you think it might be better that way, maybe drop me a hint about how to do that?