-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Upgrade archive utility and add back FC improvement #15171
Changes from all commits
40beeb2
928055f
2b418d3
b823623
d89ce85
f28bcfa
7c0e25b
849c513
3be8b4f
f608296
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# build and install are separated so changes to build don't invalidate | ||
# the whole docker cache for the image | ||
|
||
marcoabreu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
set -ex | ||
|
||
wget https://mirror.clarkson.edu/gnu/binutils/binutils-2.27.tar.gz | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
apt-get update || true | ||
apt-get install -y \ | ||
wget | ||
|
||
mkdir /opt/binutils_install && mkdir /opt/binutils_install && mkdir /opt/binutils && cd /opt/binutils | ||
wget -nv https://mirror.clarkson.edu/gnu/binutils/binutils-2.27.tar.gz | ||
tar -xvf binutils-2.27.tar.gz && cd binutils-2.27 | ||
./configure --prefix=/opt/binutils_other --exec-prefix=/opt/binutils_install | ||
make -j$(nproc) | ||
make install | ||
ln -s /opt/binutils_install/bin/ar /usr/local/bin/ar |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,6 +180,8 @@ More information on turning these features on or off are found in the following | |
There is a configuration file for make, | ||
[`make/config.mk`](https://github.com/apache/incubator-mxnet/blob/master/make/config.mk), that contains all the compilation options. You can edit it and then run `make` or `cmake`. `cmake` is recommended for building MXNet (and is required to build with MKLDNN), however you may use `make` instead. For building with Java/Scala/Clojure, only `make` is supported. | ||
|
||
**NOTE:** When certain set of build flags are set, MXNet archive increases to more than 4 GB. Since MXNet uses archive internally archive runs into a bug ("File Truncated": [bugreport](https://sourceware.org/bugzilla/show_bug.cgi?id=14625)) for archives greater than 4 GB. Please use ar version 2.27 or greater to overcome this bug. Please see https://github.com/apache/incubator-mxnet/issues/15084 for more details. | ||
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. Can we explicitly give the flags that causes such bloat, so that, not all users building from source need to worry new archive utility? 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. the most significant part comes from the GPU code, and it's already an explicit switch 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. Yes most significant part comes from GPU code. If I provide set of flags that are failing today, no guarantee that tomorrow it would not bloat and not fail for a different set of flags (which includes USE_CUDA=1 and USE_CUDNN=1) and then these instructions may quickly become outdated. 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. Is there a way to detect this case so users are not faced with a strange error message but specifically prompted to upgrade ar? I'm afraid that users might not see this specific part of our documentation and just get frustrated. If our build pipeline would automatically notify them (ideally ahead of time or) after the error occured, that would be beneficial to the user experience. 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. @marcoabreu I have added a warning message for users if the ar is smaller than 2.27 |
||
|
||
<hr> | ||
|
||
## Build MXNet | ||
|
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.
What about the corresponding modification to CMake?
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.
we dont yet need it for cmake. we have encountered this issue only with make.
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.
That's weird. Thanks for your answer. I would expect to have similar amount of object code with both builds.