Skip to content

Commit 756d3cf

Browse files
tczeszuntprimak
authored andcommitted
x64: injectors: add verbose check for dst_md having 'any' format_kind
1 parent d5ddbc8 commit 756d3cf

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/common/verbose_msg.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2023 Intel Corporation
2+
* Copyright 2023-2024 Intel Corporation
33
* Copyright 2023 Arm Ltd. and affiliates
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -86,6 +86,7 @@
8686

8787
#define VERBOSE_UNSUPPORTED_TAG "unsupported format tag"
8888
#define VERBOSE_UNSUPPORTED_TAG_S "unsupported format tag for %s"
89+
#define VERBOSE_UNSUPPORTED_FORMAT_KIND "unsupported format kind"
8990

9091
#define VERBOSE_ISA_SPARSE_ENCODING_MISMATCH \
9192
"sparse encoding is not supported on this isa"

src/cpu/x64/injectors/jit_uni_postops_injector.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2020-2023 Intel Corporation
2+
* Copyright 2020-2024 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,6 +14,7 @@
1414
* limitations under the License.
1515
*******************************************************************************/
1616
#include <cassert>
17+
#include "common/verbose.hpp"
1718
#include "cpu/x64/injectors/jit_uni_postops_injector.hpp"
1819

1920
namespace dnnl {
@@ -185,6 +186,10 @@ bool post_ops_ok(const post_ops_ok_args_t &post_ops_ok_args) {
185186
const auto &enabled_bcast_strategy
186187
= post_ops_ok_args.enabled_bcast_strategy;
187188

189+
VCONDCHECK(primitive, create, check, injector,
190+
dst_d != nullptr && dst_d->md_->format_kind != dnnl_format_kind_any,
191+
false, VERBOSE_UNSUPPORTED_FORMAT_KIND);
192+
188193
// Save scale and zero point of first sum postop in order to check that any
189194
// subsequent sum postops have the same values. This check is necessary
190195
// because there is only one lambda injector.

0 commit comments

Comments
 (0)