Skip to content

Commit

Permalink
[mxnet] Updates MXNet engine to 1.9.0
Browse files Browse the repository at this point in the history
Change-Id: I17f0fb861093cd2b09c21cf063d5a39d213dc4a9
  • Loading branch information
frankfliu committed Dec 23, 2021
1 parent 6c7acba commit 27d7afe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/native_build_mxnet_osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: apache/incubator-mxnet
ref: 1.8.0
ref: 1.9.0
submodules: 'recursive'
- name: Install Dependencies
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,31 +232,9 @@ private static String downloadMxnet(Platform platform) {
flavor = "mkl";
}
} else if ("linux".equals(os)) {
boolean match =
lines.contains(os + '/' + flavor + "/libmxnet.so.gz")
&& supported(platform);
if (!match) {
String cudaMajor = flavor.substring(0, 4);
Pattern pattern =
Pattern.compile(
'('
+ cudaMajor
+ ".+)/"
+ classifier
+ "/native/lib/"
+ libName
+ ".gz");
for (String line : lines) {
Matcher m = pattern.matcher(line);
if (m.matches()) {
flavor = m.group(1);
match = true;
break;
}
}
}

if (!match) {
// MXNet must use exactly matched cuda minor version
if (!lines.contains(os + '/' + flavor + "/libmxnet.so.gz")
|| !supported(platform)) {
logger.warn(
"No matching cuda flavor for {} found: {}/sm_{}.",
os,
Expand Down Expand Up @@ -320,7 +298,8 @@ private static String downloadMxnet(Platform platform) {
private static boolean supported(Platform platform) {
// mxnet-native-cu102mkl:1.8.0: 3.0, 5.0, 6.0, 7.0, 7.5
// mxnet-native-cu110mkl:1.8.0: 5.0, 6.0, 7.0, 8.0
if (platform.getVersion().startsWith("1.8.")) {
String version = platform.getVersion();
if (version.startsWith("1.8.") || version.startsWith("1.9.")) {
String flavor = platform.getFlavor();
String cudaArch = platform.getCudaArch();
if (flavor.startsWith("cu11")) {
Expand Down
2 changes: 1 addition & 1 deletion engines/mxnet/native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ task downloadMxnetNativeLib() {
"linux/common/libquadmath.so.0.gz": "mkl/linux/native/lib/libquadmath.so.0",
"linux/mkl/libmxnet.so.gz" : "mkl/linux/native/lib/libmxnet.so",
"linux/cu102mkl/libmxnet.so.gz" : "cu102mkl/linux/native/lib/libmxnet.so",
"linux/cu110mkl/libmxnet.so.gz" : "cu110mkl/linux/native/lib/libmxnet.so",
"linux/cu112mkl/libmxnet.so.gz" : "cu112mkl/linux/native/lib/libmxnet.so",
"osx/mkl/libmxnet.dylib.gz" : "mkl/osx/native/lib/libmxnet.dylib",
"win/common/libgcc_s_seh-1.dll.gz": "mkl/win/native/lib/libgcc_s_seh-1.dll",
"win/common/libgfortran-3.dll.gz" : "mkl/win/native/lib/libgfortran-3.dll",
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ systemProp.org.gradle.internal.http.connectionTimeout=60000
systemProp.org.gradle.internal.publish.checksums.insecure=true

djl_version=0.15.0
mxnet_version=1.8.0
mxnet_version=1.9.0
pytorch_version=1.10.0
tensorflow_version=2.4.1
tflite_version=2.6.2
Expand Down

0 comments on commit 27d7afe

Please sign in to comment.