Enable SPM support for Ext and configure pipelines for extensions target testing (#3)
* initial ext files * add a workable version of spm for extensions * update * update pipeline * update pipelines * fix dev/release pipelines for extensions pod * fix dev pipelines for extensions pod * fix release pipelines for extensions pod * fix dev pipelines for extensions pod * adding empty include folder for configuring extensions target path * test * test * test * revert pipeline changes * revert gitignore changes * add ext pod binary target for release pipeline * add pipeline for extensions * update * update package.swift * update latest from branch * update * fix * fix * update * try dummy empty file * test * update package.swift to use fatalerror * syntax * try gitignore revert * update gitignore * add -list * onnxruntime-Package * update using onnxruntime-Package * update dev pipeline * fix dev pipelines * syntax * pull extensions/ * update pipelines again * syntax * variables * fix * fix -r * update Package.swift * update Package.swift * minor update * address pr comments * minor updates * fix * refine messages * syntax * syntax again * address pr comments partial * address pr comments * add .h header file and notes * minor updates * syncing objc source files and add code to register custom ops using function pointer * format * move to the header for function doc --------- Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net> Co-authored-by: rachguo <rachguo@rachguos-Mac-mini.local>
This commit is contained in:
+15
-16
@@ -11,29 +11,28 @@
|
||||
#endif // defined(__clang__)
|
||||
|
||||
// paths are different when building the Swift Package Manager package as the headers come from the iOS pod archive
|
||||
// clang-format off
|
||||
#define STRINGIFY(x) #x
|
||||
#ifdef SPM_BUILD
|
||||
#include "onnxruntime/onnxruntime_c_api.h"
|
||||
#include "onnxruntime/onnxruntime_cxx_api.h"
|
||||
|
||||
#if __has_include("onnxruntime/coreml_provider_factory.h")
|
||||
#define ORT_OBJC_API_COREML_EP_AVAILABLE 1
|
||||
#include "onnxruntime/coreml_provider_factory.h"
|
||||
#define ORT_C_CXX_HEADER_FILE_PATH(x) STRINGIFY(onnxruntime/x)
|
||||
#else
|
||||
#define ORT_OBJC_API_COREML_EP_AVAILABLE 0
|
||||
#define ORT_C_CXX_HEADER_FILE_PATH(x) STRINGIFY(x)
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
#if __has_include(ORT_C_CXX_HEADER_FILE_PATH(onnxruntime_training_c_api.h))
|
||||
#include ORT_C_CXX_HEADER_FILE_PATH(onnxruntime_training_c_api.h)
|
||||
#include ORT_C_CXX_HEADER_FILE_PATH(onnxruntime_training_cxx_api.h)
|
||||
#else
|
||||
#include ORT_C_CXX_HEADER_FILE_PATH(onnxruntime_c_api.h)
|
||||
#include ORT_C_CXX_HEADER_FILE_PATH(onnxruntime_cxx_api.h)
|
||||
#endif
|
||||
|
||||
#else
|
||||
#include "onnxruntime_c_api.h"
|
||||
#include "onnxruntime_cxx_api.h"
|
||||
|
||||
#if __has_include("coreml_provider_factory.h")
|
||||
#if __has_include(ORT_C_CXX_HEADER_FILE_PATH(coreml_provider_factory.h))
|
||||
#define ORT_OBJC_API_COREML_EP_AVAILABLE 1
|
||||
#include "coreml_provider_factory.h"
|
||||
#include ORT_C_CXX_HEADER_FILE_PATH(coreml_provider_factory.h)
|
||||
#else
|
||||
#define ORT_OBJC_API_COREML_EP_AVAILABLE 0
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
|
||||
Reference in New Issue
Block a user