Skip to content

Commit

Permalink
[ONNX] add onnx schema & meson setting
Browse files Browse the repository at this point in the history
add onnx schema (proto2 & proto3) and add "enable-onnx-interpreter"
meson setting.

ONNX schema is licensed under the Apache License 2.0

Signed-off-by: Seungbaek Hong <sb92.hong@samsung.com>
  • Loading branch information
baek2sm committed Jan 21, 2025
1 parent 168ae42 commit ccd3f4c
Show file tree
Hide file tree
Showing 6 changed files with 42,226 additions and 0 deletions.
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ option('enable-profile', type: 'boolean', value: false)
option('enable-trace', type: 'boolean', value: false)
option('enable-debug', type: 'boolean', value: false)
option('enable-tflite-interpreter', type: 'boolean', value: true)
option('enable-onnx-interpreter', type: 'boolean', value: false)
option('enable-memory-swap', type: 'boolean', value: false)
option('memory-swap-path', type: 'string', value: '')
option('test-timeout', type: 'integer', value: 60)
Expand Down
10 changes: 10 additions & 0 deletions nntrainer/compiler/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ compiler_headers = [
'compiler_fwd.h'
]

if get_option('enable-onnx-interpreter')
protobuf_dep = dependency('protobuf', required: true)
nntrainer_base_deps += protobuf_dep

compiler_sources += [
'onnx.pb2.cc',
'onnx.pb3.cc'
]
endif

if get_option('enable-tflite-interpreter')
if not tflite_dep.found()
error('Tensorflow2-Lite dependency not found')
Expand Down
Loading

0 comments on commit ccd3f4c

Please sign in to comment.