Complete the following steps to configure the project using command prompt:
Install AOCL-BLAS, AOCL-LAPACK, and AOCL-Utils.
Define the environment variable
AOCL_ROOTto point to the AOCL Libs installation:$ set AOCL_ROOT="C:\Program Files\AMD\AOCL-Windows"
For the cases where
AOCL_ROOTcannot be exported by placing AOCL-BLAS, AOCL-LAPACK, and AOCL-Utils libraries in the same path, define the following variables during CMake configuration to point to the corresponding libraries and headers:AOCL_BLIS_LIBAOCL_LIBFLAMEAOCL_UTILS_LIBAOCL_BLIS_INCLUDE_DIRAOCL_LIBFLAME_INCLUDE_DIRAOCL_UTILS_INCLUDE_DIR
Clone and change into AOCL-Sparse Git repository (amd/aocl-sparse.git)
$ cd aocl-sparse
Configure the project along with the following options depending on the required build. For CMake configure options, refer to AOCL-Sparse - CMake Build Options. When
AOCL_ROOTis defined:$ cmake -S . -B out_sparse -T clangcl -G "Visual Studio 17 2022" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_INSTALL_PREFIX="<aoclsparse_install_path>"
When CMake variables are used to define AOCL-BLAS, AOCL-LAPACK, and AOCL-Utils libraries/header:
$ cmake -S . -B out_sparse -T clangcl -G "Visual Studio 17 2022" -DCMAKE_CXX_COMPILER= clang-cl -DCMAKE_INSTALL_PREFIX="<aoclsparse_install_path>" -DAOCL_LIBFLAME="Lapack/Library/with/path" -DAOCL_LIBFLAME_INCLUDE_DIR="path/to/Lapack/Headers" -DAOCL_BLIS_LIB="Blas/Library/with/path" -DAOCL_BLIS_INCLUDE_DIR="path/to/Blas/Headers" -DAOCL_UTILS_LIB="Utils/Library/with/path" -DAOCL_UTILS_INCLUDE_DIR="path/to/Utils/Headers"
Refer to AOCL-Sparse - CMake Build Options to update the parameter options in the command according to the project requirements.
Export the paths for AOCL-BLAS, AOCL-LAPACK, and AOCL-Utils libraries:
$ set PATH="C:\Users\Program Files\AMD\AOCL-Windows\amd-blis\lib\LP64;%PATH%" $ set PATH="C:\Users\Program Files\AMD\AOCL-Windows\amd-libflame\lib\LP64;%PATH%" $ set PATH="C:\Users\Program Files\AMD\AOCL-Windows\amd-utils\lib;%PATH%"
Build the project:
$ cmake --build out_sparse --config Release --target install --verbose
Install AOCL-Sparse:
$ cmake --build out_sparse/ --target install