From f3ed59d3368d2a6c8c5d8e766420b5ba5bdd04d7 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Wed, 25 Aug 2021 14:26:22 +0800 Subject: [PATCH] feat(dnn/opencl): add heuristic rule for elemwise GitOrigin-RevId: 2bc574b5a73883356cbb468d2f025a9f6ced0d06 --- tools/gen_header_for_bin_reduce.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gen_header_for_bin_reduce.py b/tools/gen_header_for_bin_reduce.py index 39fdf3005..337b83db5 100755 --- a/tools/gen_header_for_bin_reduce.py +++ b/tools/gen_header_for_bin_reduce.py @@ -185,7 +185,7 @@ class HeaderGen: ).stdout.decode('utf-8') self._fout.write('// midout \n') self._fout.write(cvt) - if cvt.find(" half,"): + if cvt.find(" half,") > 0: change = open(self._fout.name).read().replace(" half,", " __fp16,") with open("fix_fp16_bin_reduce.h", "w") as fix_fp16: fix_fp16.write(change) -- GitLab