fixed create_kernel parameter data_type="float" to procucde single precision
Currently if create_kernel(assignments, data_type="float") is used then the untyped symbols are typed with float64, since the np.dtype("float") creates this during the construction of a new TypedSymbol.
Since data_type or as it is called in cpu.create_kernel type_info can be an string of an C type, At least following the documentation of cpu.create_kernel this behavior is a bit confusing, since typical the C type specifier "float" is meant to be single precision.
So I added a small function that just replaces "float" with "single" in the symbol_to_type dict, so the untyped symbols get the single precision type.
Merge request reports
Activity
assigned to @hoenig
requested review from @holzer
This merge request needs to wait for !261 (merged)
Edited by Jan Hönigadded Bug label
added 10 commits
-
9f4976a9...52775e94 - 4 commits from branch
pycodegen:master
- 49eaabcd - fixed create_kernel parameter data_type="float" to procucde single precision
- bf887d93 - ajust types now works with normal dicts
- c7e8e21c - added double precision test
- dcdf9b66 - added some more tests
- ec2a1f2b - Merge branch 'fix_single_precision' of...
- a51cca46 - updated test to new create_kernel api
Toggle commit list-
9f4976a9...52775e94 - 4 commits from branch
enabled an automatic merge when the pipeline for a51cca46 succeeds
mentioned in commit 997100b0