File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/plugins/intel_gpu/src/graph/impls/onednn Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ struct ReorderImplementationManager : public ImplementationManager {
65
65
return false ;
66
66
67
67
// onednn doesn't support paddings
68
- if (!is_supported_pad (input_layout) || !is_supported_pad (output_layout))
68
+ if (!is_supported_pad_for_reorder (input_layout) || !is_supported_pad_for_reorder (output_layout))
69
69
return false ;
70
70
71
71
// Native impl works faster for this type of reorder
@@ -90,6 +90,20 @@ struct ReorderImplementationManager : public ImplementationManager {
90
90
91
91
return true ;
92
92
}
93
+
94
+ static bool is_supported_pad_for_reorder (const layout& layout) {
95
+ // check to support the batch/spatial pad for onednn.
96
+ if (!is_supported_pad (layout))
97
+ return false ;
98
+
99
+ // Check feature pad
100
+ const auto & pad = layout.data_padding ;
101
+ bool no_feature_padding = true ;
102
+ no_feature_padding &= (pad._lower_size [1 ] == 0 );
103
+ no_feature_padding &= (pad._upper_size [1 ] == 0 );
104
+
105
+ return no_feature_padding;
106
+ }
93
107
};
94
108
95
109
} // namespace onednn
You can’t perform that action at this time.
0 commit comments