# High-Performance Computing and Parallel Algorithms for Urban Water Demand Forecasting
## 3 Results and Discussion
### Computational Performance: GPU Acceleration vs CPU  
A core aim of this study is to quantify the performance gains from HPC enhancements. We measured the execution times of the key computational scripts with and without GPU support, focusing on the deep learning training tasks that are the most time-consuming. Table 2 presents the execution times on a CPU-only environment (no GPU) for four major training tasks: (i) the pretraining of the forecasting LSTM (f-LSTM), (ii) the new (full)  
Figure 6: Execution Time Reduction via HPC Acceleration. training of the forecasting LSTM, (iii) the pretraining of the imputation bi-LSTM, and (iv) the new/full training of the imputation bi-LSTM. These results were obtained on a modern 8-core CPU using a single thread for fairness in comparison (multi-threading was disabled for these particular measurements to represent a baseline). The results indicate significant execution time reductions when utilizing GPU acceleration, particularly in the full training phases of both the imputation Bi-LSTM and forecasting F-LSTM models. Without GPU support, training the Bi-LSTM imputation model from scratch required 3444 s (-57 min) on the CPU, while training the forecasting LSTM model took 3000 s (-50 min). These durations confirm that deep learning training on the CPU alone introduces significant computational bottlenecks, which could hinder frequent model updates in an operational setting. By leveraging GPU acceleration, the execution time for Bi-LSTM training was reduced to 2460 s (-41 min), achieving a 1.4\(\times\) speedup. Similarly, the forecasting LSTM training time decreased from 3000 s to 1620 s (-27 min), resulting in a 1.85\(\times\) improvement. Although not as drastic as the expected 10\(\times\)-15\(\times\) gains seen in other deep learning tasks, these results still demonstrate that GPU parallelism effectively reduces computational costs, making deep learning-based forecasting more efficient and practical. The inference phase also exhibited moderate improvements with GPU acceleration. The Bi-LSTM inference time decreased from 60 s to 50 s, while the F-LSTM inference time improved from 58 s to 50 s. The relatively smaller improvements in inference time are expected, as inference tasks primarily involve forward passes, which are less computationally expensive than backpropagation-based training. Figure 7 provides a visual comparison of execution times with and without GPU acceleration. The blue bars represent the CPU-only times, while the orange bars indicate GPU-accelerated execution. The difference in training times is clearly visible, with GPU-based execution significantly reducing training durations. The speedup factors for full model training were:  
* 1.4\(\times\) for Bi-LSTM training;
* 1.85\(\times\) for F-LSTM training;
* 1.2\(\times\) for Bi-LSTM inference;
* 1.16\(\times\) for F-LSTM inference. While the speedups for inferences are relatively small, the substantial reductions in training times demonstrate the value of GPU acceleration in enabling timely retraining of models for real-time applications. These findings reinforce the importance of GPU parallelism in deep learning applications. GPUs excel at handling matrix-heavy operations in neural network training, particularly in backpropagation and gradient updates, making them essential for LSTM-based forecasting models. \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Script** & **HPC Environment** & **8-Rank Training** &
\begin{tabular}{l} **8-Rank Inference \\ **(Pretrain Models)** \\ \end{tabular} \\ \hline Bi-LSTM Imputation & with GPU & 2460 s & 50 s \\  & no GPU & 3444 s & 60 s \\ F-LSTM Forecast & with GPU & 1620 s & 50 s \\  & no GPU & 3000 s & 58 s \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Execution times of model training tasks on 8-Rank CPU with and without GPU accelaration.