Browse Source

feat(dnn/opencl): add heuristic rule for elemwise

GitOrigin-RevId: 2bc574b5a7
release-1.6
Megvii Engine Team 3 years ago
parent
commit
f3ed59d336
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      tools/gen_header_for_bin_reduce.py

+ 1
- 1
tools/gen_header_for_bin_reduce.py View File

@@ -185,7 +185,7 @@ class HeaderGen:
).stdout.decode('utf-8') ).stdout.decode('utf-8')
self._fout.write('// midout \n') self._fout.write('// midout \n')
self._fout.write(cvt) self._fout.write(cvt)
if cvt.find(" half,"):
if cvt.find(" half,") > 0:
change = open(self._fout.name).read().replace(" half,", " __fp16,") change = open(self._fout.name).read().replace(" half,", " __fp16,")
with open("fix_fp16_bin_reduce.h", "w") as fix_fp16: with open("fix_fp16_bin_reduce.h", "w") as fix_fp16:
fix_fp16.write(change) fix_fp16.write(change)


Loading…
Cancel
Save