This thread is dedicated to tips and tricks on improving performance of your ML/DL code, without making any changes to your code or upgrading your hardware.
First, note a new document: https://docs.fast.ai/performance.html - where we would like to compile all kinds of performance improvements, so please feel free to contribute.
As of this writing, the bulk of it is Faster Image Processing. But this hopefully will change over time as you contribute performance improvements in other domains.
Some of the discussed performance improvement checks can be automated. Here is the very first version of the automated checker. It will become available in
fastai-1.0.38, until then use
git pull and then run:
python -m fastai.utils.check_perf
Currently on my setup I get:
Running performance checks. *** libjpeg-turbo status ❓ libjpeg-turbo's status can't be derived - need Pillow(-SIMD)? >= 5.4.0 to tell, current version 5.3.0.post0 5.4.0 is not yet available, other than the dev version on github, which can be installed via pip from git+https://github.com/python-pillow/Pillow. See https://docs.fast.ai/performance.html#libjpeg-turbo *** Pillow-SIMD status ✔ Running Pillow-SIMD 5.3.0.post0 *** CUDA status ✔ Running the latest CUDA 10.0.130 with NVIDIA driver 410.79 Refer to https://docs.fast.ai/performance.html to make sense out of these checks and suggestions.
See also: GPU Optimizations Central
p.s. It’s a wiki post, so anybody can edit it.