Skip to content

Commit

Permalink
use byxf format when fsv2 is selected in select_preferred_formats_for…
Browse files Browse the repository at this point in the history
…_onednn
  • Loading branch information
wilson-seok committed Aug 2, 2024
1 parent c7c8743 commit 0a67997
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/plugins/intel_gpu/src/graph/impls/onednn/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,14 @@ cldnn::format find_data_format(dnnl::memory::desc desc) {
break;
}
}
// b_fs_yx_fsv2 has dnnl::memory::format_tag::undef , so not select the format.
if (static_cast<format::type>(fmt_idx) == format::type::b_fs_yx_fsv2) {
is_match = false;

if (is_match) {
// b_fs_yx_fsv2 has dnnl::memory::format_tag::undef , so select byfx instead of b_fs_yx_fsv2.
if (static_cast<format::type>(fmt_idx) == format::type::b_fs_yx_fsv2)
return format::type::byxf;
else
return static_cast<format::type>(fmt_idx);
}
if (is_match)
return static_cast<format::type>(fmt_idx);
}
}

Expand Down

0 comments on commit 0a67997

Please sign in to comment.