![]() |
In this Initial Module:
- Description of the Cholesky algorithm
- Running the algorithm on the CPU
This tutorial is based on a C++ kernel that you will optimize for the highest throughput.
The algorithm is a common linear algebra solver, the decomposition of a Hermitian, positive-definite matrix into the product of a lower triangular matrix and its conjugate transpose. For this purpose, you will use the Cholesky decomposition or Cholesky factorization (pronounced /ʃo-LESS-key/). This solver is useful for several numerical problems, in particular for Monte Carlo simulations.
This algorithm has a serial complexity O(n3).
More information on wikipedia... Note that this solver is included as part the official Vitis accelerated libraries; here is a link to its documentation.
For your purposes, you will start with a simple description implemented in C++ and explain how to adapt it for acceleration with an AMD Alveo™ U50 card.
Open a terminal and navigate to the ./docs/cpu_src
directory.
Run the following command to compile the design:
g++ cpu_cholesky.cpp test.cpp matrixUtility.hpp -std=c++0x -O3 -o test
./test -M 512 -N 512 -seed 12
Run with different sizes of matrices small and large (maximum size is 2048x2048) to gauge the impact on the execution time. Study the code to check how it implements the Cholesky algorithm.
NOTE 1: If your server has limited stack size, this program might issue a segmentation fault at values smaller than 2048x2048.
Continue to Module 1 to build and run a baseline version with Vitis.
Copyright © 2020–2023 Advanced Micro Devices, Inc