[Nano] Add a generalized how-to guide for accelerate PyTorch cv data process pipeline (#7125)

* Restyle blockquote elements in web

* Add a generalized how-to section for preprocessing, including the data process accelerastion for PyTorch

* Small fix

* Update based on comments and small typo fixes

* Small fixes
This commit is contained in:
Yuwen Hu 2023-01-05 18:07:10 +08:00 committed by GitHub
parent bfca337d09
commit 5e9ef7b553
6 changed files with 22 additions and 9 deletions

View file

@ -106,4 +106,12 @@ footer.bd-footer{
/* for right sidebar word-break */
#bd-toc-nav ul li {
word-break: break-word;
}
/* for quoteblocks, especially for the ones inside notebooks*/
blockquote {
margin: 1.5em auto;
box-shadow: 0 0.2rem 0.5rem var(--pst-color-shadow);
border-color: var(--pst-color-primary);
background-color: var(--pst-color-on-background);
}

View file

@ -101,11 +101,11 @@ subtrees:
title: "How-to Guides"
subtrees:
- entries:
- file: doc/Nano/Howto/Preprocessing/PyTorch/accelerate_pytorch_cv_data_pipeline
- file: doc/Nano/Howto/Training/PyTorchLightning/accelerate_pytorch_lightning_training_ipex
- file: doc/Nano/Howto/Training/PyTorchLightning/accelerate_pytorch_lightning_training_multi_instance
- file: doc/Nano/Howto/Training/PyTorchLightning/pytorch_lightning_training_channels_last
- file: doc/Nano/Howto/Training/PyTorchLightning/pytorch_lightning_training_bf16
- file: doc/Nano/Howto/Training/PyTorchLightning/pytorch_lightning_cv_data_pipeline
- file: doc/Nano/Howto/Training/PyTorch/convert_pytorch_training_torchnano
- file: doc/Nano/Howto/Training/PyTorch/use_nano_decorator_pytorch_training
- file: doc/Nano/Howto/Training/TensorFlow/accelerate_tensorflow_training_multi_instance

View file

@ -0,0 +1,3 @@
{
"path": "../../../../../../../../python/nano/tutorial/notebook/preprocessing/pytorch/accelerate_pytorch_cv_data_pipeline.ipynb"
}

View file

@ -1,4 +1,4 @@
# Choose the Number of Porcesses for Multi-Instance Training
# Choose the Number of Processes for Multi-Instance Training
BigDL-Nano supports multi-instance training on a server with multiple CPU cores or sockets. With Nano, you could launch a self-defined number of processes to perform data-parallel training. When choosing the number of processes, there are 3 empirical recommendations for better training performance:
@ -35,10 +35,8 @@ Based on that, the number of processes np can be calculated as:
That is, empirically, we could set the number of processes to 2, 4 or 8 here for good training performance.
```eval_rst
.. card::
.. seealso::
**Related Readings**
^^^
* `How to accelerate a PyTorch Lightning application on training workloads through multiple instances <../PyTorchLightning/accelerate_pytorch_lightning_training_multi_instance.html>`_
* `How to accelerate a TensorFlow Keras application on training workloads through multiple instances <../TensorFlow/accelerate_tensorflow_training_multi_instance.html>`_
```

View file

@ -1,3 +0,0 @@
{
"path": "../../../../../../../../python/nano/tutorial/notebook/training/pytorch-lightning/pytorch_lightning_cv_data_pipeline.ipynb"
}

View file

@ -5,6 +5,14 @@ Nano How-to Guides
In Nano How-to Guides, you could expect to find multiple task-oriented, bite-sized, and executable examples. These examples will show you various tasks that BigDL-Nano could help you accomplish smoothly.
Preprocessing Optimization
---------------------------
PyTorch
~~~~~~~~~~~~~~~~~~~~~~~~~
* `How to accelerate a computer vision data processing pipeline <Preprocessing/PyTorch/accelerate_pytorch_cv_data_pipeline.html>`_
Training Optimization
-------------------------
@ -14,7 +22,6 @@ PyTorch Lightning
* `How to accelerate a PyTorch Lightning application on training workloads through multiple instances <Training/PyTorchLightning/accelerate_pytorch_lightning_training_multi_instance.html>`_
* `How to use the channels last memory format in your PyTorch Lightning application for training <Training/PyTorchLightning/pytorch_lightning_training_channels_last.html>`_
* `How to conduct BFloat16 Mixed Precision training in your PyTorch Lightning application <Training/PyTorchLightning/pytorch_lightning_training_bf16.html>`_
* `How to accelerate a computer vision data processing pipeline <Training/PyTorchLightning/pytorch_lightning_cv_data_pipeline.html>`_
PyTorch
~~~~~~~~~~~~~~~~~~~~~~~~~