MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / XrtTfContext

Method XrtTfContext

tensorflow/compiler/xrt/client/xrt_tf_client.cc:106–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106XrtTfContext::XrtTfContext(const XrtTfContext::Options& options,
107 std::shared_ptr<XrtTfClient> tf_client,
108 XrtGrpcEagerClient* eager_client,
109 int64 rendezvous_id, int64 context_id,
110 std::vector<DeviceAttributes> devices,
111 int cpu_device_id)
112 : options_(options),
113 tf_client_(tf_client),
114 eager_client_(eager_client),
115 rendezvous_id_(rendezvous_id),
116 context_id_(context_id),
117 devices_(std::move(devices)),
118 cpu_device_id_(cpu_device_id) {
119 CHECK_GE(cpu_device_id_, 0);
120 enqueue_request_ = absl::make_unique<eager::EnqueueRequest>();
121 queue_thread_.reset(Env::Default()->StartThread(ThreadOptions(),
122 "xrt_tf_client_queue_thread",
123 [this]() { QueueThread(); }));
124}
125
126XrtTfContext::~XrtTfContext() {
127 Status status = Close();

Callers

nothing calls this directly

Calls 4

DefaultFunction · 0.85
ThreadOptionsClass · 0.85
resetMethod · 0.45
StartThreadMethod · 0.45

Tested by

no test coverage detected