We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95a28d1 commit 55218daCopy full SHA for 55218da
paddle/fluid/framework/block_desc.cc
@@ -135,6 +135,11 @@ OpDesc *BlockDesc::PrependOp() {
135
return ops_.front().get();
136
}
137
138
+void BlockDesc::PrependAllocatedOp(std::unique_ptr<OpDesc> &&op_desc) {
139
+ need_update_ = true;
140
+ ops_.emplace_front(std::move(op_desc));
141
+}
142
+
143
void BlockDesc::RemoveOp(size_t s, size_t e) {
144
if (ops_.begin() + s == ops_.end() || ops_.begin() + e == ops_.end()) {
145
return;
paddle/fluid/framework/block_desc.h
@@ -87,6 +87,8 @@ class BlockDesc {
87
88
OpDesc *PrependOp();
89
90
+ void PrependAllocatedOp(std::unique_ptr<OpDesc> &&op_desc);
91
92
void RemoveOp(size_t s, size_t e);
93
94
std::vector<OpDesc *> AllOps() const;
0 commit comments