onnxruntime
c3db1d36 - Replace float_t with float (#16484)

Commit
2 years ago
Replace float_t with float (#16484) A couple of places in onnxruntime used `float_t` data type alias as an alternative to `float`. However, this is not entirely correct, since `float_t` is an implementation-defined type alias, which may be `float`, `double`, `long double` or some other implementation-defined data type, depending on the state of the internal `FLT_EVAL_METHOD` macro: https://en.cppreference.com/w/c/numeric/math/float_t On most major platforms and compilers (clang, GCC, MSVC) this is only a cosmetic change and will not lead to any changes. However, icpx compiler (and legacy icc) tends to substitute `float_t` with `long double`, resulting in a linker error (unresolved reference) to the base onnx library, that only contains the `ParseData` function for `float` and `double` as in [here](https://github.com/onnx/onnx/blob/9264e093676f40a48aee819b8013ef285e3d4fc5/onnx/defs/tensor_proto_util.cc#L133-L134). Overall, this PR cleans up the implementation-defined behaviour and enables building onnxruntime with icpx.
Author
Parents
Loading