diff options
author | Mateusz Chudyk <mateuszchudyk@gmail.com> | 2019-08-23 13:52:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-23 13:52:44 +0300 |
commit | 2d9f646d5fe397c1a8660b91f2a5021c215b35ae (patch) | |
tree | cdfa69bc76ccc44415011ff5eb17452d1b0e0f3c /test/test.h | |
parent | 66c40eed8b649abe2f903ceca2279abe78d5f385 (diff) | |
parent | 773cb5271efca4c7d9efe1143f22cf81a472f774 (diff) |
Merge pull request #30 from kpu/add127_fullupcast
Add127 fullupcast
Diffstat (limited to 'test/test.h')
-rw-r--r-- | test/test.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test.h b/test/test.h index f2f745d..1034337 100644 --- a/test/test.h +++ b/test/test.h @@ -1,4 +1,9 @@ +#pragma once + #include "3rd_party/catch.hpp" +#include <sstream> +#include "intgemm.h" +#include "aligned.h" #include "config.h" @@ -14,3 +19,14 @@ } while(0) #define KERNEL_TEST_CASE(name) TEST_CASE("Kernel: " name, "[kernel_test]") + +namespace intgemm { +void SlowRefFloat(const float *A, const float *B, float *C, Index A_rows, Index width, Index B_cols, const float *bias=nullptr); + +// Compute A*B slowly from integers. +template <class Integer> void SlowRefInt(const Integer *A, const Integer *B, float *C, float unquant_mult, Index A_rows, Index width, Index B_cols, const float *bias=nullptr); + +void Compare(const float *float_ref, const float *int_ref, const float *int_test, std::size_t size, std::string test_info, + float int_tolerance, float float_tolerance, float MSE_float_tolerance, float MSE_int_tolerance); + +} //namespace intgemm |