Browse Source

optimize workgroup size for convolution depthwise and innerproduct pack4

tags/20190320
nihui 7 years ago
parent
commit
960ffa1a50
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/layer/convolutiondepthwise.cpp
  2. +1
    -1
      src/layer/innerproduct.cpp

+ 1
- 1
src/layer/convolutiondepthwise.cpp View File

@@ -659,7 +659,7 @@ int ConvolutionDepthWise::create_pipeline()
if (num_output % 4 == 0)
{
pipeline_convolutiondepthwise_pack4 = new Pipeline(vkdev);
pipeline_convolutiondepthwise_pack4->set_optimal_local_size_xyz(32, 32, std::max(1, num_output / 8));
pipeline_convolutiondepthwise_pack4->set_optimal_local_size_xyz(32, 32, std::max(1, num_output / 4));
pipeline_convolutiondepthwise_pack4->create("convolutiondepthwise_pack4", specializations, 4, 10);
}



+ 1
- 1
src/layer/innerproduct.cpp View File

@@ -411,7 +411,7 @@ int InnerProduct::create_pipeline()
if (num_input % 4 == 0 && num_output % 4 != 0)
{
pipeline_innerproduct_pack4to1 = new Pipeline(vkdev);
pipeline_innerproduct_pack4to1->set_optimal_local_size_xyz(num_output / 4, 1, 1);
pipeline_innerproduct_pack4to1->set_optimal_local_size_xyz(num_output, 1, 1);
pipeline_innerproduct_pack4to1->create("innerproduct_pack4to1", specializations, 4, 10);
}



Loading…
Cancel
Save