5 #ifndef _HEBench_Harness_DataGenerator_MatrixMultiply_H_0596d40a3cce4b108a81595c50eb286d
6 #define _HEBench_Harness_DataGenerator_MatrixMultiply_H_0596d40a3cce4b108a81595c50eb286d
14 #include "hebench/modules/general/include/nocopy.h"
15 #include "hebench/modules/logging/include/logging.h"
23 namespace TestHarness {
47 fetchMatrixSizes(
const std::vector<hebench::APIBridge::WorkloadParam> &w_params);
55 const std::vector<hebench::APIBridge::WorkloadParam> &w_params)
const override;
71 typedef std::shared_ptr<DataLoader>
Ptr;
74 std::uint64_t batch_size_mat_a,
75 std::uint64_t batch_size_mat_b,
78 std::uint64_t expected_sample_size_mat_a,
79 std::uint64_t expected_sample_size_mat_b,
81 const std::string &dataset_filename);
86 void computeResult(std::vector<hebench::APIBridge::NativeDataBuffer *> &result,
87 const std::uint64_t *param_data_pack_indices,
91 static constexpr std::size_t InputDim0 = 2;
92 static constexpr std::size_t OutputDim0 = 1;
93 std::uint64_t m_rows_a;
94 std::uint64_t m_cols_a;
95 std::uint64_t m_cols_b;
98 void init(std::uint64_t rows_a, std::uint64_t cols_a, std::uint64_t cols_b,
99 std::uint64_t batch_size_mat_a,
100 std::uint64_t batch_size_mat_b,
102 void init(std::uint64_t rows_a, std::uint64_t cols_a, std::uint64_t cols_b,
103 std::uint64_t expected_sample_size_mat_a,
104 std::uint64_t expected_sample_size_mat_b,
106 const std::string &dataset_filename);
Specifies a benchmark configuration.
static std::array< std::pair< std::uint64_t, std::uint64_t >, OpParameterCount > fetchMatrixSizes(const std::vector< hebench::APIBridge::WorkloadParam > &w_params)
fetchMatrixSizes
bool matchBenchmarkDescriptor(const hebench::APIBridge::BenchmarkDescriptor &bench_desc, const std::vector< hebench::APIBridge::WorkloadParam > &w_params) const override
Determines if the represented benchmark can perform the workload described by a specified HEBench ben...
static constexpr const char * BaseWorkloadName
static constexpr std::uint64_t WorkloadParameterCount
static constexpr std::uint64_t OpParameterCount
~BenchmarkDescriptorCategory() override=default
BenchmarkDescriptorCategory()=default
void completeWorkloadDescription(WorkloadDescriptionOutput &output, const Engine &engine, const BenchmarkDescription::Backend &backend_desc, const BenchmarkDescription::Configuration &config) const override
Completes the description for the matched benchmark.
static hebench::APIBridge::WorkloadParamType::WorkloadParamType WorkloadParameterType[WorkloadParameterCount]
static constexpr std::uint64_t OpResultCount
static DataLoader::Ptr create(std::uint64_t rows_a, std::uint64_t cols_a, std::uint64_t cols_b, std::uint64_t batch_size_mat_a, std::uint64_t batch_size_mat_b, hebench::APIBridge::DataType data_type)
void computeResult(std::vector< hebench::APIBridge::NativeDataBuffer * > &result, const std::uint64_t *param_data_pack_indices, hebench::APIBridge::DataType data_type) override
Computes result of the operation on the input data given the of the input sample.
std::shared_ptr< DataLoader > Ptr
Provides boilerplate implementation to common methods of interface IBenchmarkDescription and implemen...
Bundles values that need to be filled by a workload during completeWorkloadDescription().
WorkloadParamType
Defines the possible data types for a workload flexible parameter.
DataType
Defines data types for a workload.
Defines a benchmark test.