Skip to content

Commit

Permalink
Support for PReLU with both one dim and multiple dims slope for fixin…
Browse files Browse the repository at this point in the history
…g issue on gpufunctests (openvinotoolkit#74)

* [GPU] Support for PReLU with multiple dims slope tensor for GPU (openvinotoolkit#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 <[email protected]>

Co-authored-by: Eddy Kim <[email protected]>
  • Loading branch information
2 people authored and vladimir-paramuzov committed Jul 26, 2022
1 parent 4df90f8 commit a066477
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins/intel_gpu/src/plugin/ops/constant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ static void CreateConstantOp(Program& p, const std::shared_ptr<ngraph::op::v0::C
} else if (ngraph::is_type<ngraph::op::v0::PRelu>(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'.
Expand Down

0 comments on commit a066477

Please sign in to comment.