diff options
Diffstat (limited to 'src/PackAMatrix.cc')
-rw-r--r-- | src/PackAMatrix.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/PackAMatrix.cc b/src/PackAMatrix.cc index 89ec13e..87adaba 100644 --- a/src/PackAMatrix.cc +++ b/src/PackAMatrix.cc @@ -31,10 +31,18 @@ PackAMatrix<T, accT>::PackAMatrix( trans_(trans), smat_(smat), ld_(ld) { + if (!cpuinfo_initialize()) { + throw std::runtime_error("Failed to initialize cpuinfo!"); + } if (params) { + if (fbgemmHasAvx512Support() || fbgemmHasAvx2Support()) { BaseType::brow_ = params->MCB; BaseType::bcol_ = params->KCB; row_interleave_B_ = params->ROW_INTERLEAVE; + } else { + // TODO: Have default slower path + assert(0 && "unsupported architecure"); + } } else { if (fbgemmHasAvx512Support()) { BaseType::brow_ = PackingTraits<T, accT, inst_set_t::avx512>::MCB; |