Vitis Data Center Acceleration Examples

repository·main·Indexed 20 days ago

https://github.com/xilinx/vitis_accel_examples

A collection of reference examples for Vitis Data Center Acceleration targeting AMD Alveo platforms. The repository covers host-side XRT APIs (C++ and Python via pyxrt), kernel performance, RTL/HLS integration, and system-level optimizations. It includes categories for host_xrt, performance, rtl_kernels, and sys_opt, providing implementations for managing devices, XCLBINs, and memory buffers.

Tokens
40.7K
Snippets
162
Records
237
Agent score
70%

What's inside vitis_accel_examples

  1. Overview of Hello World XRT Example

    main

    This example demonstrates vector addition using the XRT (Xilinx Runtime) Native APIs. It is designed to illustrate how to interact with hardware devices, manage memory buffers, and execute kernels using C++.

    Key Concepts:

    • XRT Native APIs: The low-level interface for managing kernels and hardware resources.
    • Task Level Parallelism: The kernel utilizes HLS Dataflow to schedule multiple tasks together for higher throughput.

    Note: This example is not compatible with NoDMA platforms (e.g., u50 nodma).

  2. Overview of Host Memory Bandwidth XRT Example

    main

    This example uses XRT Native APIs to measure host memory and kernel bandwidth. It utilizes three distinct kernels:

    1. read_bandwidth: Measures read throughput.
    2. write_bandwidth: Measures write throughput.
    3. bandwidth: Measures concurrent read and write throughput.

    The host application executes these kernels with varying buffer sizes and reports the maximum bandwidth achieved for each operation type (Read, Write, and Concurrent).

  3. Overview of the Host Memory Bandwidth test application

    main

    The Host Memory Bandwidth application is designed to measure the throughput of host memory access. It utilizes three distinct kernels:

    1. read_bandwidth: Measures read throughput.
    2. write_bandwidth: Measures write throughput.
    3. bandwidth: Measures concurrent read and write throughput.

    The application iterates through various buffer sizes and reports the throughput (in GB/sec) for each kernel, ultimately identifying the maximum bandwidth achieved for each operation type.

  4. Overview of AXI Burst Performance check design

    main

    The AXI Burst Performance design is a benchmarking tool used to measure the time required to write a buffer into DDR or read a buffer from DDR. It is designed to evaluate how different hardware parameters impact effective throughput.

    The design includes two sets of 6 kernels. Each set uses a different data width, and within each set, individual kernels are configured with varying burst_length and num_outstanding parameters to allow for comparative performance analysis.

  5. Overview of RTL Stream Kernel to Kernel and Memory Mapped Example

    main

    This example demonstrates an RTL-based acceleration workflow where two simple increment RTL kernels are connected via a stream interface. To facilitate host communication, the kernels are connected to the host using memory-mapped C++ data mover kernels (krnl_mm2s and krnl_s2mm).

    Key Concepts:

    • RTL Kernel: Custom hardware logic integrated into the Vitis acceleration flow.
    • Read/Write Stream: Data transfer mechanism using streaming interfaces.
    • Keywords: ap_axiu (AXI4-Stream interface) and hls::stream (HLS stream library).

    Excluded Platforms:

    • All Versal Platforms (e.g., vck190)
    • ZC706 Evaluation board
    • All NoDMA Platforms (e.g., u50 nodma)
    • Versal V70
  6. Overview of Vitis Data Center Acceleration Examples

    main

    This repository provides reference implementations for developing accelerator applications on AMD Alveo Data Center platforms. It focuses on specific scenarios involving host code and kernel programming.

    Prerequisites: Users should have a basic understanding of the Vitis programming model and should have completed the Vitis HLS Introductory Examples and Vitis Tutorials before using these examples.

  7. Overview of Host Memory Bandwidth testing

    main

    This application measures host memory bandwidth by running three distinct kernels with variable buffer sizes:

    1. read_bandwidth: Measures read throughput.
    2. write_bandwidth: Measures write throughput.
    3. bandwidth: Measures concurrent read and write throughput.

    The application reports the throughput in GB/sec for each buffer size and identifies the maximum bandwidth achieved for each operation type.

  8. Overview of System Optimization Examples

    main
    The sys_opt directory contains examples focused on hardware optimization using HLS C/C++ kernels for Xilinx devices. These examples cover advanced Vitis flow configurations, multi-device/multi-process execution, and hardware resource management (PLRAM, SLR assignments).
  9. Overview of Host Python Examples

    main
    This section of the repository provides Python-based host code examples designed to run within the Vitis environment. These examples demonstrate how to interface with hardware kernels using Python, typically leveraging the pyxrt library to manage the XRT (Xilinx Runtime) lifecycle and kernel execution.
  10. Explore Performance Examples

    main

    The performance directory contains a collection of design examples focused on measuring various aspects of system throughput and latency. These examples are useful for benchmarking hardware configurations, optimizing memory access patterns, and understanding the impact of specific parameters on effective throughput.

    Key categories of performance tests include:

    • AXI Burst Performance: Measuring DDR read/write times and the impact of burst_length and num_outstanding parameters.
    • HBM Bandwidth: Testing High Bandwidth Memory throughput using multiple compute units and pseudo-channel configurations.
    • Host Memory Bandwidth: Measuring bandwidth between the host and global memory, including tests using native XRT APIs.
    • P2P Bandwidth: Measuring performance for Peer-to-Peer transfers between two FPGA devices.
    • IOPS: Measuring Input/Output Operations per second by enqueuing kernels multiple times.