| 31 | namespace borrow { |
| 32 | |
| 33 | SmallVector<TensorPtr> apply_on_physical_tensor( |
| 34 | const OpDef& def, const SmallVector<TensorPtr>& inputs, |
| 35 | SmallVector<LogicalTensorDesc>& output_descs, const bool& validated) { |
| 36 | auto& op = def.cast_final_safe<Borrow>(); |
| 37 | SmallVector<TensorPtr> outputs; |
| 38 | outputs.reserve(inputs.size()); |
| 39 | for (auto& i : inputs) { |
| 40 | outputs.push_back(Tensor::make( |
| 41 | i->blob()->borrow_to(op.comp_node), i->layout(), i->offset())); |
| 42 | } |
| 43 | return outputs; |
| 44 | } |
| 45 | |
| 46 | SmallVector<VarNode::LayoutConstraintCallback> get_input_layout_constraint( |
| 47 | const OpDef& def, const SmallVector<TensorPtr>& inputs) { |
nothing calls this directly
no test coverage detected