#include <TBBSession.h>
Classes | |
struct | ExecutorsAndKeys |
struct | FunctionInfo |
struct | PerPartitionExecutorsAndLib |
struct | RunState |
struct | RunStateArgs |
Public Types | |
typedef std::function< void(Session *)> | CloseCallback |
typedef std::vector< std::pair< string, Tensor > > | NamedTensorList |
typedef std::unordered_map< StringPiece, Node *, StringPieceHasher > | NameNodeMap |
Public Member Functions | |
::tensorflow::Status | Close () override |
::tensorflow::Status | Create (const GraphDef &graph) override |
void | ExportCostModels (CostModelManager::CostModelMap *cost_models) |
::tensorflow::Status | Extend (const GraphDef &graph) override |
::tensorflow::Status | ListDevices (std::vector< DeviceAttributes > *response) override |
::tensorflow::Status | LocalDeviceManager (const DeviceMgr **output) override |
::tensorflow::Status | Reset (const std::vector< string > &containers) |
::tensorflow::Status | Run (const NamedTensorList &inputs, const std::vector< string > &output_names, const std::vector< string > &target_nodes, std::vector< Tensor > *outputs) override |
::tensorflow::Status | Run (const ::tensorflow::RunOptions &run_options, const NamedTensorList &inputs, const std::vector< string > &output_names, const std::vector< string > &target_nodes, std::vector< Tensor > *outputs, RunMetadata *run_metadata) override |
TBBSession (const SessionOptions &options, const DeviceMgr *device_mgr, TBBSessionFactory *factory) | |
~TBBSession () override | |
Private Member Functions | |
::tensorflow::Status | CheckNotClosed () |
::tensorflow::Status | CreateDebuggerState (const DebugOptions &debug_options, int64 session_run_index, int64 executor_step_index, const std::vector< string > &input_names, const std::vector< string > &output_names, const std::vector< string > &target_names, std::unique_ptr< DebuggerStateInterface > *debugger_state) |
::tensorflow::Status | CreateGraphs (const BuildGraphOptions &options, std::unordered_map< string, std::unique_ptr< Graph >> *outputs, std::unique_ptr< FunctionLibraryDefinition > *flib_def, RunStateArgs *run_state_args, DataTypeVector *input_types, DataTypeVector *output_types) |
::tensorflow::Status | DecorateAndPublishGraphForDebug (const DebugOptions &debug_options, Graph *graph, Device *device) |
::tensorflow::Status | ExtendLocked (const GraphDef &graph) EXCLUSIVE_LOCKS_REQUIRED(graph_def_lock_) |
::tensorflow::Status | GetOrCreateExecutors (gtl::ArraySlice< string > inputs, gtl::ArraySlice< string > outputs, gtl::ArraySlice< string > target_nodes, ExecutorsAndKeys **executors_and_keys, RunStateArgs *run_state_args) |
bool graph_created_ | GUARDED_BY (graph_def_lock_) |
GraphDef graph_def_ | GUARDED_BY (graph_def_lock_) |
std::vector< std::unique_ptr< FunctionInfo > > functions_ | GUARDED_BY (executor_lock_) |
std::unordered_map< string, std::shared_ptr< ExecutorsAndKeys > > executors_ | GUARDED_BY (executor_lock_) |
std::unordered_map< string, std::unique_ptr< RunState > > partial_runs_ | GUARDED_BY (executor_lock_) |
std::unordered_map< string, string > stateful_placements_ | GUARDED_BY (graph_def_lock_) |
std::unique_ptr< GraphExecutionState > execution_state_ | GUARDED_BY (graph_def_lock_) |
bool closed_ | GUARDED_BY (closed_lock_) |
Status | MaybeInitializeExecutionState (const GraphDef &graph, bool *out_already_initialized) EXCLUSIVE_LOCKS_REQUIRED(graph_def_lock_) |
::tensorflow::Status | ResourceHandleToInputTensor (const Tensor &resource_tensor, Tensor *retrieved_tensor) |
void | SchedClosure (tbb::task_arena &arena, tbb::task_group &g, std::function< void()> c) |
TF_DISALLOW_COPY_AND_ASSIGN (TBBSession) | |
::tensorflow::Status | WaitForNotification (Notification *n, int64 timeout_in_ms) |
void | WaitForNotification (tbb::task_arena &arena, tbb::task_group &group, RunState *run_state, CancellationManager *cm, int64 timeout_in_ms) |
Private Attributes | |
CancellationManager * | cancellation_manager_ |
mutex | closed_lock_ |
CostModelManager | cost_model_manager_ |
const std::unique_ptr< const DeviceMgr > | device_mgr_ |
DeviceSet | device_set_ |
std::vector< Device * > | devices_ |
std::atomic< int64 > | edge_name_counter_ = {0} |
mutex | executor_lock_ |
TBBSessionFactory *const | factory_ |
std::unique_ptr< FunctionLibraryDefinition > | flib_def_ |
mutex | graph_def_lock_ |
std::atomic< int64 > | handle_name_counter_ = {0} |
Status | init_error_ |
Executor::Args::NodeOutputsCallback | node_outputs_callback_ = nullptr |
const int64 | operation_timeout_in_ms_ = 0 |
const SessionOptions | options_ |
string | session_handle_ |
SessionState | session_state_ |
bool | sync_on_finish_ = true |
Static Private Attributes | |
static std::atomic_int_fast64_t | step_id_counter_ |
Friends | |
class | DebugGateway |
Definition at line 81 of file TBBSession.h.
typedef std::function<void(Session*)> tensorflow::TBBSession::CloseCallback |
Definition at line 83 of file TBBSession.h.
typedef std::vector<std::pair<string, Tensor> > tensorflow::TBBSession::NamedTensorList |
Definition at line 93 of file TBBSession.h.
typedef std::unordered_map<StringPiece, Node*, StringPieceHasher> tensorflow::TBBSession::NameNodeMap |
Definition at line 94 of file TBBSession.h.
tensorflow::TBBSession::TBBSession | ( | const SessionOptions & | options, |
const DeviceMgr * | device_mgr, | ||
TBBSessionFactory * | factory | ||
) |
Definition at line 197 of file TBBSession.cc.
References edmIntegrityCheck::d, device_mgr_, device_set_, devices_, dqm::qstatus::ERROR, MessageLogger_cfi::INFO, LOG, session_handle_, btagGenBb_cfi::Status, mps_update::status, and sync_on_finish_.
|
override |
Definition at line 240 of file TBBSession.cc.
References cancellation_manager_, Close(), edmIntegrityCheck::d, device_mgr_, flib_def_, and session_handle_.
|
inlineprivate |
Definition at line 251 of file TBBSession.h.
References pfDeepBoostedJetPreprocessParams_cfi::input_names, checklumidiff::l, and btagGenBb_cfi::Status.
Referenced by DecorateAndPublishGraphForDebug(), and Extend().
|
override |
Definition at line 1080 of file TBBSession.cc.
References cancellation_manager_, closed_lock_, tensorflow::TBBSessionFactory::Deregister(), factory_, and checklumidiff::l.
Referenced by ~TBBSession().
|
override |
Definition at line 292 of file TBBSession.cc.
References ExtendLocked(), graph_def_lock_, init_error_, and checklumidiff::l.
|
private |
Definition at line 335 of file TBBSession.cc.
References pfDeepBoostedJetPreprocessParams_cfi::input_names.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
Definition at line 908 of file TBBSession.cc.
References KineDebug3::count(), edmIntegrityCheck::d, device_mgr_, device_set_, devices_, edge_name_counter_, flib_def_, tensorflow::TBBSession::RunStateArgs::graph, graph_def_lock_, tensorflow::TBBSession::RunStateArgs::is_partial_run, checklumidiff::l, eostools::move(), dataset::name, options_, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, tablePrinter::prefix, alignCSCRings::s, btagGenBb_cfi::Status, and std::swap().
Referenced by GetOrCreateExecutors().
|
private |
Definition at line 349 of file TBBSession.cc.
References writedatasetfile::args, EnergyCorrector::c, cancellation_manager_, CheckNotClosed(), cost_model_manager_, CreateDebuggerState(), device_mgr_, devices_, executor_lock_, tensorflow::TBBSession::RunState::executors_done, tensorflow::TBBSession::PerPartitionExecutorsAndLib::flib, GetOrCreateExecutors(), tensorflow::TBBSession::PerPartitionExecutorsAndLib::graph, graph_def_lock_, mps_fire::i, tensorflow::TBBSession::ExecutorsAndKeys::input_name_to_index, tensorflow::TBBSession::ExecutorsAndKeys::input_types, haddnano::inputs, tensorflow::TBBSession::ExecutorsAndKeys::items, checklumidiff::l, eostools::move(), operation_timeout_in_ms_, options_, tensorflow::TBBSession::ExecutorsAndKeys::output_types, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, tensorflow::TBBSession::RunState::rendez, ResourceHandleToInputTensor(), Run(), alignCSCRings::s, SchedClosure(), session_state_, btagGenBb_cfi::Status, tensorflow::TBBSession::ExecutorsAndKeys::step_count, step_id_counter_, sync_on_finish_, and WaitForNotification().
Referenced by GetOrCreateExecutors().
|
inline |
Definition at line 123 of file TBBSession.h.
|
override |
Definition at line 305 of file TBBSession.cc.
References CheckNotClosed(), ExtendLocked(), graph_def_lock_, and checklumidiff::l.
|
private |
Definition at line 311 of file TBBSession.cc.
References flib_def_, and MaybeInitializeExecutionState().
Referenced by Create(), and Extend().
|
private |
Definition at line 667 of file TBBSession.cc.
References CreateGraphs(), tensorflow::TBBSession::RunStateArgs::debug_options, DecorateAndPublishGraphForDebug(), device_mgr_, device_set_, executor_lock_, plotBeamSpotDB::first, tensorflow::TBBSession::RunStateArgs::graph, graph_def_lock_, cuy::graphs, tensorflow::TBBSession::RunStateArgs::handle, handle_name_counter_, mps_fire::i, triggerObjects_cff::id, input, tensorflow::TBBSession::RunStateArgs::is_partial_run, crabWrapper::key, checklumidiff::l, mps_check::lib, eostools::move(), gen::n, names, node_outputs_callback_, AlcaSiPixelAliHarvester0T_cff::options, options_, convertSQLitetoXML_cfg::output, session_handle_, and jetUpdater_cfi::sort.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
override |
|
inlineoverride |
Definition at line 118 of file TBBSession.h.
|
private |
Definition at line 261 of file TBBSession.cc.
References device_set_, flib_def_, AlcaSiPixelAliHarvester0T_cff::options, options_, and groupFilesInBlocks::temp.
Referenced by ExtendLocked().
tensorflow::Status tensorflow::TBBSession::Reset | ( | const std::vector< string > & | containers | ) |
Definition at line 1074 of file TBBSession.cc.
References device_mgr_.
|
private |
Definition at line 641 of file TBBSession.cc.
References session_state_.
Referenced by DecorateAndPublishGraphForDebug().
|
override |
Definition at line 326 of file TBBSession.cc.
Referenced by DecorateAndPublishGraphForDebug().
|
override |
|
private |
Definition at line 193 of file TBBSession.cc.
References EnergyCorrector::c.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
|
private |
Definition at line 1156 of file TBBSession.cc.
References btagGenBb_cfi::Status.
Referenced by DecorateAndPublishGraphForDebug(), and WaitForNotification().
|
private |
Definition at line 1135 of file TBBSession.cc.
References tensorflow::TBBSession::RunState::executors_done, checklumidiff::l, tensorflow::TBBSession::RunState::mu_, btagGenBb_cfi::Status, mps_update::status, and WaitForNotification().
|
friend |
Definition at line 346 of file TBBSession.h.
|
private |
Definition at line 306 of file TBBSession.h.
Referenced by Close(), DecorateAndPublishGraphForDebug(), and ~TBBSession().
|
private |
Definition at line 325 of file TBBSession.h.
Referenced by Close().
|
private |
Definition at line 339 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
Definition at line 270 of file TBBSession.h.
Referenced by CreateGraphs(), DecorateAndPublishGraphForDebug(), GetOrCreateExecutors(), Reset(), TBBSession(), and ~TBBSession().
|
private |
Definition at line 272 of file TBBSession.h.
Referenced by CreateGraphs(), GetOrCreateExecutors(), MaybeInitializeExecutionState(), and TBBSession().
|
private |
Definition at line 271 of file TBBSession.h.
Referenced by CreateGraphs(), DecorateAndPublishGraphForDebug(), ListDevices(), and TBBSession().
|
private |
Definition at line 329 of file TBBSession.h.
Referenced by CreateGraphs().
|
private |
Definition at line 289 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug(), and GetOrCreateExecutors().
|
private |
Definition at line 305 of file TBBSession.h.
Referenced by Close().
|
private |
Definition at line 322 of file TBBSession.h.
Referenced by CreateGraphs(), ExtendLocked(), MaybeInitializeExecutionState(), and ~TBBSession().
|
private |
Definition at line 277 of file TBBSession.h.
Referenced by Create(), CreateGraphs(), DecorateAndPublishGraphForDebug(), Extend(), and GetOrCreateExecutors().
|
private |
Definition at line 330 of file TBBSession.h.
Referenced by GetOrCreateExecutors().
|
private |
Definition at line 280 of file TBBSession.h.
Referenced by Create().
|
private |
Definition at line 341 of file TBBSession.h.
Referenced by GetOrCreateExecutors().
|
private |
Definition at line 336 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
Definition at line 267 of file TBBSession.h.
Referenced by CreateGraphs(), DecorateAndPublishGraphForDebug(), GetOrCreateExecutors(), MaybeInitializeExecutionState(), valtools.webpage::parseArgs(), and batchmanager.BatchManager::ParseOptions().
|
private |
Definition at line 274 of file TBBSession.h.
Referenced by GetOrCreateExecutors(), TBBSession(), and ~TBBSession().
|
private |
Definition at line 303 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug(), and ResourceHandleToInputTensor().
|
staticprivate |
Definition at line 333 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
Definition at line 283 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug(), and TBBSession().