[GPU] Fix a bug of graph optimization (#12901)

+ Use program_node to find weight node of convolution at eltwise shrinking
This commit is contained in:
Jade Cho 2022-09-07 10:43:30 +09:00 committed by GitHub
parent ace759c74c
commit d8b6f5485b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,8 +55,7 @@ void eltwise_shrinking::run(program& p) {
break; break;
} }
auto weights_node_ptr = p.get_node_ptr(conv->weights[0]); auto filter_size = user->as<convolution>().weights().get_output_layout().get_tensor();
auto filter_size = weights_node_ptr->get_output_layout().get_tensor();
// make sure this is conv 1x1 // make sure this is conv 1x1
if (filter_size.spatial[0] != 1 || filter_size.spatial[1] != 1 || conv->stride.size() != 2) { if (filter_size.spatial[0] != 1 || filter_size.spatial[1] != 1 || conv->stride.size() != 2) {
can_shrink = false; can_shrink = false;