Skip to content

Construct in MATLAB a matrix designed for use in the HPL-AI Benchmark.

License

Notifications You must be signed in to change notification settings

higham/hpl-ai-matrix

Repository files navigation

HPL-AI-Matrix

About

hpl_ai_matrix is a MATLAB function that constructs an n-by-n matrix designed for use in the HPL-AI Mixed Precision Benchmark. The matrix has a specified infinity-norm condition number, LU factorization with partial pivoting is numerically stable for it, and it can be formed in O(n^2) flops.

Other program files are

  • test_run: runs a series of unit tests for the hpl_ai_matrix function.
  • fun_based_unit_tests: used by test_run and not intended to be called directly.

Usage

A = hpl_ai_matrix(n,kappa) returns an n-by-n matrix A for which which cond(A,inf) = kappa > 1 and LU factorization with partial pivoting requires no row interchanges. The matrices are generated using the strategy discussed in the reference below. The default value of kappa is 1000. This function is not intended for small n, and an error is returned for n < 100.

[A,alpha,beta] = hpl_ai_matrix(n,kappa,rho) specifies the value of rho satisfying 0 < rho < 1 (default 1/2) such that the parameters alpha and beta defining the matrix satisfy alpha = rho*beta.

A = hpl_ai_matrix(n,kappa,rho,alpha,beta) uses the specified values of alpha and beta. Both parameters must be specified, and their values must satisfy the two conditions 0 < alpha < beta and alpha < 1. kappa and rho are ignored in this case, and a warning is emitted if kappa or rho are not empty.

Requirements

The code was developed in MATLAB R2019b and R2020a and works with versions back to R2017a. (hpl_ai_matrix works in earlier versions but the test code does not as it uses string arrays.).

Reference

M. Fasi and N. J. Higham. Matrices with tunable infinity-norm condition number and no need for pivoting in LU factorization. SIAM J. Matrix Anal. Appl., 42(1):417–435, 2021.

License

See license.txt for licensing information.

About

Construct in MATLAB a matrix designed for use in the HPL-AI Benchmark.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published