Title: | 'GPU'/CPU Benchmarking in Debian-Based Systems |
---|---|
Description: | 'GPU'/CPU Benchmarking on Debian-package based systems This package benchmarks performance of a few standard linear algebra operations (such as a matrix product and QR, SVD and LU decompositions) across a number of different 'BLAS' libraries as well as a 'GPU' implementation. To do so, it takes advantage of the ability to 'plug and play' different 'BLAS' implementations easily on a Debian and/or Ubuntu system. The current version supports - 'Reference BLAS' ('refblas') which are un-accelerated as a baseline - Atlas which are tuned but typically configure single-threaded - Atlas39 which are tuned and configured for multi-threaded mode - 'Goto Blas' which are accelerated and multi-threaded - 'Intel MKL' which is a commercial accelerated and multithreaded version. As for 'GPU' computing, we use the CRAN package - 'gputools' For 'Goto Blas', the 'gotoblas2-helper' script from the ISM in Tokyo can be used. For 'Intel MKL' we use the Revolution R packages from Ubuntu 9.10. |
Authors: | Dirk Eddelbuettel [aut, cre] |
Maintainer: | Dirk Eddelbuettel <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.2.7 |
Built: | 2024-10-30 09:24:45 UTC |
Source: | CRAN |
Analysis functions for GPU/CPU Benchmarking
loglogAnalysis()
loglogAnalysis()
loglogAnalysis
retrieves past benchmark results from the
database contained in the package and returns intercepts and slops of
regressions of elapsed times on matrix dimensions (where both inputs
are in logarithms).
Benchmarking functions for GPU/CPU Benchmarking
getMatrix(N) matmultBenchmark(N, n, trim=0.1) matmultBenchmarkgputools(N, n, trim=0.1) qrBenchmark(N, n, trim=0.1) qrBenchmarkgputools(N, n, trim=0.1) svdBenchmark(N, n, trim=0.1) luBenchmark(N, n, trim=0.1) luBenchmarkgputools(N, n, trim=0.1)
getMatrix(N) matmultBenchmark(N, n, trim=0.1) matmultBenchmarkgputools(N, n, trim=0.1) qrBenchmark(N, n, trim=0.1) qrBenchmarkgputools(N, n, trim=0.1) svdBenchmark(N, n, trim=0.1) luBenchmark(N, n, trim=0.1) luBenchmarkgputools(N, n, trim=0.1)
N |
dimension of square matrix |
n |
number of replications of benchmarked test |
trim |
percentage to be trimmed in |
getMatrix
provides a square matrix of the given dimension.
matmultBenchmark
times the cost of multiplying a matrix of the
given size with itself, repeated as specified and returns the trimmed
mean of the elapsed times. matmultBenchmarkgputools
does the
same using the gputools and packages.
qrBenchmark
times the cost of a QR decomposition of a matrix of
the given size, repeated as specified and returns the trimmed mean of
the elapsed times. qrBenchmarkgputools
does the same using the
gputools packages.
svdBenchmark
times the cost of a Singular Value Decomposition
(SVD) of a matrix of the given size, repeated as specified and returns
the trimmed mean of the elapsed times.
luBenchmark
times the cost of a LU Decomposition of a matrix of
the given size, repeated as specified and returns the trimmed mean of
the elapsed times. luBenchmarkgputools
does the same using the
gputools package.
These functions generate the figures the in the corresponding vignette.
figure_LU_i7(D) figure_LU_xeon(D) figure_MatMult_i7(D) figure_MatMult_xeon(D) figure_QR_i7(D) figure_QR_xeon(D) figure_SVD_i7(D) figure_SVD_xeon(D) figure_LogLogIntercept() figure_LogLogSlopes() figure_LogLogLattice(titles=TRUE) figure_Lattice(titles=TRUE)
figure_LU_i7(D) figure_LU_xeon(D) figure_MatMult_i7(D) figure_MatMult_xeon(D) figure_QR_i7(D) figure_QR_xeon(D) figure_SVD_i7(D) figure_SVD_xeon(D) figure_LogLogIntercept() figure_LogLogSlopes() figure_LogLogLattice(titles=TRUE) figure_Lattice(titles=TRUE)
D |
Benchmark results to be visualised |
titles |
Boolean flag whether to set ‘main’ and ‘sub’ titles for the figure |
The various figure functions create the corresponding figures from the vignette.
Utility functions for GPU/CPU Benchmarking
requirements() createDatabase(dbfile) databaseResult(data,dbfile) installAtlas() installAtlas39() installGoto() installMKL() purgeAtlas() purgeAtlas39() purgeGoto() purgeMKL() isPackageInstalled(package) hasGputools() getBenchmarkData(host)
requirements() createDatabase(dbfile) databaseResult(data,dbfile) installAtlas() installAtlas39() installGoto() installMKL() purgeAtlas() purgeAtlas39() purgeGoto() purgeMKL() isPackageInstalled(package) hasGputools() getBenchmarkData(host)
data |
a (one-row) dataframe containing results from a benchmark |
dbfile |
character string containing path and name of SQLite database file |
package |
character string denoting a package to test for |
host |
character string denoting the host system for which benchmark data is to be retrieved |
requirements
checks for a few system requirements such platform
(Unix), operating system provider (Debian or Ubuntu) and presense of
key packages (gotoblas2-helper).
createDatabase
creates an empty SQLite database to store
benchmark results.
databaseResult
stores the benchmark results in the SQLite
database.
The different install*
functions add the respective BLAS
libraries to the system; the different purge*
functions do the
inverse operation and remove them.
The function hasGputools
tests for presence of this CRAN
package on the current machine – as a very cheap proxy to testing
whether the machine in GPU-capable or not. It uses the function
isPackageInstalled
for this test.
The function getBenchmarkData
retrieves benchmark results for a
given host.