6 #include "utility_dnnlowp_ops.h" 10 int main(
int argc,
const char* argv[]) {
11 int LEN = argc > 1 ? atoi(argv[1]) : 65536;
13 vector<uint8_t> a(LEN), b(LEN), c_avx2(LEN), c_avx512(LEN);
14 for (
int i = 0; i < LEN; ++i) {
19 chrono::time_point<chrono::system_clock> t = chrono::system_clock::now();
20 caffe2::internal::ElementWiseSumAVX2<uint8_t, false>(
31 double dt = chrono::duration<double>(chrono::system_clock::now() - t).count();
32 double bytes = 3. * LEN *
sizeof(a[0]);
33 cout << bytes / dt / 1e9 <<
" GB/s" << endl;