Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • pystencils pystencils
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pycodegen
  • pystencilspystencils
  • Merge requests
  • !262

fixed create_kernel parameter data_type="float" to procucde single precision

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Christoph Alt requested to merge ob28imeq/pystencils:fix_single_precision into master Aug 31, 2021
  • Overview 1
  • Commits 10
  • Pipelines 2
  • Changes 2

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.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix_single_precision