Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixup: src: introduce quant_entry_t and refactor arg_scales_t to rely on it #2657

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/automation/aarch64/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ if [[ "$OS" == "Linux" ]]; then
SKIPPED_GRAPH_TEST_FAILURES+="|cpu-graph-mqa-cpp"
SKIPPED_GRAPH_TEST_FAILURES+="|cpu-graph-sdpa-cpp"
SKIPPED_GRAPH_TEST_FAILURES+="|cpu-graph-sdpa-stacked-qkv-cpp"
# TODO: Issue: https://github.com/oneapi-src/oneDNN/issues/2572
SKIPPED_GRAPH_TEST_FAILURES+="|test_graph_unit_dnnl_convolution"
SKIPPED_GRAPH_TEST_FAILURES+="|test_graph_unit_dnnl_large_partition_cpu"
fi

Expand Down
13 changes: 8 additions & 5 deletions src/cpu/aarch64/brgemm/brgemm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ status_t brgemm_desc_set_postops(brgemm_t *brg, const primitive_attr_t *attr,

const auto &src_scales = attr->scales_.get(DNNL_ARG_SRC);
const auto &wei_scales = attr->scales_.get(DNNL_ARG_WEIGHTS);
brg->with_scales = !src_scales.has_default_values()
|| !wei_scales.has_default_values()
const bool has_src_scales = !src_scales.has_default_values();
const bool has_wei_scales = !wei_scales.has_default_values();
brg->with_scales = has_src_scales || has_wei_scales
|| brg->with_weights_scale_adjust;
if (brg->with_scales) {
// Note. the current version supports only two different output scale
Expand All @@ -310,9 +311,11 @@ status_t brgemm_desc_set_postops(brgemm_t *brg, const primitive_attr_t *attr,
}

const auto &dst_scales = attr->scales_.get(DNNL_ARG_DST);
brg->with_dst_scales = !dst_scales.has_default_values();
const bool scales_ok = src_scales.get_mask() == 0
&& dst_scales.get_mask() == 0
const bool has_dst_scales = !dst_scales.has_default_values();
brg->with_dst_scales = has_dst_scales;
const bool scales_ok
= IMPLICATION(has_src_scales, src_scales.get_mask() == 0)
&& IMPLICATION(has_dst_scales, dst_scales.get_mask() == 0)
&& attr->scales_.has_default_values(
{DNNL_ARG_SRC, DNNL_ARG_WEIGHTS, DNNL_ARG_DST});
if (!scales_ok) return status::unimplemented;
Expand Down