1 #ifndef CAFFE2_UTILS_MKL_SGEMM_PACK_H_ 2 #define CAFFE2_UTILS_MKL_SGEMM_PACK_H_ 4 #include "caffe2/core/logging.h" 9 CBLAS_IDENTIFIER identifier_;
10 CBLAS_TRANSPOSE trans_;
16 float* data_ =
nullptr;
19 const CBLAS_IDENTIFIER identifier,
20 const CBLAS_TRANSPOSE trans,
27 : identifier_(identifier),
34 data_ = cblas_sgemm_alloc(identifier, m, n, k);
35 CAFFE_ENFORCE(data_,
"MKL runtime error: cannot allocate sgemm memory.");
37 CblasRowMajor, identifier, trans, m, n, k, alpha, src, ld, data_);
42 cblas_sgemm_free(data_);
50 #endif // CAFFE2_UTILS_MKL_SGEMM_PACK_H_ Simple registry implementation in Caffe2 that uses static variables to register object creators durin...