Skip to content

Commit

Permalink
Fix develop mode in debug mode
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Castet <26874160+nvcastet@users.noreply.github.com>
  • Loading branch information
nvcastet committed Aug 5, 2021
1 parent 4eca66e commit 28b590b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions docs/contributors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,13 @@ Set ``HOROVOD_WITHOUT_[FRAMEWORK]=1`` to disable building Horovod plugins for th
This is useful when you’re testing a feature of one framework in particular and wish to save time.
Set ``HOROVOD_WITH_[FRAMEWORK]=1`` to generate an error if the Horovod plugin for that framework failed to build.
Set ``HOROVOD_GPU_OPERATIONS=NCCL`` to run on GPUs with NCCL.
Set ``HOROVOD_DEBUG=1`` for a debug build with checked assertions, disabled compiler optimizations etc.
You can install optional dependencies defined in `setup.py <https://github.com/horovod/horovod/blob/master/setup.py>`__ by adding brackets
at the end of the command line e.g. ``[test]`` for test dependencies.

In develop mode, you can edit the Horovod source directly in the repo folder. For Python code, the changes will take effect
immediately. For **C++/CUDA code**, the ``... pip install -v -e .`` command needs to be invoked again to perform an incremental build.

For a debug build with debug symbols, checked assertions etc., use the extra flags below:

.. code-block:: bash
$ HOROVOD_WITH_PYTORCH=1 HOROVOD_WITH_TENSORFLOW=1 pip install --global-option build_ext --global-option --debug -v -e .
Testing
-------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def build_extensions(self):

cmake_bin = get_cmake_bin()

config = 'Debug' if self.debug else 'RelWithDebInfo'
config = 'Debug' if self.debug or os.environ.get('HOROVOD_DEBUG') == "1" else 'RelWithDebInfo'

ext_name = self.extensions[0].name
build_dir = self.get_ext_fullpath(ext_name).replace(self.get_ext_filename(ext_name), '')
Expand Down

0 comments on commit 28b590b

Please sign in to comment.