| 679 | MGB_DYN_TYPE_OBJ_FINAL_IMPL(CondExecMark); |
| 680 | |
| 681 | CondExecMark::CondExecMark( |
| 682 | VarNode* ppv, const VarNodeArrayView& inputs, const Param& param, |
| 683 | const OperatorNodeConfig& config) |
| 684 | : Super(ppv->owner_graph(), config, "cond_mark", {ppv}), m_param{param} { |
| 685 | CondExecPred::GlobalRegistry::get(*owner_graph())->check_ppv(ppv); |
| 686 | |
| 687 | for (size_t i = 0; i < inputs.size(); ++i) { |
| 688 | add_input({inputs[i]}); |
| 689 | add_output(ssprintf("fwd%zu", i)) |
| 690 | ->dtype(inputs[i]->dtype()) |
| 691 | .add_flag(VarNode::Flag::ALLOW_EMPTY_SHAPE); |
| 692 | } |
| 693 | add_input({ppv}); |
| 694 | add_equivalence_component<PODHash<Param>>(&m_param); |
| 695 | if (has_no_shape_infer()) { |
| 696 | for (auto i : input()) { |
| 697 | // force dynamic allocation of input so storage can be forwarded |
| 698 | i->add_flag(VarNode::Flag::NO_SYS_STATIC_MEM_ALLOC); |
| 699 | } |
| 700 | for (auto i : output()) { |
| 701 | i->add_flag(VarNode::Flag::NO_SYS_MEM_ALLOC); |
| 702 | } |
| 703 | } else { |
| 704 | m_mem_fwd_success.resize(inputs.size(), false); |
| 705 | } |
| 706 | } |
| 707 | |
| 708 | void CondExecMark::init_output_static_infer_desc() { |
| 709 | using namespace cg::static_infer; |
nothing calls this directly
no test coverage detected