neo-ai / neo-ai-dlr

Neo-AI-DLR is a common runtime for machine learning models compiled by AWS SageMaker Neo, TVM, or TreeLite.
Apache License 2.0
492 stars 106 forks source link

Add TF2-C-API adapter #418

Closed ghost closed 2 years ago

ghost commented 2 years ago

TF C API adapter allows DLR to run tensorflow2.x saved model directly using Native Tensorflow C API (libtensorflow.so). The original branch tf-c-adapter A few updates:

  1. use tf2.x saved model
  2. bring dlr api up-to-date
    
    Running tests...
    Test project /neo-ai-dlr/build
      Start  1: dlr_allocator_test
    1/14 Test  #1: dlr_allocator_test ...............   Passed    0.79 sec
      Start  2: dlr_common_test
    2/14 Test  #2: dlr_common_test ..................   Passed    0.07 sec
      Start  3: dlr_elem_test
    3/14 Test  #3: dlr_elem_test ....................   Passed    5.13 sec
      Start  4: dlr_pipeline_test
    4/14 Test  #4: dlr_pipeline_test ................   Passed    0.07 sec
      Start  5: dlr_relayvm_elem_test
    5/14 Test  #5: dlr_relayvm_elem_test ............   Passed    2.57 sec
      Start  6: dlr_relayvm_test
    6/14 Test  #6: dlr_relayvm_test .................   Passed    1.80 sec
      Start  7: dlr_test
    7/14 Test  #7: dlr_test .........................   Passed    5.44 sec
      Start  8: dlr_treelite_test
    8/14 Test  #8: dlr_treelite_test ................   Passed    4.74 sec
      Start  9: dlr_tvm_elem_test
    9/14 Test  #9: dlr_tvm_elem_test ................   Passed    2.61 sec
      Start 10: dlr_tvm_test
    10/14 Test #10: dlr_tvm_test .....................   Passed    2.92 sec
      Start 11: dlr_tensorflow2_internal_test
    11/14 Test #11: dlr_tensorflow2_internal_test ....   Passed    0.07 sec
      Start 12: dlr_tensorflow2_test
    12/14 Test #12: dlr_tensorflow2_test .............   Passed  247.81 sec
      Start 13: dlr_dlsym_test
    13/14 Test #13: dlr_dlsym_test ...................   Passed    4.63 sec
      Start 14: dlr_multiple_lib_test
    14/14 Test #14: dlr_multiple_lib_test ............   Passed    1.07 sec

100% tests passed, 0 tests failed out of 14

Total Test time (real) = 279.72 sec