Using Windows Command-Line - 5.2 English - 57404

AOCL User Guide (57404)

Document ID
57404
Release Date
2025-12-29
Version
5.2 English

Complete the following steps to configure the project using command prompt:

  1. Install AOCL-BLAS, AOCL-LAPACK, and AOCL-Utils.

  2. Define the environment variable AOCL_ROOT to point to the AOCL Libs installation:

    $ set AOCL_ROOT="C:\Program Files\AMD\AOCL-Windows"
    

    For the cases where AOCL_ROOT cannot 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_LIB

    • AOCL_LIBFLAME

    • AOCL_UTILS_LIB

    • AOCL_BLIS_INCLUDE_DIR

    • AOCL_LIBFLAME_INCLUDE_DIR

    • AOCL_UTILS_INCLUDE_DIR

  3. Clone and change into AOCL-Sparse Git repository (amd/aocl-sparse.git)

    $ cd aocl-sparse
    
  4. 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_ROOT is 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.

  5. 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%"
    
  6. Build the project:

    $ cmake --build out_sparse --config Release --target install --verbose
    
  7. Install AOCL-Sparse:

    $ cmake --build out_sparse/ --target install