[GPU] fix getConstTensor() for 1d from [1,N,1,1] to [N,1,1,1] (#15569)

* fix getConstTensor() for 1d from [1,N,1,1} to [N,1,1,1]

* add eltwise comparison op in 1d constant check of eltwise arithmetic/logical
This commit is contained in:
Wilson Seok 2023-02-15 06:02:22 +09:00 committed by GitHub
parent dbed073f80
commit 60de5a3454
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,6 +98,7 @@ static void CreateConstantOp(Program& p, const std::shared_ptr<ngraph::op::v0::C
}
} else if (ngraph::op::is_binary_elementwise_arithmetic(outOp) ||
ngraph::op::is_binary_elementwise_logical(outOp) ||
ngraph::op::is_binary_elementwise_comparison(outOp) ||
ngraph::is_type<ngraph::op::v0::SquaredDifference>(outOp)) {
bool all_inputs_1d = true;
for (size_t j = 0; j < outOp->get_input_size(); j++) {