#include <TBBSession.h>
Classes | |
struct | ExecutorsAndKeys |
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 *, StringPiece::Hasher > | 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 | 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 Types | |
typedef TBBSession | ME |
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::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< SimpleGraphExecutionState > 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 78 of file TBBSession.h.
typedef std::function<void(Session*)> tensorflow::TBBSession::CloseCallback |
Definition at line 80 of file TBBSession.h.
|
private |
Definition at line 123 of file TBBSession.h.
typedef std::vector<std::pair<string, Tensor> > tensorflow::TBBSession::NamedTensorList |
Definition at line 90 of file TBBSession.h.
typedef std::unordered_map<StringPiece, Node*, StringPiece::Hasher> tensorflow::TBBSession::NameNodeMap |
Definition at line 92 of file TBBSession.h.
tensorflow::TBBSession::TBBSession | ( | const SessionOptions & | options, |
const DeviceMgr * | device_mgr, | ||
TBBSessionFactory * | factory | ||
) |
Definition at line 202 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 245 of file TBBSession.cc.
References cancellation_manager_, Close(), edmIntegrityCheck::d, device_mgr_, flib_def_, and session_handle_.
|
inlineprivate |
Definition at line 237 of file TBBSession.h.
References pfDeepBoostedJetPreprocessParams_cfi::input_names, checklumidiff::l, and btagGenBb_cfi::Status.
Referenced by DecorateAndPublishGraphForDebug(), and Extend().
|
override |
Definition at line 1038 of file TBBSession.cc.
References cancellation_manager_, closed_lock_, tensorflow::TBBSessionFactory::Deregister(), factory_, and checklumidiff::l.
Referenced by ~TBBSession().
|
override |
Definition at line 293 of file TBBSession.cc.
References ExtendLocked(), graph_def_lock_, init_error_, and checklumidiff::l.
|
private |
Definition at line 336 of file TBBSession.cc.
References pfDeepBoostedJetPreprocessParams_cfi::input_names.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
Definition at line 863 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 350 of file TBBSession.cc.
References createfilelist::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, PatBasicFWLiteJetAnalyzer_Selector_cfg::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 118 of file TBBSession.h.
|
override |
Definition at line 306 of file TBBSession.cc.
References CheckNotClosed(), ExtendLocked(), graph_def_lock_, and checklumidiff::l.
|
private |
Definition at line 312 of file TBBSession.cc.
References flib_def_, and MaybeInitializeExecutionState().
Referenced by Create(), and Extend().
|
private |
Definition at line 643 of file TBBSession.cc.
References CreateGraphs(), tensorflow::TBBSession::RunStateArgs::debug_options, DecorateAndPublishGraphForDebug(), device_mgr_, device_set_, executor_lock_, plotBeamSpotDB::first, tensorflow::TBBSession::RunStateArgs::graph, 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, cscdqm::h::names, node_outputs_callback_, AlcaSiPixelAliHarvester0T_cff::options, options_, convertSQLitetoXML_cfg::output, and session_handle_.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
override |
|
private |
Definition at line 262 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 1032 of file TBBSession.cc.
References device_mgr_.
|
private |
Definition at line 622 of file TBBSession.cc.
References session_state_.
Referenced by DecorateAndPublishGraphForDebug().
|
override |
Definition at line 327 of file TBBSession.cc.
Referenced by DecorateAndPublishGraphForDebug().
|
override |
|
private |
Definition at line 198 of file TBBSession.cc.
References EnergyCorrector::c.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
|
private |
Definition at line 1117 of file TBBSession.cc.
References btagGenBb_cfi::Status.
Referenced by DecorateAndPublishGraphForDebug(), and WaitForNotification().
|
private |
Definition at line 1093 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 329 of file TBBSession.h.
|
private |
Definition at line 289 of file TBBSession.h.
Referenced by Close(), DecorateAndPublishGraphForDebug(), and ~TBBSession().
|
private |
Definition at line 308 of file TBBSession.h.
Referenced by Close().
|
private |
Definition at line 322 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
Definition at line 256 of file TBBSession.h.
Referenced by CreateGraphs(), DecorateAndPublishGraphForDebug(), GetOrCreateExecutors(), Reset(), TBBSession(), and ~TBBSession().
|
private |
Definition at line 258 of file TBBSession.h.
Referenced by CreateGraphs(), GetOrCreateExecutors(), MaybeInitializeExecutionState(), and TBBSession().
|
private |
Definition at line 257 of file TBBSession.h.
Referenced by CreateGraphs(), DecorateAndPublishGraphForDebug(), ListDevices(), and TBBSession().
|
private |
Definition at line 312 of file TBBSession.h.
Referenced by CreateGraphs().
|
private |
Definition at line 272 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug(), and GetOrCreateExecutors().
|
private |
Definition at line 288 of file TBBSession.h.
Referenced by Close().
|
private |
Definition at line 305 of file TBBSession.h.
Referenced by CreateGraphs(), ExtendLocked(), MaybeInitializeExecutionState(), and ~TBBSession().
|
private |
Definition at line 263 of file TBBSession.h.
Referenced by Create(), CreateGraphs(), DecorateAndPublishGraphForDebug(), and Extend().
|
private |
Definition at line 313 of file TBBSession.h.
Referenced by GetOrCreateExecutors().
|
private |
Definition at line 266 of file TBBSession.h.
Referenced by Create().
|
private |
Definition at line 324 of file TBBSession.h.
Referenced by GetOrCreateExecutors().
|
private |
Definition at line 319 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
Definition at line 253 of file TBBSession.h.
Referenced by CreateGraphs(), DecorateAndPublishGraphForDebug(), GetOrCreateExecutors(), MaybeInitializeExecutionState(), valtools.webpage::parseArgs(), and batchmanager.BatchManager::ParseOptions().
|
private |
Definition at line 260 of file TBBSession.h.
Referenced by GetOrCreateExecutors(), TBBSession(), and ~TBBSession().
|
private |
Definition at line 286 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug(), and ResourceHandleToInputTensor().
|
staticprivate |
Definition at line 316 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug().
|
private |
Definition at line 269 of file TBBSession.h.
Referenced by DecorateAndPublishGraphForDebug(), and TBBSession().