| 144 | } |
| 145 | |
| 146 | Status 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 |
no test coverage detected