@@ -162,10 +162,10 @@ struct CBlas<platform::float16> {
162
162
}
163
163
#endif
164
164
};
165
+
165
166
template <typename T>
166
- inline static bool UseXSMM (const int &m, const int &n, const int &k,
167
- bool transa, bool transb, const T &alpha,
168
- const T &beta) {
167
+ inline bool UseXSMM (const int &m, const int &n, const int &k, bool transa,
168
+ bool transb, const T &alpha, const T &beta) {
169
169
#ifdef PADDLE_WITH_LIBXSMM
170
170
// Refer to https://github.com/hfp/libxsmm/blob/master/README.md
171
171
// But the threshold is custom
@@ -182,6 +182,14 @@ inline static bool UseXSMM(const int &m, const int &n, const int &k,
182
182
return false ;
183
183
}
184
184
185
+ template <>
186
+ inline bool UseXSMM<platform::float16>(const int &m, const int &n, const int &k,
187
+ bool transa, bool transb,
188
+ const platform::float16 &alpha,
189
+ const platform::float16 &beta) {
190
+ return false ;
191
+ }
192
+
185
193
template <>
186
194
template <typename T>
187
195
void Blas<platform::CPUDeviceContext>::GEMM(CBLAS_TRANSPOSE transA,
@@ -194,7 +202,6 @@ void Blas<platform::CPUDeviceContext>::GEMM(CBLAS_TRANSPOSE transA,
194
202
#ifdef PADDLE_WITH_LIBXSMM
195
203
if (UseXSMM (M, N, K, transA != CblasNoTrans, transB != CblasNoTrans, alpha,
196
204
beta)) {
197
- // refer to https://github.com/hfp/libxsmm/blob/master/README.md
198
205
// Note: SMM use ColMajor
199
206
const char transa = ' N' ;
200
207
const char transb = ' N' ;
0 commit comments