From baf141a0849c1941ad57a62fb022a2a2115b612c Mon Sep 17 00:00:00 2001 From: Cheng Date: Fri, 26 Aug 2022 10:29:23 +0800 Subject: [PATCH] Enable xnnpack EP in Android AAR package (#12720) * take new features to export symbols * comments to explain why --- tools/ci_build/gen_def.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/ci_build/gen_def.py b/tools/ci_build/gen_def.py index f029fce3db..60fd5ee4ea 100755 --- a/tools/ci_build/gen_def.py +++ b/tools/ci_build/gen_def.py @@ -64,7 +64,10 @@ with open(args.output_source, "w") as file: # WinML adapter should not be exported in platforms other than Windows. # Exporting OrtGetWinMLAdapter is exported without issues using .def file when compiling for Windows # so it isn't necessary to include it in generated_source.c - if c not in ("winml", "cuda", "migraphx", "snpe"): + + # external symbols are removed, xnnpack ep will be created via the standard ORT API. + # https://github.com/microsoft/onnxruntime/pull/11798 + if c not in ("winml", "cuda", "migraphx", "snpe", "xnnpack"): file.write("#include \n" % (c, c)) file.write("void* GetFunctionEntryByName(const char* name){\n") for symbol in symbols: