HEBench
|
#include <hebench_logreg_o.h>
Public Member Functions | |
~Benchmark () override=default | |
Public Member Functions inherited from hebench::TestHarness::BenchmarkOffline | |
~BenchmarkOffline () override | |
bool | run (hebench::Utilities::TimingReportEx &out_report, IBenchmark::RunConfig &config) override |
Executes the benchmark offline test. More... | |
Public Member Functions inherited from hebench::TestHarness::PartialBenchmarkCategory | |
~PartialBenchmarkCategory () override | |
Public Member Functions inherited from hebench::TestHarness::PartialBenchmark | |
~PartialBenchmark () override | |
std::weak_ptr< Engine > | getEngine () const override |
const hebench::APIBridge::Handle & | handle () const override |
std::uint32_t | getEventIDNext () |
Returns the next available event ID. More... | |
void | initBackend (hebench::Utilities::TimingReportEx &out_report, const FriendPrivateKey &) |
Initializes backend benchmark. More... | |
virtual void | postInit () |
Called automatically during initialization after the backend has been initialized. More... | |
void | checkInitializationState (const FriendPrivateKey &) const |
Used to check that initialization steps have been completed successfully. More... | |
Public Member Functions inherited from hebench::TestHarness::IBenchmark | |
virtual | ~IBenchmark ()=default |
Protected Member Functions | |
void | init () override |
Initializes the partial benchmark members. More... | |
IDataLoader::Ptr | getDataset () const override |
Dataset to be used for operations previously initialized during creation of this object. More... | |
std::uint32_t | getEventIDStart () const override |
An ID to identify the first event during the benchmark run. More... | |
bool | validateResult (IDataLoader::Ptr dataset, const std::uint64_t *param_data_pack_indices, const std::vector< hebench::APIBridge::NativeDataBuffer * > &p_outputs, hebench::APIBridge::DataType data_type) const override |
Validates the result of an operation against the ground truth. More... | |
Protected Member Functions inherited from hebench::TestHarness::BenchmarkOffline | |
BenchmarkOffline (std::shared_ptr< Engine > p_engine, const IBenchmarkDescriptor::DescriptionToken &description_token) | |
Protected Member Functions inherited from hebench::TestHarness::PartialBenchmarkCategory | |
PartialBenchmarkCategory (std::shared_ptr< Engine > p_engine, const IBenchmarkDescriptor::DescriptionToken &description_token) | |
virtual void | logResult (std::ostream &os, IDataLoader::Ptr dataset, const std::uint64_t *param_data_pack_indices, const std::vector< hebench::APIBridge::NativeDataBuffer * > &outputs, hebench::APIBridge::DataType data_type) const |
Outputs the arguments, expected ground truth, and received result to an output stream. More... | |
Protected Member Functions inherited from hebench::TestHarness::PartialBenchmark | |
const BenchmarkDescription::Backend & | getBackendDescription () const |
Allows read-only access to this benchmark backend description. More... | |
const BenchmarkDescription::Configuration & | getBenchmarkConfiguration () const |
Allows read-only access to this benchmark configuration. More... | |
const BenchmarkDescription::Description & | getDescription () const |
Allows read-only access to this benchmark text description. More... | |
PartialBenchmark (std::shared_ptr< Engine > p_engine, const IBenchmarkDescriptor::DescriptionToken &description_token) | |
void | validateRetCode (hebench::APIBridge::ErrorCode err_code, bool last_error=true) const |
Validates whether the specified HEBench API return code represents a success or error. More... | |
Protected Member Functions inherited from hebench::TestHarness::IBenchmark | |
IBenchmark ()=default | |
Friends | |
class | hebench::TestHarness::LogisticRegression::Offline::BenchmarkDescriptor |
Additional Inherited Members | |
Public Types inherited from hebench::TestHarness::BenchmarkOffline | |
typedef std::shared_ptr< BenchmarkOffline > | Ptr |
Public Types inherited from hebench::TestHarness::PartialBenchmarkCategory | |
typedef std::shared_ptr< PartialBenchmarkCategory > | Ptr |
Public Types inherited from hebench::TestHarness::PartialBenchmark | |
typedef std::shared_ptr< PartialBenchmark > | Ptr |
Public Types inherited from hebench::TestHarness::IBenchmark | |
typedef std::shared_ptr< IBenchmark > | Ptr |
Definition at line 55 of file hebench_logreg_o.h.
|
overridedefault |
|
inlineoverrideprotectedvirtual |
Dataset to be used for operations previously initialized during creation of this object.
Implements hebench::TestHarness::PartialBenchmarkCategory.
Definition at line 70 of file hebench_logreg_o.h.
|
inlineoverrideprotectedvirtual |
An ID to identify the first event during the benchmark run.
All events in the execution of the benchmark will have an ID. The first event's ID will be this value. ID of subsequent events will be a value greater than this ID.
This is for report and display purposes only, so it matters not whether different benchmarks produce the same ID. If no override, it defaults to 0 for all derived classes.
Reimplemented from hebench::TestHarness::PartialBenchmark.
Definition at line 71 of file hebench_logreg_o.h.
|
overrideprotectedvirtual |
Initializes the partial benchmark members.
This method is provided to allow clients to perform polymorphic initialization outside of the class constructor before the backend benchmark is initialized. Unless an initialized backend benchmark is required, this is a good spot to perform dataset generation or loading for the benchmark to execute.
This method is called automatically during creation and initialization of the benchmark.
Implements hebench::TestHarness::PartialBenchmark.
Definition at line 159 of file hebench_logreg_o.cpp.
|
overrideprotectedvirtual |
Validates the result of an operation against the ground truth.
[in] | dataset | Dataset containing the data for the operation performed. |
[in] | param_data_pack_indices | Collection of indices for data sample to use inside each parameter pack. See IDataLoader::getResultIndex(). |
[in] | p_outputs | Pointer to the buffers containing the result of the operation to validate. |
[in] | data_type | Data type of the data used in the operation. |
true
if result is valid. false
if result is not valid (or an std::exception descendant can be thrown in such case).The number of buffers in vector p_outputs
must be the same as the dimension of the ground truth result. It is expected that each buffer pointed by p_outputs
is, at least, of the same size, in bytes, as the corresponding ground truth buffer.
Validation routine can either retrieve the ground truth result from dataset
or compute it on the fly using the inputs from dataset
pointed by param_data_pack_indices
.
The default implementation provided assumes that dataset
contains the results pre-computed and the data type for all arguments and results is data_type
. If this is not the case for the derived class, clients should provide their own override version of this method.
Reimplemented from hebench::TestHarness::PartialBenchmarkCategory.
Definition at line 239 of file hebench_logreg_o.cpp.
|
friend |
Definition at line 64 of file hebench_logreg_o.h.