| @@ -1018,10 +1018,6 @@ int Convolution_vulkan::upload_model(VkTransfer& cmd, const Option& opt) | |||
| cmd.record_upload(bias_data_packed, bias_data_gpu, opt); | |||
| } | |||
| } | |||
| else if (opt.use_image_storage) | |||
| { | |||
| cmd.record_upload(Mat(1), bias_data_gpu_image, opt); | |||
| } | |||
| if (innerproduct) | |||
| { | |||
| @@ -1229,7 +1225,7 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom | |||
| std::vector<VkMat> bindings(3); | |||
| bindings[0] = top_tm_blob; | |||
| bindings[1] = top_blob_bordered; | |||
| bindings[2] = bias_term ? bias_data_gpu : bindings[1]; | |||
| bindings[2] = bias_data_gpu; | |||
| std::vector<vk_constant_type> constants(7); | |||
| constants[0].i = top_tm_blob.c; | |||
| @@ -1370,7 +1366,7 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom | |||
| std::vector<VkMat> bindings(3); | |||
| bindings[0] = top_tm_blob; | |||
| bindings[1] = top_blob_bordered; | |||
| bindings[2] = bias_term ? bias_data_gpu : bindings[1]; | |||
| bindings[2] = bias_data_gpu; | |||
| std::vector<vk_constant_type> constants(7); | |||
| constants[0].i = top_tm_blob.c; | |||
| @@ -1421,7 +1417,7 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom | |||
| bindings[0] = bottom_blob_bordered; | |||
| bindings[1] = top_blob; | |||
| bindings[2] = weight_data_gpu; | |||
| bindings[3] = bias_term ? bias_data_gpu : bindings[2];// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob_bordered.dims; | |||
| @@ -1707,7 +1703,7 @@ int Convolution_vulkan::forward(const VkImageMat& bottom_blob, VkImageMat& top_b | |||
| std::vector<VkImageMat> bindings(3); | |||
| bindings[0] = top_tm_blob; | |||
| bindings[1] = top_blob_bordered; | |||
| bindings[2] = bias_data_gpu_image;// TODO use dummy buffer | |||
| bindings[2] = bias_data_gpu_image; | |||
| std::vector<vk_constant_type> constants(7); | |||
| constants[0].i = top_tm_blob.c; | |||
| @@ -1848,7 +1844,7 @@ int Convolution_vulkan::forward(const VkImageMat& bottom_blob, VkImageMat& top_b | |||
| std::vector<VkImageMat> bindings(3); | |||
| bindings[0] = top_tm_blob; | |||
| bindings[1] = top_blob_bordered; | |||
| bindings[2] = bias_data_gpu_image;// TODO use dummy buffer | |||
| bindings[2] = bias_data_gpu_image; | |||
| std::vector<vk_constant_type> constants(7); | |||
| constants[0].i = top_tm_blob.c; | |||
| @@ -1899,7 +1895,7 @@ int Convolution_vulkan::forward(const VkImageMat& bottom_blob, VkImageMat& top_b | |||
| bindings[0] = bottom_blob_bordered; | |||
| bindings[1] = top_blob; | |||
| bindings[2] = weight_data_gpu_image; | |||
| bindings[3] = bias_data_gpu_image;// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu_image; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob_bordered.dims; | |||
| @@ -430,10 +430,6 @@ int ConvolutionDepthWise_vulkan::upload_model(VkTransfer& cmd, const Option& opt | |||
| cmd.record_upload(bias_data_packed, bias_data_gpu, opt); | |||
| } | |||
| } | |||
| else if (opt.use_image_storage) | |||
| { | |||
| cmd.record_upload(Mat(1), bias_data_gpu_image, opt); | |||
| } | |||
| return 0; | |||
| } | |||
| @@ -513,10 +509,6 @@ int ConvolutionDepthWise_vulkan::upload_model(VkTransfer& cmd, const Option& opt | |||
| cmd.record_upload(bias_data_packed, bias_data_gpu, opt); | |||
| } | |||
| } | |||
| else if (opt.use_image_storage) | |||
| { | |||
| cmd.record_upload(Mat(1), bias_data_gpu_image, opt); | |||
| } | |||
| return 0; | |||
| } | |||
| @@ -619,7 +611,7 @@ int ConvolutionDepthWise_vulkan::forward(const VkMat& bottom_blob, VkMat& top_bl | |||
| bindings[0] = bottom_blob_bordered; | |||
| bindings[1] = top_blob; | |||
| bindings[2] = weight_data_gpu; | |||
| bindings[3] = bias_term ? bias_data_gpu : bindings[2];// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob_bordered.dims; | |||
| @@ -678,7 +670,7 @@ int ConvolutionDepthWise_vulkan::forward(const VkMat& bottom_blob, VkMat& top_bl | |||
| bindings[0] = bottom_blob_bordered_unpacked; | |||
| bindings[1] = top_blob_unpacked; | |||
| bindings[2] = weight_data_gpu; | |||
| bindings[3] = bias_term ? bias_data_gpu : bindings[2];// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob_bordered_unpacked.dims; | |||
| @@ -843,7 +835,7 @@ int ConvolutionDepthWise_vulkan::forward(const VkImageMat& bottom_blob, VkImageM | |||
| bindings[0] = bottom_blob_bordered; | |||
| bindings[1] = top_blob; | |||
| bindings[2] = weight_data_gpu_image; | |||
| bindings[3] = bias_data_gpu_image;// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu_image; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob_bordered.dims; | |||
| @@ -902,7 +894,7 @@ int ConvolutionDepthWise_vulkan::forward(const VkImageMat& bottom_blob, VkImageM | |||
| bindings[0] = bottom_blob_bordered_unpacked; | |||
| bindings[1] = top_blob_unpacked; | |||
| bindings[2] = weight_data_gpu_image; | |||
| bindings[3] = bias_data_gpu_image;// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu_image; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob_bordered_unpacked.dims; | |||
| @@ -430,10 +430,6 @@ int Deconvolution_vulkan::upload_model(VkTransfer& cmd, const Option& opt) | |||
| cmd.record_upload(bias_data_packed, bias_data_gpu, opt); | |||
| } | |||
| } | |||
| else if (opt.use_image_storage) | |||
| { | |||
| cmd.record_upload(Mat(1), bias_data_gpu_image, opt); | |||
| } | |||
| return 0; | |||
| } | |||
| @@ -476,7 +472,7 @@ int Deconvolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkC | |||
| bindings[0] = bottom_blob; | |||
| bindings[1] = top_blob_bordered; | |||
| bindings[2] = weight_data_gpu; | |||
| bindings[3] = bias_term ? bias_data_gpu : bindings[2];// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob.dims; | |||
| @@ -669,7 +665,7 @@ int Deconvolution_vulkan::forward(const VkImageMat& bottom_blob, VkImageMat& top | |||
| bindings[0] = bottom_blob; | |||
| bindings[1] = top_blob_bordered; | |||
| bindings[2] = weight_data_gpu_image; | |||
| bindings[3] = bias_data_gpu_image;// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu_image; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob.dims; | |||
| @@ -505,10 +505,6 @@ int DeconvolutionDepthWise_vulkan::upload_model(VkTransfer& cmd, const Option& o | |||
| cmd.record_upload(bias_data_packed, bias_data_gpu, opt); | |||
| } | |||
| } | |||
| else if (opt.use_image_storage) | |||
| { | |||
| cmd.record_upload(Mat(1), bias_data_gpu_image, opt); | |||
| } | |||
| return 0; | |||
| } | |||
| @@ -588,10 +584,6 @@ int DeconvolutionDepthWise_vulkan::upload_model(VkTransfer& cmd, const Option& o | |||
| cmd.record_upload(bias_data_packed, bias_data_gpu, opt); | |||
| } | |||
| } | |||
| else if (opt.use_image_storage) | |||
| { | |||
| cmd.record_upload(Mat(1), bias_data_gpu_image, opt); | |||
| } | |||
| return 0; | |||
| } | |||
| @@ -638,7 +630,7 @@ int DeconvolutionDepthWise_vulkan::forward(const VkMat& bottom_blob, VkMat& top_ | |||
| bindings[0] = bottom_blob; | |||
| bindings[1] = top_blob_bordered; | |||
| bindings[2] = weight_data_gpu; | |||
| bindings[3] = bias_term ? bias_data_gpu : bindings[2];// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob.dims; | |||
| @@ -796,7 +788,7 @@ int DeconvolutionDepthWise_vulkan::forward(const VkMat& bottom_blob, VkMat& top_ | |||
| bindings[0] = bottom_blob_unpacked; | |||
| bindings[1] = top_blob_unpacked; | |||
| bindings[2] = weight_data_gpu; | |||
| bindings[3] = bias_term ? bias_data_gpu : bindings[2];// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob_unpacked.dims; | |||
| @@ -1003,7 +995,7 @@ int DeconvolutionDepthWise_vulkan::forward(const VkImageMat& bottom_blob, VkImag | |||
| bindings[0] = bottom_blob; | |||
| bindings[1] = top_blob_bordered; | |||
| bindings[2] = weight_data_gpu_image; | |||
| bindings[3] = bias_data_gpu_image;// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu_image; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob.dims; | |||
| @@ -1161,7 +1153,7 @@ int DeconvolutionDepthWise_vulkan::forward(const VkImageMat& bottom_blob, VkImag | |||
| bindings[0] = bottom_blob_unpacked; | |||
| bindings[1] = top_blob_unpacked; | |||
| bindings[2] = weight_data_gpu_image; | |||
| bindings[3] = bias_data_gpu_image;// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu_image; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob_unpacked.dims; | |||
| @@ -303,10 +303,6 @@ int InnerProduct_vulkan::upload_model(VkTransfer& cmd, const Option& opt) | |||
| cmd.record_upload(bias_data_packed, bias_data_gpu, opt); | |||
| } | |||
| } | |||
| else if (opt.use_image_storage) | |||
| { | |||
| cmd.record_upload(Mat(1), bias_data_gpu_image, opt); | |||
| } | |||
| return 0; | |||
| } | |||
| @@ -343,7 +339,7 @@ int InnerProduct_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCo | |||
| bindings[0] = bottom_blob_flattened; | |||
| bindings[1] = top_blob; | |||
| bindings[2] = weight_data_gpu; | |||
| bindings[3] = bias_term ? bias_data_gpu : bindings[2];// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob_flattened.dims; | |||
| @@ -432,7 +428,7 @@ int InnerProduct_vulkan::forward(const VkImageMat& bottom_blob, VkImageMat& top_ | |||
| bindings[0] = bottom_blob_flattened; | |||
| bindings[1] = top_blob; | |||
| bindings[2] = weight_data_gpu_image; | |||
| bindings[3] = bias_data_gpu_image;// TODO use dummy buffer | |||
| bindings[3] = bias_data_gpu_image; | |||
| std::vector<vk_constant_type> constants(10); | |||
| constants[0].i = bottom_blob_flattened.dims; | |||
| @@ -155,14 +155,7 @@ int Padding_vulkan::destroy_pipeline(const Option& /*opt*/) | |||
| int Padding_vulkan::upload_model(VkTransfer& cmd, const Option& opt) | |||
| { | |||
| if (per_channel_pad_data_size == 0) | |||
| { | |||
| if (opt.use_image_storage) | |||
| { | |||
| cmd.record_upload(Mat(1), per_channel_pad_data_gpu_image, opt); | |||
| } | |||
| return 0; | |||
| } | |||
| int elempack = opt.use_shader_pack8 && per_channel_pad_data_size % 8 == 0 ? 8 : per_channel_pad_data_size % 4 == 0 ? 4 : 1; | |||
| @@ -207,7 +200,7 @@ int Padding_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCompute | |||
| std::vector<VkMat> bindings(3); | |||
| bindings[0] = bottom_blob; | |||
| bindings[1] = top_blob; | |||
| bindings[2] = per_channel_pad_data_size ? per_channel_pad_data_gpu : top_blob;// TODO use dummy buffer | |||
| bindings[2] = per_channel_pad_data_gpu; | |||
| std::vector<vk_constant_type> constants(12); | |||
| constants[0].i = bottom_blob.dims; | |||
| @@ -276,7 +269,7 @@ int Padding_vulkan::forward(const std::vector<VkMat>& bottom_blobs, std::vector< | |||
| std::vector<VkMat> bindings(3); | |||
| bindings[0] = bottom_blob; | |||
| bindings[1] = top_blob; | |||
| bindings[2] = per_channel_pad_data_size ? per_channel_pad_data_gpu : top_blob;// TODO use dummy buffer | |||
| bindings[2] = per_channel_pad_data_gpu; | |||
| std::vector<vk_constant_type> constants(12); | |||
| constants[0].i = bottom_blob.dims; | |||
| @@ -327,7 +320,7 @@ int Padding_vulkan::forward(const VkImageMat& bottom_blob, VkImageMat& top_blob, | |||
| std::vector<VkImageMat> bindings(3); | |||
| bindings[0] = bottom_blob; | |||
| bindings[1] = top_blob; | |||
| bindings[2] = per_channel_pad_data_gpu_image;// TODO use dummy buffer | |||
| bindings[2] = per_channel_pad_data_gpu_image; | |||
| std::vector<vk_constant_type> constants(12); | |||
| constants[0].i = bottom_blob.dims; | |||
| @@ -396,7 +389,7 @@ int Padding_vulkan::forward(const std::vector<VkImageMat>& bottom_blobs, std::ve | |||
| std::vector<VkImageMat> bindings(3); | |||
| bindings[0] = bottom_blob; | |||
| bindings[1] = top_blob; | |||
| bindings[2] = per_channel_pad_data_gpu_image;// TODO use dummy buffer | |||
| bindings[2] = per_channel_pad_data_gpu_image; | |||
| std::vector<vk_constant_type> constants(12); | |||
| constants[0].i = bottom_blob.dims; | |||