|
|
|
@ -126,7 +126,7 @@ const std::vector<std::string> ProgramDesc::GetFeedTargetNames() {
|
|
|
|
|
std::vector<std::string> feed_target_names;
|
|
|
|
|
for (auto *op : global_block.AllOps()) {
|
|
|
|
|
if (op->Type() == kFeedOpType) {
|
|
|
|
|
int col = boost::get<int>(op->GetAttr("col"));
|
|
|
|
|
size_t col = boost::get<int>(op->GetAttr("col"));
|
|
|
|
|
if (col >= feed_target_names.size()) {
|
|
|
|
|
feed_target_names.resize(col + 1);
|
|
|
|
|
}
|
|
|
|
@ -143,7 +143,7 @@ const std::vector<std::string> ProgramDesc::GetFetchTargetNames() {
|
|
|
|
|
std::vector<std::string> fetch_target_names;
|
|
|
|
|
for (auto *op : global_block.AllOps()) {
|
|
|
|
|
if (op->Type() == kFetchOpType) {
|
|
|
|
|
int col = boost::get<int>(op->GetAttr("col"));
|
|
|
|
|
size_t col = boost::get<int>(op->GetAttr("col"));
|
|
|
|
|
if (col >= fetch_target_names.size()) {
|
|
|
|
|
fetch_target_names.resize(col + 1);
|
|
|
|
|
}
|
|
|
|
|