25 #ifndef TESTS_VALIDATION_DYNAMIC_FUSION_UTILS
26 #define TESTS_VALIDATION_DYNAMIC_FUSION_UTILS
29 #include "utils/Utils.h"
33 #include <type_traits>
46 #define TICK(clock_name) \
47 auto clock_name##_tick = std::chrono::high_resolution_clock::now();
48 #define TOCK(clock_name, measurement_map) \
49 auto clock_name##_tock = std::chrono::high_resolution_clock::now(); \
50 measurement_map["\"" #clock_name "\""] = duration_cast<microseconds>(clock_name##_tock - clock_name##_tick);
51 #define TOCK_AVG(clock_name, measurement_map, num_iterations) \
52 auto clock_name##_tock = std::chrono::high_resolution_clock::now(); \
53 measurement_map["\"" #clock_name "\""] = duration_cast<microseconds>((clock_name##_tock - clock_name##_tick) / (num_iterations));
55 template <
typename T,
typename U>
58 static_assert(std::is_floating_point<T>::value || std::is_same<T, half>::value,
"Only floating point data types supported.");
65 DistributionType distribution_inf{ T(std::numeric_limits<float>::infinity()), T(std::numeric_limits<float>::infinity()) };
66 library->fill_borders_with_garbage(
tensor, distribution_inf, seed);