Skip to content

Commit

Permalink
x64: injectors: add verbose check for dst_md having 'any' format_kind
Browse files Browse the repository at this point in the history
  • Loading branch information
tczeszun authored and tprimak committed Apr 15, 2024
1 parent d5ddbc8 commit 756d3cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/common/verbose_msg.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2023 Intel Corporation
* Copyright 2023-2024 Intel Corporation
* Copyright 2023 Arm Ltd. and affiliates
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -86,6 +86,7 @@

#define VERBOSE_UNSUPPORTED_TAG "unsupported format tag"
#define VERBOSE_UNSUPPORTED_TAG_S "unsupported format tag for %s"
#define VERBOSE_UNSUPPORTED_FORMAT_KIND "unsupported format kind"

#define VERBOSE_ISA_SPARSE_ENCODING_MISMATCH \
"sparse encoding is not supported on this isa"
Expand Down
7 changes: 6 additions & 1 deletion src/cpu/x64/injectors/jit_uni_postops_injector.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2020-2023 Intel Corporation
* Copyright 2020-2024 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,6 +14,7 @@
* limitations under the License.
*******************************************************************************/
#include <cassert>
#include "common/verbose.hpp"
#include "cpu/x64/injectors/jit_uni_postops_injector.hpp"

namespace dnnl {
Expand Down Expand Up @@ -185,6 +186,10 @@ bool post_ops_ok(const post_ops_ok_args_t &post_ops_ok_args) {
const auto &enabled_bcast_strategy
= post_ops_ok_args.enabled_bcast_strategy;

VCONDCHECK(primitive, create, check, injector,
dst_d != nullptr && dst_d->md_->format_kind != dnnl_format_kind_any,
false, VERBOSE_UNSUPPORTED_FORMAT_KIND);

// Save scale and zero point of first sum postop in order to check that any
// subsequent sum postops have the same values. This check is necessary
// because there is only one lambda injector.
Expand Down

0 comments on commit 756d3cf

Please sign in to comment.