Browse Source

fix fp16s fp16a deconvolution shader

tags/20190611
nihui 7 years ago
parent
commit
9643916281
2 changed files with 8 additions and 8 deletions
  1. +4
    -4
      src/layer/shader/deconvolution_pack4.comp
  2. +4
    -4
      src/layer/shader/deconvolutiondepthwise_group_pack4.comp

+ 4
- 4
src/layer/shader/deconvolution_pack4.comp View File

@@ -113,10 +113,10 @@ void main()
#if NCNN_fp16_storage && !NCNN_fp16_arithmetic
// GL_EXT_shader_16bit_storage does not define f16mat4 type :(
afpmat4 k = afpmat4(
afpvec4(weight_data[(w_offset + x) * 4 + 0]),
afpvec4(weight_data[(w_offset + x) * 4 + 1]),
afpvec4(weight_data[(w_offset + x) * 4 + 2]),
afpvec4(weight_data[(w_offset + x) * 4 + 3])
afpvec4(weight_data[w_offset * 4 + 0]),
afpvec4(weight_data[w_offset * 4 + 1]),
afpvec4(weight_data[w_offset * 4 + 2]),
afpvec4(weight_data[w_offset * 4 + 3])
);
#else
afpmat4 k = afpmat4(weight_data[w_offset]);


+ 4
- 4
src/layer/shader/deconvolutiondepthwise_group_pack4.comp View File

@@ -122,10 +122,10 @@ void main()
#if NCNN_fp16_storage && !NCNN_fp16_arithmetic
// GL_EXT_shader_16bit_storage does not define f16mat4 type :(
afpmat4 k = afpmat4(
afpvec4(weight_data[(w_offset + x) * 4 + 0]),
afpvec4(weight_data[(w_offset + x) * 4 + 1]),
afpvec4(weight_data[(w_offset + x) * 4 + 2]),
afpvec4(weight_data[(w_offset + x) * 4 + 3])
afpvec4(weight_data[w_offset * 4 + 0]),
afpvec4(weight_data[w_offset * 4 + 1]),
afpvec4(weight_data[w_offset * 4 + 2]),
afpvec4(weight_data[w_offset * 4 + 3])
);
#else
afpmat4 k = afpmat4(weight_data[w_offset]);


Loading…
Cancel
Save