Browse Source

fp16p and fp16s cannot be both enabled in shader source

tags/20200616
nihuini 6 years ago
parent
commit
554890cda8
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      src/gpu.cpp

+ 5
- 4
src/gpu.cpp View File

@@ -2722,14 +2722,15 @@ int compile_spirv_module(int shader_type_index, const Option& opt, std::vector<u

custom_defines.push_back(std::make_pair("psc(x)", "(x==0?p.x:x)"));

if (opt.use_fp16_packed)
{
custom_defines.push_back(std::make_pair("NCNN_fp16_packed", "1"));
}
if (opt.use_fp16_storage)
{
custom_defines.push_back(std::make_pair("NCNN_fp16_storage", "1"));
}
else if (opt.use_fp16_packed)
{
custom_defines.push_back(std::make_pair("NCNN_fp16_packed", "1"));
}

if (opt.use_fp16_arithmetic)
{
custom_defines.push_back(std::make_pair("NCNN_fp16_arithmetic", "1"));


Loading…
Cancel
Save