| 323 | } |
| 324 | |
| 325 | Status ValidateFeedFetchCppNames(const tf2xla::Config& config) { |
| 326 | for (const tf2xla::Feed& feed : config.feed()) { |
| 327 | if (!feed.name().empty()) { |
| 328 | TF_RETURN_IF_ERROR(ValidateCppIdent(feed.name(), "feed name")); |
| 329 | } |
| 330 | } |
| 331 | for (const tf2xla::Fetch& fetch : config.fetch()) { |
| 332 | if (!fetch.name().empty()) { |
| 333 | TF_RETURN_IF_ERROR(ValidateCppIdent(fetch.name(), "fetch name")); |
| 334 | } |
| 335 | } |
| 336 | for (const tf2xla::Variable& variable : config.variable()) { |
| 337 | if (!variable.name().empty()) { |
| 338 | TF_RETURN_IF_ERROR(ValidateCppIdent(variable.name(), "variable name")); |
| 339 | } else { |
| 340 | TF_RETURN_IF_ERROR( |
| 341 | ValidateCppIdent(variable.node_name(), "variable name")); |
| 342 | } |
| 343 | } |
| 344 | return Status::OK(); |
| 345 | } |
| 346 | |
| 347 | // Returns a list of C++ expressions that, when executed, will construct the |
| 348 | // BufferInfo instances in `buffer_infos`. |
no test coverage detected