Fix path_lib.h for Mac and refine #include in InferenceSesssion.h (#711)

* Fix path_lib.h for macox py build

* don't have to include path_lib.h for model path in InferenceSession
This commit is contained in:
Tao Qin 2019-03-26 13:15:59 -07:00 committed by Changming Sun
parent bcf1ce94be
commit a28b42a42c
2 changed files with 2 additions and 3 deletions

View file

@ -236,7 +236,7 @@ void LoopDir(const std::string& dir_name, T func) {
auto e = errno;
char buf[1024];
char* msg;
#ifdef _GNU_SOURCE
#if defined(_GNU_SOURCE) && !defined(__APPLE__)
msg = strerror_r(e, buf, sizeof(buf));
#else
// for Mac OS X

View file

@ -14,7 +14,6 @@
#include "core/framework/framework_common.h"
#include "core/framework/iexecutor.h"
#include "core/framework/kernel_registry_manager.h"
#include "core/framework/path_lib.h"
#include "core/framework/session_state.h"
#include "core/graph/basic_types.h"
#include "core/optimizer/graph_transformer_level.h"
@ -313,7 +312,7 @@ class InferenceSession {
std::unordered_set<std::string> model_output_names_;
// The file path of where the model was loaded. e.g. /tmp/test_squeezenet/model.onnx
std::basic_string<PATH_CHAR_TYPE> model_location_;
std::basic_string<ORTCHAR_T> model_location_;
private:
ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(InferenceSession);