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

Function PopulateOpWorkingSet

tensorflow/compiler/xrt/xrt_util.cc:146–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146Status PopulateOpWorkingSet(xla::Backend* backend,
147 const xrt::XRTChainedExecuteOp& op,
148 int current_index, const ScopedHandles& outputs,
149 XRTMemoryManager::WorkingSet* working_set) {
150 for (int i = 0; i < op.inputs_size(); ++i) {
151 auto& input = op.inputs(i);
152 if (input.op_index() >= current_index) {
153 return errors::InvalidArgument(
154 "Input index ", input.op_index(),
155 " is above the current position: ", current_index);
156 }
157 TF_RETURN_IF_ERROR(
158 working_set->LookupAndPin(backend, outputs[input.op_index()]));
159 }
160 return Status::OK();
161}
162
163} // namespace
164

Callers 1

ExecuteChainedFunction · 0.85

Calls 4

InvalidArgumentFunction · 0.85
inputs_sizeMethod · 0.80
LookupAndPinMethod · 0.80
inputsMethod · 0.45

Tested by

no test coverage detected