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

added -DCMAKE_BUILD_TYPE=Release to docs for building from source #16144

Closed
wants to merge 2 commits into from
Closed

added -DCMAKE_BUILD_TYPE=Release to docs for building from source #16144

wants to merge 2 commits into from

Conversation

QueensGambit
Copy link
Contributor

@QueensGambit QueensGambit commented Sep 11, 2019

Description

The CMAKE_BUILD_TYPE is not set in most cases for the build instructions from source.
If the CMAKE_BUILD_TYPE is empty no optimization flags are used by default. This results not only in a higher memory footprint but also in a much slower binary compared to the official python MXNet pip packages. This PR adds the option -DCMAKE_BUILD_TYPE=Release in the documentation as the default option. @zachgk @aaronmarkham

Checklist

Essentials

  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Comments

  • This PR introduces no functional change and only affects markdown documentation files.

@QueensGambit
Copy link
Contributor Author

@mxnet-label-bot add [Doc, Build]

@zachgk
Copy link
Contributor

zachgk commented Sep 11, 2019

ping @larroy @mseth10

Copy link
Contributor

@larroy larroy left a comment

Choose a reason for hiding this comment

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

Lgtm

@@ -182,6 +182,8 @@ There is a configuration file for make,

**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.

You can specify different cmake compiler configurations with the option `CMAKE_BUILD_TYPE`. In most cases you should set this to option to `Release` for a smaller and faster binary compared to `Debug`. Alternatively, if you are interested in building the smallest binary you can set the option to `MinSizeRel`. In the case you are developing MXNet you might choose `Debug` instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add relwithdebinfo for completeness?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! I just added RelWithDebInfo.

@zachgk
Copy link
Contributor

zachgk commented Sep 20, 2019

@QueensGambit There are merge conflicts since we released our new website (#15883). Can you rebase?

@QueensGambit
Copy link
Contributor Author

QueensGambit commented Sep 21, 2019

@zachgk The new website has a few issues (see #15883).
I will rebase after these have been fixed to avoid future merge conflicts.

@QueensGambit
Copy link
Contributor Author

QueensGambit commented Oct 1, 2019

It seems user @hgt312 recreated the same PR 4 days ago and his PR was merged rather quickly:
#16294

This PR can therefore be closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants