File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,8 @@ get_property(fluid_modules GLOBAL PROPERTY FLUID_MODULES)
1717# paddle_fluid_origin exclude inference api interface
1818cc_library (paddle_fluid_origin DEPS ${fluid_modules} paddle_fluid_api )
1919
20- if (NOT APPLE )
21- add_subdirectory (api )
22- endif ()
20+ # fix macos compile error
21+ add_subdirectory (api )
2322
2423# Create static library
2524cc_library (paddle_fluid DEPS ${fluid_modules} paddle_fluid_api paddle_inference_api )
Original file line number Diff line number Diff line change @@ -172,8 +172,13 @@ std::unique_ptr<PaddlePredictor> NativePaddlePredictor::Clone() {
172172 LOG (ERROR) << " fail to call Init" ;
173173 return nullptr ;
174174 }
175+ #ifdef __clang__
176+ // fix macos compile error.
177+ return cls;
178+ #else
175179 // fix manylinux compile error.
176180 return std::move (cls);
181+ #endif
177182}
178183
179184bool NativePaddlePredictor::SetFeed (const std::vector<PaddleTensor> &inputs,
@@ -307,7 +312,13 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
307312 if (!dynamic_cast <NativePaddlePredictor *>(predictor.get ())->Init (nullptr )) {
308313 return nullptr ;
309314 }
315+ #ifdef __clang__
316+ // fix macos compile error
317+ return predictor;
318+ #else
319+ // fix manylinux compile error
310320 return std::move (predictor);
321+ #endif
311322}
312323
313324} // namespace paddle
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ struct PaddleTensor {
7070 std::vector<int > shape;
7171 PaddleBuf data; // blob of data.
7272 PaddleDType dtype;
73- std::vector<std::vector<uint64_t >> lod; // lod data
73+ std::vector<std::vector<size_t >> lod; // lod data
7474};
7575
7676enum class PaddleEngineKind {
You can’t perform that action at this time.
0 commit comments