16 #ifndef TENSORFLOW_SERVING_CORE_LOAD_SERVABLES_FAST_H_
17 #define TENSORFLOW_SERVING_CORE_LOAD_SERVABLES_FAST_H_
22 #include "tensorflow/core/lib/core/status.h"
23 #include "tensorflow/core/platform/cpu_info.h"
24 #include "tensorflow_serving/core/aspired_versions_manager.h"
25 #include "tensorflow_serving/core/loader.h"
26 #include "tensorflow_serving/core/manager.h"
27 #include "tensorflow_serving/core/servable_state_monitor.h"
29 namespace tensorflow {
36 Status ConnectSourceWithFastInitialLoad(
37 AspiredVersionsManager* manager, Source<std::unique_ptr<Loader>>* source,
38 ServableStateMonitor* servable_state_monitor,
39 const std::vector<ServableRequest>& initial_servables,
40 uint32 num_threads = 4 * port::NumSchedulableCPUs());
43 Status ConnectSourcesWithFastInitialLoad(
44 AspiredVersionsManager* manager,
45 std::vector<Source<std::unique_ptr<Loader>>*> sources,
46 ServableStateMonitor* servable_state_monitor,
47 const std::vector<ServableRequest>& initial_servables,
48 uint32 num_threads = 4 * port::NumSchedulableCPUs());
56 Status ConnectSourcesWithFastInitialLoad(
57 AspiredVersionsManager* manager,
58 std::vector<Source<std::unique_ptr<Loader>>*> sources,
59 const std::function<Status()>& wait_until_loaded_fn, uint32 num_threads);
61 uint32 GetManagerNumLoadThreads(AspiredVersionsManager* manager);
62 std::function<void(
const uint32)> SetManagerNumLoadThreadsNotifier(
63 AspiredVersionsManager* manager);