google / ml-compiler-opt

Infrastructure for Machine Learning Guided Optimization (MLGO) in LLVM.
Apache License 2.0
629 stars 93 forks source link

Unify scalar type associations #304

Closed mtrofin closed 1 year ago

mtrofin commented 1 year ago

We have 3 scalar type representations: tensorflow, ctypes, and string names. Not unlikely we may get a fourth, numpy. This patch factors out all the associations into a central place. Modules can build their own maps as needed from it (i.e. name->ctype or dtype->name, etc)