| 39 | } |
| 40 | |
| 41 | Ref<OutputProcess> Graph::addOutputProcess(const std::string& name, |
| 42 | const Ref<Op>& srcOp, |
| 43 | const std::shared_ptr<TransferFunction>& transferFunc, |
| 44 | bool hdr, |
| 45 | bool snorm) |
| 46 | { |
| 47 | auto srcAlloc = tensorAllocs[srcOp.get()]; |
| 48 | auto op = engine->newOutputProcess({srcAlloc->desc, transferFunc, hdr, snorm}); |
| 49 | op->setName(name); |
| 50 | addOp(op, {srcOp}); |
| 51 | |
| 52 | lazyInits.push_back([=]() |
| 53 | { |
| 54 | op->setSrc(srcAlloc->tensor); |
| 55 | }); |
| 56 | |
| 57 | return op; |
| 58 | } |
| 59 | |
| 60 | Ref<Op> Graph::addConv(const std::string& name, |
| 61 | const Ref<Op>& srcOp, |
no test coverage detected