From ec7054a2c79ae33d3db4ff04ce11360c2c896d56 Mon Sep 17 00:00:00 2001 From: "Safonov, Igor" Date: Fri, 6 Oct 2023 14:32:54 -0700 Subject: [PATCH] src: gpu: ip: fix tag matching --- src/gpu/gpu_inner_product_pd.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gpu/gpu_inner_product_pd.hpp b/src/gpu/gpu_inner_product_pd.hpp index c79dbc6f91e..15b00437d6c 100644 --- a/src/gpu/gpu_inner_product_pd.hpp +++ b/src/gpu/gpu_inner_product_pd.hpp @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright 2019-2020 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. @@ -80,7 +80,9 @@ status_t template_set_default_params(memory_desc_t &src_md, auto init_md = [&](memory_desc_t &out_md, const memory_desc_t &in_md) { format_tag_t md_tag; - if (memory_desc_matches_one_of_tag(in_md, ba, cba, cdba, cdeba)) + if (memory_desc_matches_one_of_tag(in_md, ab, abc, abcd, abcde)) + md_tag = utils::pick(ndims - 2, ab, abc, abcd, abcde); + else if (memory_desc_matches_one_of_tag(in_md, ba, cba, cdba, cdeba)) md_tag = utils::pick(ndims - 2, ab, acb, acdb, acdeb); else if (memory_desc_matches_one_of_tag(in_md, acb, acdb, acdeb)) md_tag = utils::pick(ndims - 3, cba, cdba, cdeba);