MLIR-AIE 1.4.5.dev
hrx_test_wrapper.h File Reference
#include "cxxopts.hpp"
#include "test_utils.h"
#include "hrx_amdxdna.h"
#include "hrx_runtime.h"
#include <chrono>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <memory>
#include <stdexcept>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for hrx_test_wrapper.h:

Go to the source code of this file.

Classes

class  hrx_test::Context
class  hrx_test::Buffer
struct  hrx_test::LoadedKernel
struct  hrx_test::ChainRun
struct  args
struct  InBuf< T >
struct  OutBuf< T >

Namespaces

namespace  hrx_test

Functions

void hrx_test::hrx_check (hrx_status_t status, const char *what)
std::vector< uint8_t > hrx_test::control_code_from_elf (const std::vector< uint8_t > &d)
std::vector< uint8_t > hrx_test::read_transaction (const std::string &insts_path)
LoadedKernel hrx_test::load_kernel (const std::string &xclbin_path, const std::string &insts_path, const std::string &kernel_name)
double hrx_test::dispatch_once (const LoadedKernel &lk, const std::vector< Buffer * > &bindings)
double hrx_test::dispatch_chain (const std::vector< ChainRun > &runs)
void hrx_test::reject_unsupported_features (int trace_size, bool enable_ctrl_pkts)
void hrx_test::report_timing (double total, double mn, double mx, int n_iters)
struct args parse_args (int argc, const char *argv[])
template<typename T>
InBuf< T > make_in (int volume, void(*init)(T *, int))
template<typename T>
OutBuf< T > make_out (int volume, void(*init)(T *, int))
template<typename Verify, typename TOut, typename... TIns>
int setup_and_run_aie (Verify verify_results, std::tuple< InBuf< TIns >... > inputs, OutBuf< TOut > output, struct args myargs, bool enable_ctrl_pkts=false)
template<typename T1, typename T2, typename T3, void(*)(T1 *, int) init_bufIn1, void(*)(T2 *, int) init_bufIn2, void(*)(T3 *, int) init_bufOut, int(*)(T1 *, T2 *, T3 *, int, int) verify_results>
int setup_and_run_aie (int IN1_VOLUME, int IN2_VOLUME, int OUT_VOLUME, struct args myargs, bool enable_ctrl_pkts=false)
template<typename T1, typename T3, void(*)(T1 *, int) init_bufIn1, void(*)(T3 *, int) init_bufOut, int(*)(T1 *, T3 *, int, int) verify_results>
int setup_and_run_aie (int IN1_VOLUME, int OUT_VOLUME, struct args myargs, bool enable_ctrl_pkts=false)

Function Documentation

◆ make_in()

template<typename T>
InBuf< T > make_in ( int volume,
void(* init )(T *, int) )

Definition at line 446 of file hrx_test_wrapper.h.

◆ make_out()

template<typename T>
OutBuf< T > make_out ( int volume,
void(* init )(T *, int) )

Definition at line 459 of file hrx_test_wrapper.h.

◆ parse_args()

◆ setup_and_run_aie() [1/3]

template<typename T1, typename T2, typename T3, void(*)(T1 *, int) init_bufIn1, void(*)(T2 *, int) init_bufIn2, void(*)(T3 *, int) init_bufOut, int(*)(T1 *, T2 *, T3 *, int, int) verify_results>
int setup_and_run_aie ( int IN1_VOLUME,
int IN2_VOLUME,
int OUT_VOLUME,
struct args myargs,
bool enable_ctrl_pkts = false )

◆ setup_and_run_aie() [2/3]

template<typename T1, typename T3, void(*)(T1 *, int) init_bufIn1, void(*)(T3 *, int) init_bufOut, int(*)(T1 *, T3 *, int, int) verify_results>
int setup_and_run_aie ( int IN1_VOLUME,
int OUT_VOLUME,
struct args myargs,
bool enable_ctrl_pkts = false )

◆ setup_and_run_aie() [3/3]

template<typename Verify, typename TOut, typename... TIns>
int setup_and_run_aie ( Verify verify_results,
std::tuple< InBuf< TIns >... > inputs,
OutBuf< TOut > output,
struct args myargs,
bool enable_ctrl_pkts = false )