Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GPU] Disabling the removal of reorder before weights reorder
Browse files Browse the repository at this point in the history
Lyamin-Roman committed Sep 21, 2023

Verified

This commit was signed with the committer’s verified signature.
pgherveou PG Herveou
1 parent 50c8cd6 commit d7be4a6
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -146,7 +146,8 @@ void remove_redundant_reorders::run(program& p) {
bool remove_dep = r_dep_node.is_simple_reorder() &&
r_dep_node.get_users().size() == 1 &&
!r_dep_node.is_output() &&
!r_dep_node.get_primitive()->has_surface_input();
!r_dep_node.get_primitive()->has_surface_input() &&
!r_node.get_primitive()->weights_reorder_params;

// for chains like
// fp32 -> reorder -> u8 -> reorder -> fp32
@@ -262,9 +263,7 @@ void remove_redundant_reorders::run(program& p) {

if (!r_node.is_simple_reorder() ||
no_output_optimization ||
r_node.get_primitive()->has_surface_input() ||
(r_node.get_primitive()->weights_reorder_params &&
r_node.get_primitive()->weights_reorder_params->should_be_transposed()))
r_node.get_primitive()->has_surface_input())
continue;

auto o_layout = r_node.get_output_layout();
3 changes: 2 additions & 1 deletion src/plugins/intel_gpu/src/graph/include/reorder_inst.h
Original file line number Diff line number Diff line change
@@ -58,7 +58,8 @@ struct typed_program_node<reorder> : public typed_program_node_base<reorder> {
bool is_simple_reorder() const {
return !has_fused_primitives() &&
!has_mean() &&
get_primitive()->subtract_per_feature.empty();
get_primitive()->subtract_per_feature.empty() &&
!get_primitive()->weights_reorder_params;
}

std::shared_ptr<NodeFuseParams> get_fuse_params() const override {

0 comments on commit d7be4a6

Please sign in to comment.