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)
17
17
# paddle_fluid_origin exclude inference api interface
18
18
cc_library (paddle_fluid_origin DEPS ${fluid_modules} paddle_fluid_api )
19
19
20
- if (NOT APPLE )
21
- add_subdirectory (api )
22
- endif ()
20
+ # fix macos compile error
21
+ add_subdirectory (api )
23
22
24
23
# Create static library
25
24
cc_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() {
172
172
LOG (ERROR) << " fail to call Init" ;
173
173
return nullptr ;
174
174
}
175
+ #ifdef __clang__
176
+ // fix macos compile error.
177
+ return cls;
178
+ #else
175
179
// fix manylinux compile error.
176
180
return std::move (cls);
181
+ #endif
177
182
}
178
183
179
184
bool NativePaddlePredictor::SetFeed (const std::vector<PaddleTensor> &inputs,
@@ -307,7 +312,13 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
307
312
if (!dynamic_cast <NativePaddlePredictor *>(predictor.get ())->Init (nullptr )) {
308
313
return nullptr ;
309
314
}
315
+ #ifdef __clang__
316
+ // fix macos compile error
317
+ return predictor;
318
+ #else
319
+ // fix manylinux compile error
310
320
return std::move (predictor);
321
+ #endif
311
322
}
312
323
313
324
} // namespace paddle
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ struct PaddleTensor {
70
70
std::vector<int > shape;
71
71
PaddleBuf data; // blob of data.
72
72
PaddleDType dtype;
73
- std::vector<std::vector<uint64_t >> lod; // lod data
73
+ std::vector<std::vector<size_t >> lod; // lod data
74
74
};
75
75
76
76
enum class PaddleEngineKind {
You can’t perform that action at this time.
0 commit comments