Skip to content

Commit c612729

Browse files
committed
benchdnn: matmul: skip unimplemented mixed data types
1 parent aa969e4 commit c612729

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/benchdnn/matmul/matmul.cpp

+24
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,30 @@ void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
528528
res->reason = skip_reason::case_not_supported;
529529
return;
530530
}
531+
532+
auto is_int = [](dnnl_data_type_t t) {
533+
return dnnl::impl::utils::one_of(
534+
t, dnnl_s4, dnnl_u4, dnnl_s8, dnnl_u8, dnnl_s32);
535+
};
536+
if (is_int(prb->src_dt()) != is_int(prb->wei_dt())) {
537+
BENCHDNN_PRINT(2,
538+
"[SKIP][%s:%d]: CPU doesn't support mixed integer and "
539+
"floating point source and weights.\n",
540+
__FILE__, __LINE__);
541+
res->state = SKIPPED;
542+
res->reason = skip_reason::case_not_supported;
543+
}
544+
545+
if (!is_int(prb->src_dt()) && !is_int(prb->wei_dt())
546+
&& is_int(prb->dst_dt())) {
547+
BENCHDNN_PRINT(2,
548+
"[SKIP][%s:%d]: CPU doesn't support integer destination "
549+
"with floating point source and weights.\n",
550+
__FILE__, __LINE__);
551+
res->state = SKIPPED;
552+
res->reason = skip_reason::case_not_supported;
553+
}
554+
531555
if (!prb->attr.scales.is_def(DNNL_ARG_DST)
532556
&& prb->attr.scales.get(DNNL_ARG_DST).policy
533557
!= attr_t::COMMON) {

0 commit comments

Comments
 (0)