gpu: postops: add dispatch check for unsupported select postop

This commit is contained in:
Ankit Manerikar
2025-05-26 07:52:18 -07:00
parent 0bfca9daed
commit df7d742a09
2 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,11 @@ status_t gemm_with_post_ops_t::pd_t::init(impl::engine_t *engine) {
}
attr_info_ = attr_info_t::create(attributes_with_po);
const auto &po = attributes_with_po->post_ops_;
for (auto i = 0; i < po.len(); ++i)
VDISPATCH_GEMM(!po.entry_[i].is_binary_with_ternary_op(),
VERBOSE_UNSUPPORTED_POSTOP);
VDISPATCH_GEMM(d->sum_ab == sum_ab::sum_none, VERBOSE_UNSUPPORTED_FEATURE,
"bias reduction");

View File

@ -568,6 +568,7 @@ bool post_ops_with_binary_ok(const primitive_attr_t *attr,
&& (is_eltwise(po_idx) || is_sum(po_idx) || is_binary(po_idx)
|| is_prelu(po_idx));
if (is_binary(po_idx)) {
if (p.entry_[po_idx].is_binary_with_ternary_op()) return false;
const auto &bin_desc = p.entry_[po_idx].binary.src1_desc;
bool has_runtime_dims = false;
int num_size_one_dims = 0;