arduino / arduino/ArduinoCore-mbed
Declaring abs define in Arduino.h breaks compatibility with TensorFlow Lite
- Dominant language
- C
- Stars
- 411
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
Why is `abs` defined in the Arduino.h for this core?
https://github.com/arduino/ArduinoCore-mbed/blob/682a054fb9769066571ab046b200b2a30b18c11a/cores/arduino/Arduino.h#L70
This conflicts with `std::abs` usage f.e. in TensorFlow Lite. I think this has happened before in other cores, as there's a provision in TF already for this:
https://github.com/tensorflow/tensorflow/blob/845adc40a653b311f4df2c273b22de7e175a93a1/tensorflow/lite/type_to_tflitetype.h#L18
But it still required us to patch this undef in at a later point as well when porting EI to Portenta.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in cores/arduino/Arduino.h around line 70 and inspect how abs is declared. Compare that declaration with the std::abs usage and the TensorFlow Lite compatibility references linked in the issue; done means the Arduino core no longer causes the reported TensorFlow Lite compatibility conflict.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, tensorflow
- Domain
- embedded-iot, machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100