MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / Load

Method Load

paddle/fluid/framework/data_feed.h:761–787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759 }
760
761 paddle::framework::CustomParser* Load(const std::string& name,
762 const std::vector<SlotConf>& conf) {
763#ifdef _LINUX
764 std::lock_guard<std::mutex> lock(mutex_);
765 DLHandle handle;
766 std::map<std::string, DLHandle>::iterator it = handle_map_.find(name);
767 if (it != handle_map_.end()) {
768 return it->second.parser;
769 }
770
771 handle.module = dlopen(name.c_str(), RTLD_NOW);
772 if (handle.module == nullptr) {
773 VLOG(0) << "Create so of " << name << " fail, " << dlerror();
774 return nullptr;
775 }
776
777 CreateParserObjectFunc create_parser_func =
778 (CreateParserObjectFunc)dlsym(handle.module, "CreateParserObject");
779 handle.parser = create_parser_func();
780 handle.parser->Init(conf);
781 handle_map_.insert({name, handle});
782
783 return handle.parser;
784#endif
785 VLOG(0) << "Not implement in windows";
786 return nullptr;
787 }
788
789 paddle::framework::CustomParser* Load(const std::string& name,
790 const std::vector<AllSlotInfo>& conf) {

Callers 15

visit_ExtSliceMethod · 0.45
visit_CallMethod · 0.45
visit_SubscriptMethod · 0.45
wrap_as_closureFunction · 0.45
visit_BreakMethod · 0.45
generate_name_nodeFunction · 0.45
visit_ForMethod · 0.45
_build_iter_nodeMethod · 0.45
_build_compare_nodeMethod · 0.45
_build_cond_stmtMethod · 0.45
transformMethod · 0.45
visit_ReturnMethod · 0.45

Calls 7

dlopenFunction · 0.85
dlsymFunction · 0.85
c_strMethod · 0.80
findMethod · 0.45
endMethod · 0.45
InitMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected