Browse Source

binaryop bf16s

tags/20200413
nihuini 6 years ago
parent
commit
867ff7ae97
3 changed files with 1102 additions and 60 deletions
  1. +1095
    -60
      src/layer/arm/binaryop_arm.cpp
  2. +5
    -0
      src/layer/arm/binaryop_arm.h
  3. +2
    -0
      tests/test_binaryop.cpp

+ 1095
- 60
src/layer/arm/binaryop_arm.cpp
File diff suppressed because it is too large
View File


+ 5
- 0
src/layer/arm/binaryop_arm.h View File

@@ -27,6 +27,11 @@ public:
virtual int forward(const std::vector<Mat>& bottom_blobs, std::vector<Mat>& top_blobs, const Option& opt) const;

virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const;

protected:
int forward_bf16s(const std::vector<Mat>& bottom_blobs, std::vector<Mat>& top_blobs, const Option& opt) const;
int forward_inplace_bf16s(Mat& bottom_top_blob, const Option& opt) const;

};

} // namespace ncnn


+ 2
- 0
tests/test_binaryop.cpp View File

@@ -39,6 +39,7 @@ static int test_binaryop(const ncnn::Mat& _a, const ncnn::Mat& _b, int op_type)
ncnn::Option opt;
opt.num_threads = 1;
opt.use_vulkan_compute = true;
opt.use_int8_inference = false;
opt.use_fp16_packed = false;
opt.use_fp16_storage = false;
opt.use_fp16_arithmetic = false;
@@ -78,6 +79,7 @@ static int test_binaryop(const ncnn::Mat& _a, float b, int op_type)
ncnn::Option opt;
opt.num_threads = 1;
opt.use_vulkan_compute = true;
opt.use_int8_inference = false;
opt.use_fp16_packed = false;
opt.use_fp16_storage = false;
opt.use_fp16_arithmetic = false;


Loading…
Cancel
Save