Skip to content

Commit be5ec1f

Browse files
committed
Keep functions disabled for now
Signed-off-by: Ryan Nett <[email protected]>
1 parent 0c35ce0 commit be5ec1f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tensorflow-core/tensorflow-core-api/src/bazel/op_generator/op_generator.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,11 @@ bool CanGenerateOp(const OpDef& op_def, const ApiDef& api_def) {
548548
if (api_def.visibility() == ApiDef::SKIP) {
549549
return false;
550550
}
551+
for (const auto& attr : op_def.attr()) {
552+
if (attr.type() == "func" || attr.type() == "list(func)") {
553+
return false; // TODO function attributes are supported, just need to enable
554+
}
555+
}
551556
return true;
552557
}
553558

tensorflow-core/tensorflow-core-api/src/bazel/op_generator/op_specs.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,15 @@ string SnakeToCamelCase(const string& str, bool upper = false) {
190190
result += c;
191191
}
192192
}
193+
194+
if(result == "for"){
195+
return "for_";
196+
} else if(result == "if"){
197+
return "if_";
198+
} else if(result == "while"){
199+
return "while_";
200+
}
201+
193202
return result;
194203
}
195204

0 commit comments

Comments
 (0)