Experiments with Small Devices : Floating Point Issues
Closed this issue · 7 comments
antoinecarme commented
See #25
ml2cp uses float64 in all computations by default. This is not always a limitation.
For each device, Check the availability of major floating point types (float64, float32, float16, bfloat16, ...)
- Allow using float32, float16 or bfloat16 when available.
- Allow using hardware FPU when available.
- Adapt the code, when needed, according to floating point capabilities.
antoinecarme commented
Chip | Arch | Bits | Cores | Speed | FPU |
---|---|---|---|---|---|
K210 | riscv (IMAFDC) | 64 | 2 | 400 | 2 |
ESP32D0WDQ6 | xtensa | 32 | 2 | 240 | 1 |
STM32F103C8T6 | ARM Cortex-M3 | 32 | 1 | 72 | 0 |
antoinecarme commented
- K210 has 2 64-bit cores and one FPU per core.
- ESP32 has 2 32-bit cores and one FPU common to all cores.
- STM32 has 1 32-bit core and no FPU
antoinecarme commented
Chip | INT32 | INT64 | Float-64 | Float-32 | Float-16 | BFloat16 |
---|---|---|---|---|---|---|
K210 | Y | Y | Y | Y | N | N |
ESP32D0WDQ6 | Y | N | N | Y | N | N |
STM32F103C8T6 | Y | N | N | Y | N | N |
antoinecarme commented
No controller has a support for 16bit and like floats.
antoinecarme commented
No special need to adapt the code.
antoinecarme commented
bfloat-16 is not yet supported in our compilers (g++, as of 2020)
antoinecarme commented
Closing