xboot / libonnx

A lightweight, portable pure C99 onnx inference engine for embedded devices with hardware acceleration support.
MIT License
586 stars 108 forks source link

Which header files are necessary? #15

Closed abhinandanudupa closed 3 years ago

abhinandanudupa commented 3 years ago

Hello! I am working on a project where I have to deploy an inference engine in a very minimal environment where even the math library is not present. While compiling (onnxconf.h) for the platform I found out that the math.h header file was missing in the platform libraries. Here are some of the headers being used in that header file - onnxconf.h:

#include <stdio.h>
#include <stdlib.h>  
#include <stdint.h>  
#include <stddef.h>  
#include <string.h>  
#include <malloc.h>  
#include <float.h>  
#include <math.h>  
#include <list.h>  
#include <hmap.h>  

Also I have found that in this header file no math function has been used - I hope I am write on this! Correct me if I am wrong So I was wondering if I could just remove this inclusion of math.h and still have a functional inference engine?

Just to make things simple compiling a math library would not be desirable but is possible.

jianjunjiang commented 3 years ago

Some math function are necessary 。 for example,fabsf function,fabsf

abhinandanudupa commented 3 years ago

Oh I did not look in to that! Thank you.