Skip to content

Commit

Permalink
cpu: simple_resampling: disable binary post-ops for non-abx layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
tczeszun authored and vpirogov committed Jul 5, 2023
1 parent f333bb8 commit 4a0e087
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/cpu/simple_resampling.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2019-2022 Intel Corporation
* Copyright 2019-2023 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 Down Expand Up @@ -73,6 +73,14 @@ struct simple_resampling_fwd_t : public primitive_t {
&& attr_.set_default_formats(dst_md(0)) == status::success;
if (!ok) return status::unimplemented;

const bool has_binary
= attr()->post_ops_.find(primitive_kind::binary) >= 0;
if (has_binary) {
if (memory_desc_matches_one_of_tag(*dst_md(0), ncw, nchw, ncdhw)
== format_tag::undef)
return status::unimplemented;
}

format_tag_t dat_tag = memory_desc_matches_one_of_tag(*src_md(),
nCw8c, nChw8c, nCdhw8c, nCw16c, nChw16c, nCdhw16c, ncw,
nchw, ncdhw, nwc, nhwc, ndhwc);
Expand Down

0 comments on commit 4a0e087

Please sign in to comment.