-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Doc] update working with multiple backend section (dmlc#1128)
* update work with different backend section * fix some warnings * Update backend.rst * Update index.rst Co-authored-by: VoVAllen <[email protected]>
- Loading branch information
1 parent
e4ef8d1
commit 17aab81
Showing
7 changed files
with
55 additions
and
41 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Working with different backends | ||
=============================== | ||
|
||
DGL supports PyTorch, MXNet and Tensorflow backends. To change them, set the ``DGLBACKEND`` | ||
environcment variable. The default backend is PyTorch. | ||
|
||
PyTorch backend | ||
--------------- | ||
|
||
Export ``DGLBACKEND`` as ``pytorch`` to specify PyTorch backend. The required PyTorch | ||
version is 0.4.1 or later. See `pytorch.org <https://pytorch.org>`_ for installation instructions. | ||
|
||
MXNet backend | ||
------------- | ||
|
||
Export ``DGLBACKEND`` as ``mxnet`` to specify MXNet backend. The required MXNet version is | ||
1.5 or later. See `mxnet.apache.org <https://mxnet.apache.org/get_started>`_ for installation | ||
instructions. | ||
|
||
MXNet uses uint32 as the default data type for integer tensors, which only supports graph of | ||
size smaller than 2^32. To enable large graph training, *build* MXNet with ``USE_INT64_TENSOR_SIZE=1`` | ||
flag. See `this FAQ <https://mxnet.apache.org/api/faq/large_tensor_support>`_ for more information. | ||
|
||
Tensorflow backend | ||
------------------ | ||
|
||
Export ``DGLBACKEND`` as ``tensorflow`` to specify Tensorflow backend. The required Tensorflow | ||
version is 2.0 or later. See `tensorflow.org <https://www.tensorflow.org/install>`_ for installation | ||
instructions. In addition, Tensorflow backend requires ``tfdlpack`` package installed as follows and set ``TF_FORCE_GPU_ALLOW_GROWTH`` to ``true`` to prevent Tensorflow take over the whole GPU memory: | ||
|
||
.. code:: bash | ||
pip install tfdlpack # when using tensorflow cpu version | ||
or | ||
|
||
.. code:: bash | ||
pip install tfdlpack-gpu # when using tensorflow gpu version | ||
export TF_FORCE_GPU_ALLOW_GROWTH=true # and add this to your .bashrc/.zshrc file if needed | ||
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
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