This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-1164] Generate the document for cpp-package using Doxygen #12977
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9f72f89
Adding cpp-package directory to the Doxyfile. Updating the index.md f…
leleamol 990b72b
Updating the link to classes in C++ API to point to correct html file.
leleamol 3e37847
Updated the links to use relative paths.
leleamol 2e7d9e2
Removed the extra slash character in the url
leleamol 9dcd90a
Excluded the 3rdparty folder as per the review comment.
leleamol 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
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
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 |
---|---|---|
@@ -1,8 +1,55 @@ | ||
# MXNet - C++ API | ||
|
||
The MXNet C++ Package provides C++ API bindings to the users of MXNet. Currently, these bindings are not available as standalone package. | ||
The users of these bindings are required to build this package as mentioned below. | ||
|
||
## Building C++ Package | ||
|
||
The cpp-package directory contains the implementation of C++ API. As mentioned above, users are required to build this directory or package before using it. | ||
**The cpp-package is built while building the MXNet shared library, *libmxnet.so*.** | ||
|
||
### Steps to build the C++ package: | ||
1. Building the MXNet C++ package requires building MXNet from source. | ||
2. Clone the MXNet GitHub repository **recursively** to ensure the code in submodules is available for building MXNet. | ||
``` | ||
git clone --recursive https://github.com/apache/incubator-mxnet mxnet | ||
``` | ||
|
||
3. Install the [prerequisites](<https://mxnet.incubator.apache.org/install/build_from_source#prerequisites>), desired [BLAS libraries](<https://mxnet.incubator.apache.org/install/build_from_source#blas-library>) and optional [OpenCV, CUDA, and cuDNN](<https://mxnet.incubator.apache.org/install/build_from_source#optional>) for building MXNet from source. | ||
4. 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 this file and set the appropriate options prior to running the **make** command. | ||
5. Please refer to [platform specific build instructions](<https://mxnet.incubator.apache.org/install/build_from_source#build-instructions-by-operating-system>) and available [build configurations](https://mxnet.incubator.apache.org/install/build_from_source#build-configurations) for more details. | ||
5. For enabling the build of C++ Package, set the **USE\_CPP\_PACKAGE = 1** in [make/config.mk](<https://github.com/apache/incubator-mxnet/blob/master/make/config.mk>). Optionally, the compilation flag can also be specified on **make** command line as follows. | ||
``` | ||
make -j USE_CPP_PACKAGE=1 | ||
``` | ||
|
||
## Usage | ||
|
||
In order to consume the C++ API please follow the steps below. | ||
|
||
1. Ensure that the MXNet shared library is built from source with the **USE\_CPP\_PACKAGE = 1**. | ||
2. Include the [MxNetCpp.h](<https://github.com/apache/incubator-mxnet/blob/master/cpp-package/include/mxnet-cpp/MxNetCpp.h>) in the program that is going to consume MXNet C++ API. | ||
``` | ||
#include <mxnet-cpp/MxNetCpp.h> | ||
``` | ||
3. While building the program, ensure that the correct paths to the directories containing header files and MXNet shared library. | ||
4. The program links the MXNet shared library dynamically. Hence the library needs to be accessible to the program during runtime. This can be achieved by including the path to the shared library in the environment variable **LD\_LIBRARY\_PATH** for Linux, Mac. and Ubuntu OS and **PATH** for Windows OS. | ||
|
||
|
||
## Tutorial | ||
|
||
A basic tutorial can be found at <https://mxnet.incubator.apache.org/tutorials/c++/basics.html>. | ||
|
||
## Examples | ||
|
||
The example directory contains examples for you to get started. | ||
For namespaces, classes, and code files for the MXNet C++ package, see the following: | ||
|
||
* [Namespaces](https://mxnet.io/doxygen/namespaces.html) | ||
* [Classes](https://mxnet.io/doxygen/annotated.html) | ||
* [Code Files](https://mxnet.io/doxygen/files.html) | ||
* [MXNet CPP Package](https://github.com/dmlc/mxnet/tree/master/cpp-package) | ||
## Links to the documentation | ||
|
||
The classes and functions in MXNet C++ API are available under **mxnet::cpp** namespace. The links to the documenation are as follows: | ||
|
||
1. [Namespaces](../../doxygen/namespaces.html) | ||
2. [Classes in mxnet::cpp namespace](../../doxygen/namespacemxnet_1_1cpp.html) | ||
3. [Code Files](../../doxygen/files.html) | ||
4. [MXNet CPP Package](https://github.com/dmlc/mxnet/tree/master/cpp-package) |
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.
Is this combining the C and C++ API together in one Doxygen output?
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.
@aaronmarkham Yes for now it is combining C and C++ API together until we find out the better way to separate them. C++ API doc will be available under "cpp" namespace and won't collude with the existing doc.
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.
I dont have the dev web server that is publicly accessible for preview.