Naive implement cblas

trainerSaveLoadParams
Yu Yang 7 years ago
parent 60d6348e69
commit 4db43c6c9f

@ -24,17 +24,23 @@ struct CBlas;
template <> template <>
struct CBlas<float> { struct CBlas<float> {
static constexpr auto GEMM = cblas_sgemm; template <typename... ARGS>
static void GEMM(ARGS... args) {
cblas_sgemm(args...);
}
}; };
template <> template <>
struct CBlas<double> { struct CBlas<double> {
static constexpr auto GEMM = cblas_dgemm; template <typename... ARGS>
static void GEMM(ARGS... args) {
cblas_dgemm(args...);
}
}; };
template <> template <>
struct CBlas<platform::float16> { struct CBlas<platform::float16> {
void GEMM(...) { PADDLE_THROW("float16 GEMM not supported on CPU"); } static void GEMM(...) { PADDLE_THROW("float16 GEMM not supported on CPU"); }
}; };
template <> template <>

Loading…
Cancel
Save