diff --git a/benchmarks/benchmark.hpp b/benchmarks/benchmark.hpp index aec1ba6..c4310ea 100644 --- a/benchmarks/benchmark.hpp +++ b/benchmarks/benchmark.hpp @@ -12,7 +12,7 @@ #include #include "util/barrier.hpp" -#include "util/statuscode-tostring.hpp" +#include "util/dml-helper.hpp" #include "util/task-data.hpp" #include "util/array_utils.h" diff --git a/benchmarks/util/array_utils.h b/benchmarks/util/array_utils.h index d9f8a85..4604078 100644 --- a/benchmarks/util/array_utils.h +++ b/benchmarks/util/array_utils.h @@ -2,6 +2,7 @@ // author: Andre Berthold #pragma once + #include #include #include diff --git a/benchmarks/util/statuscode-tostring.hpp b/benchmarks/util/statuscode-tostring.hpp deleted file mode 100644 index 1686fd1..0000000 --- a/benchmarks/util/statuscode-tostring.hpp +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include - -inline const std::string StatusCodeToString(const dml::status_code code) { - switch(code) { - case dml::status_code::ok: return "ok"; - case dml::status_code::false_predicate: return "false predicate"; - case dml::status_code::partial_completion: return "partial completion"; - case dml::status_code::nullptr_error: return "nullptr error"; - case dml::status_code::bad_size: return "bad size"; - case dml::status_code::bad_length: return "bad length"; - case dml::status_code::inconsistent_size: return "inconsistent size"; - case dml::status_code::dualcast_bad_padding: return "dualcast bad padding"; - case dml::status_code::bad_alignment: return "bad alignment"; - case dml::status_code::buffers_overlapping: return "buffers overlapping"; - case dml::status_code::delta_delta_empty: return "delta delta empty"; - case dml::status_code::batch_overflow: return "batch overflow"; - case dml::status_code::execution_failed: return "execution failed"; - case dml::status_code::unsupported_operation: return "unsupported operation"; - case dml::status_code::queue_busy: return "queue busy"; - case dml::status_code::error: return "unknown error"; - case dml::status_code::config_error: return "config error"; - default: return "unhandled error"; - } -} \ No newline at end of file diff --git a/benchmarks/util/task-data.hpp b/benchmarks/util/task-data.hpp index 2c770c4..9adf31f 100644 --- a/benchmarks/util/task-data.hpp +++ b/benchmarks/util/task-data.hpp @@ -4,8 +4,8 @@ #include "json/single_include/nlohmann/json.hpp" -#include "statuscode-tostring.hpp" #include "barrier.hpp" +#include "dml-helper.hpp" struct TaskData { // thread placement / engine selection @@ -21,12 +21,9 @@ struct TaskData { // thread output dml::status_code status; // average run duration in microseconds - double combined_duration; - double submit_duration; - double complete_duration; - double combined_duration_stdev; - double submit_duration_stdev; - double complete_duration_stdev; + std::vector combined_duration; + std::vector submit_duration; + std::vector complete_duration; // completed iterations uint32_t rep_completed; // set by execution @@ -45,9 +42,6 @@ inline void to_json(nlohmann::json& j, const TaskData& a) { j["report"]["time"]["completion_avg"] = a.complete_duration; j["report"]["time"]["submission_avg"] = a.submit_duration; j["report"]["time"]["combined_avg"] = a.combined_duration; - j["report"]["time"]["completion_stdev"] = a.complete_duration_stdev; - j["report"]["time"]["submission_stdev"] = a.submit_duration_stdev; - j["report"]["time"]["combined_stdev"] = a.combined_duration_stdev; j["report"]["iterations_completed"] = a.rep_completed; j["report"]["status"] = StatusCodeToString(a.status); }