From a066477da85b283eb429642c5300dbb2b1d77587 Mon Sep 17 00:00:00 2001 From: Andrew Kwangwoong Park Date: Tue, 14 Jun 2022 14:53:58 +0900 Subject: [PATCH] Support for PReLU with both one dim and multiple dims slope for fixing issue on gpufunctests (#74) * [GPU] Support for PReLU with multiple dims slope tensor for GPU (#11782) * reshape a slope tensor of channel-wise prelu * changed to follow prelu spec * added unittests for prelu with multiple dims slope * Update constant.cpp Blanks are added. * added comments about PReLU slope reshape policy * added int8 prelu fusion tests * Update PReLU slope reshape policy for 1-dims Signed-off-by: Andrew Park Co-authored-by: Eddy Kim --- src/plugins/intel_gpu/src/plugin/ops/constant.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/intel_gpu/src/plugin/ops/constant.cpp b/src/plugins/intel_gpu/src/plugin/ops/constant.cpp index c9f49015219699..dabe183530de85 100644 --- a/src/plugins/intel_gpu/src/plugin/ops/constant.cpp +++ b/src/plugins/intel_gpu/src/plugin/ops/constant.cpp @@ -117,9 +117,9 @@ static void CreateConstantOp(Program& p, const std::shared_ptr(outOp) && node.get_index() == 1) { // PReLU slope tensor reshape policy // - // 1. 1-dim slope is handled by 'getConstTensor'. - // ex) [1] --> [1, 1, 1, 1] - // [N] --> [1, N, 1, 1] + // 1. 1-dim slope is handled by replacing the output shape of constant with the input shape of PReLU. + // ex) [1] --> [1, 1] + // [N] --> [1, N] // // 2. Multi-dims slope tensor is handled by the numpy broadcasting rule that is defined at // 'https://docs.openvino.ai/latest/openvino_docs_ops_broadcast_rules.html'.