Skip to content

Commit

Permalink
enable onednn for tests ON, LSTMSeq accept bfyx and fbyx format
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-miotk committed Oct 20, 2024
1 parent 459e1ad commit 14e53f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct LSTMSeqImplementationManager : public ImplementationManager {

bool validate_impl(const program_node& node) const override {
assert(node.is_type<lstm_seq>());
return node.get_input_layout(0).format == cldnn::format::bfyx;
return node.get_input_layout(0).format == cldnn::format::bfyx || node.get_input_layout(0).format == cldnn::format::fbyx;
}

in_out_fmts_t query_formats(const program_node& node) const override {
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/intel_gpu/src/graph/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1629,9 +1629,11 @@ void program::set_layout_optimizer_attributes(layout_optimizer& lo) {
lo.set_optimization_attribute(layout_optimizer::optimization_attributes_type::bs_fs_yx_bsv16_fsv16_network, 1);

#ifdef ENABLE_ONEDNN_FOR_GPU
bool enable_onednn_for_tests = get_config().get_property(ov::intel_gpu::optimize_data) || is_internal_program();
auto& engine = get_engine();
if (engine.get_device_info().vendor_id == INTEL_VENDOR_ID &&
get_config().get_property(ov::intel_gpu::queue_type) == QueueTypes::in_order)
get_config().get_property(ov::intel_gpu::queue_type) == QueueTypes::in_order &&
enable_onednn_for_tests)
lo.set_optimization_attribute(layout_optimizer::optimization_attributes_type::use_onednn_impls, 1);
#endif
}
Expand Down

0 comments on commit 14e53f4

Please sign in to comment.