Benchmarks on building the training models

Benchmarks were run on the compute nodes of Cascade Lake microarchitecture (Intel Xeon Gold 6248 CPU@2.50GHz). The HIBAG package was compiled with GCC v8.3.0 in R-v4.0.2. In HIBAG (>= v1.26.1), users can use hlaSetKernelTarget() to select the target intrinsics, or hlaSetKernelTarget("max") for maximizing the algorithm efficiency.

GCC (>= v6.0) is recommended to compile the HIBAG package. In the benchmarks, the kernel version of HIBAG_v1.24 is v1.4, and the kernel version of newer package is v1.5.

## [1] "64-bit, SSE4.2, POPCNT"                                               
## [2] "9.3.0, GNUG_v9.3.0"                                                   
## [3] "Algorithm SIMD: SSE2 SSE4.2 AVX AVX2 AVX512F AVX512BW AVX512VPOPCNTDQ"
## [1] "64-bit, AVX"                                                          
## [2] "9.3.0, GNUG_v9.3.0"                                                   
## [3] "Algorithm SIMD: SSE2 SSE4.2 AVX AVX2 AVX512F AVX512BW AVX512VPOPCNTDQ"
## [1] "64-bit, AVX2"                                                         
## [2] "9.3.0, GNUG_v9.3.0"                                                   
## [3] "Algorithm SIMD: SSE2 SSE4.2 AVX AVX2 AVX512F AVX512BW AVX512VPOPCNTDQ"
## [1] "64-bit, AVX512F"                                                      
## [2] "9.3.0, GNUG_v9.3.0"                                                   
## [3] "Algorithm SIMD: SSE2 SSE4.2 AVX AVX2 AVX512F AVX512BW AVX512VPOPCNTDQ"
## [1] "64-bit, AVX512BW"                                                     
## [2] "9.3.0, GNUG_v9.3.0"                                                   
## [3] "Algorithm SIMD: SSE2 SSE4.2 AVX AVX2 AVX512F AVX512BW AVX512VPOPCNTDQ"

The CPU may reduce the frequency of the cores dynamically to keep power usage of AVX512 within bounds, hlaSetKernelTarget("auto.avx2") can automatically select AVX2 even if the CPU supports the AVX512F and AVX512BW intrinsics. Please check the CPU throttling with AVX512 intrinsics.

1) Speedup factor using small training sets

2) Speedup factor using medium training sets

3) Speedup factor using large training sets

Multithreading

The multi-threaded implementation can be enabled by specifying the number of threads via nthread in the function hlaAttrBagging(), or hlaParallelAttrBagging(cl=nthread, ...).

Here are the performance of multithreading and the comparison between AVX2 and AVX512BW:

Session Info

## R version 4.1.1 (2021-08-10)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.3 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.14-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.14-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB             
##  [4] LC_COLLATE=C               LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
## [10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] ggplot2_3.3.5 HIBAG_1.30.0 
## 
## loaded via a namespace (and not attached):
##  [1] RColorBrewer_1.1-2 highr_0.9          bslib_0.3.1        compiler_4.1.1     pillar_1.6.4      
##  [6] jquerylib_0.1.4    tools_4.1.1        digest_0.6.28      jsonlite_1.7.2     evaluate_0.14     
## [11] lifecycle_1.0.1    tibble_3.1.5       gtable_0.3.0       pkgconfig_2.0.3    rlang_0.4.12      
## [16] DBI_1.1.1          yaml_2.2.1         xfun_0.27          fastmap_1.1.0      withr_2.4.2       
## [21] stringr_1.4.0      dplyr_1.0.7        knitr_1.36         generics_0.1.1     sass_0.4.0        
## [26] vctrs_0.3.8        grid_4.1.1         tidyselect_1.1.1   glue_1.4.2         R6_2.5.1          
## [31] fansi_0.5.0        rmarkdown_2.11     farver_2.1.0       purrr_0.3.4        magrittr_2.0.1    
## [36] scales_1.1.1       htmltools_0.5.2    ellipsis_0.3.2     assertthat_0.2.1   colorspace_2.0-2  
## [41] labeling_0.4.2     utf8_1.2.2         stringi_1.7.5      RcppParallel_5.1.4 munsell_0.5.0     
## [46] crayon_1.4.1

References