brandstetter-johannes / LPSDA

Repo to the paper "Lie Point Symmetry Data Augmentation for Neural PDE Solvers"
MIT License
47 stars 12 forks source link

Reduce CPU utilization during data loading. #1

Closed bschaefl closed 2 years ago

bschaefl commented 2 years ago

The data loading procedure is adapted in order to reduce the overall CPU load during execution. A brief comparison using the default dataset of the Korteweg-de Vries equation was conducted. The command under investigation is

$ CUDA_VISIBLE_DEVICES=0 python3 experiments/train.py \
    --device=cuda \
    --experiment=KdV \
    --KdV_augmentation=1,1.0,0.4,0.1 \
    --train_samples=512 \
    --num_epochs=10

leading to the following timings (original implementation):

real    44m45.176s
user  4366m26.973s
sys    182m31.383s

After the corresponding modifications, the timings change to

real    15m00.047s
user   104m42.002s
sys      9m22.463s

showing a strong decrease in the overall CPU utilization (user), as well as in the total runtime (real). It has to be noted, that the timings only represent a single run for 10 epochs each, so repeated time measurements may vary a little.