From 8d852b4aee8e86f53b842886bef9c38379fb7791 Mon Sep 17 00:00:00 2001 From: Eddy Kim Date: Fri, 8 Jul 2022 15:36:17 +0900 Subject: [PATCH] fixed 'is_rotating_except_batch' to follow the IE order (#12050) --- src/plugins/intel_gpu/src/graph/include/permute_inst.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/intel_gpu/src/graph/include/permute_inst.h b/src/plugins/intel_gpu/src/graph/include/permute_inst.h index 65db4644c5f..d5d11132c22 100644 --- a/src/plugins/intel_gpu/src/graph/include/permute_inst.h +++ b/src/plugins/intel_gpu/src/graph/include/permute_inst.h @@ -26,13 +26,13 @@ public: std::vector get_permute_order() const { return get_primitive()->permute_order; } bool is_rotating_except_batch() const { // Target transform: Rotate feature dim to back to be taken as inner-most axis - // ex) 0(b), 4(f), 1(z), 2(y), 3(x) - // ex) 0(b), 3(f), 1(y), 2(x) + // ex) 0(b), 2(f), 3(x), 4(y), 1(z) + // ex) 0(b), 2(f), 3(x), 1(y) auto& order = get_primitive()->permute_order; - if ((int32_t) order[1] != order.size() - 1) return false; + if ((int32_t) order[order.size() - 2] != order.size() - 1) return false; if ((int32_t) order[0] != 0) return false; for (int32_t i = 2; i < (int32_t) order.size(); ++i) { - if ((int32_t)order[i] != (i - 1)) return false; + if ((int32_t)order[i - 1] != i) return false; } return true; }