# GPU-Accelerated Fock Matrix Computation with Efficient Reduction
## 5 Performance Evaluation
For each molecule, we compare the computation times of the proposed DAR method and a hybrid approach combining DAR with TLR. The speedup rate is defined as the maximum acceleration achieved using DAR compared to the baseline case of \(N_{\text{Fock}}=1\), where the proposed method is not applied. For the small molecules in Table 3, our DAR achieves more than double the speedup in all cases. The hybrid method, which applies DAR to TLR, shows a slightly lower speedup rate but improves the performance of the existing reduction method by approximately 1.3 times. For the larger molecules in Table 4, the speedup rate increases, achieving \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Compound** & **Azobenzene** & **Rivastigmine** & **Penicillin G** \\
**Molecular Formula** & \(\mathbf{C_{12}H_{10}N_{2}}\) & \(\mathbf{C_{14}H_{22}N_{2}O_{2}}\) & \(\mathbf{C_{16}H_{18}N_{2}O_{4}S}\) \\
**Basis Set** & **6-31G** & **6-31G** & **6-31G** \\ \hline \hline \multirow{8}{*}{\#Fock replicas} & 1 & \(-\)568.970183986283 & \(-\)801.229482107621 & \(-\)1421.744965380880 \\ \cline{2-5}  & 2 & \(-\)568.970183986282 & \(-\)801.229482107608 & \(-\)1421.744965380859 \\ \cline{1-1}  & 4 & \(-\)568.970183986281 & \(-\)801.229482107605 & \(-\)1421.744965380850 \\ \cline{1-1}  & 8 & \(-\)568.970183986281 & \(-\)801.229482107604 & \(-\)1421.744965380848 \\ \cline{1-1}  & 16 & \(-\)568.970183986281 & \(-\)801.229482107604 & \(-\)1421.744965380846 \\ \cline{1-1}  & 32 & \(-\)568.970183986281 & \(-\)801.229482107603 & \(-\)1421.744965380848 \\ \cline{1-1}  & 64 & \(-\)568.970183986281 & \(-\)801.229482107603 & \(-\)1421.744965380846 \\ \cline{1-1}  & 128 & \(-\)568.970183986281 & \(-\)801.229482107602 & \(-\)1421.744965380848 \\ \cline{1-1}  & 256 & \(-\)568.970183986281 & \(-\)801.229482107604 & \(-\)1421.744965380847 \\ \hline \hline \multicolumn{2}{c}{\(\max(|\Delta E_{\text{RHF}}|)\)} & \multicolumn{1}{c}{\(2.0\times 10^{-12}\)} & \multicolumn{1}{c}{\(1.9\times 10^{-11}\)} & \multicolumn{1}{c}{\(3.4\times 10^{-11}\)} \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Converged RHF energies using the distributed atomic reduction method with different number of Fock replicas. up to 3.75\(\times\) acceleration with DAR. The hybrid method also shows further improved performance, reaching a maximum speedup of 1.98\(\times\) over the case where only TLR was applied. This is attributed to increased memory contention in the Fock matrix update as the molecular size grows. Since \(O(M^{4})\) atomicAdd operations from all GPU threads concentrate on an \(O(M^{2})\) memory space, the frequency of destination address conflicts increases with the number of basis functions \(M\). Thus, the proposed DAR's ability to reduce these conflicts becomes more effective. On the other hand, the optimal number of Fock replicas varies slightly depending on the input molecules. For small molecules, \(N_{\text{Fock}}=32\) yields near-optimal performance in all cases, whereas \(N_{\text{Fock}}=16\) was best for larger molecules, requiring fewer replicas. Devising a mechanism to determine the appropriate number of replicas based on the input will further enhance the practicality of the proposed DAR method. To further investigate the reduction in memory contention achieved by the proposed method, we profiled each CUDA kernel using Nsight Compute. Table 5 presents the profil