sync repo source code with rel-1.15.0 and update yml files into two stages

This commit is contained in:
rachguo
2023-07-14 11:45:08 -07:00
parent a2f312d30e
commit 9f58d76d7c
29 changed files with 577 additions and 452 deletions
+18 -17
View File
@@ -11,30 +11,31 @@
#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
#define ORT_C_CXX_HEADER_FILE_PATH(x) STRINGIFY(onnxruntime/x)
#else
#define ORT_C_CXX_HEADER_FILE_PATH(x) STRINGIFY(x)
#endif
// clang-format on
#include "onnxruntime/onnxruntime_c_api.h"
#include "onnxruntime/onnxruntime_cxx_api.h"
#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
#if __has_include(ORT_C_CXX_HEADER_FILE_PATH(coreml_provider_factory.h))
#if __has_include("onnxruntime/coreml_provider_factory.h")
#define ORT_OBJC_API_COREML_EP_AVAILABLE 1
#include ORT_C_CXX_HEADER_FILE_PATH(coreml_provider_factory.h)
#include "onnxruntime/coreml_provider_factory.h"
#else
#define ORT_OBJC_API_COREML_EP_AVAILABLE 0
#endif
#else
#include "onnxruntime_c_api.h"
#include "onnxruntime_cxx_api.h"
#if __has_include("coreml_provider_factory.h")
#define ORT_OBJC_API_COREML_EP_AVAILABLE 1
#include "coreml_provider_factory.h"
#else
#define ORT_OBJC_API_COREML_EP_AVAILABLE 0
#endif
#endif
#if defined(__clang__)
#pragma clang diagnostic pop
#endif // defined(__clang__)