| 44 | namespace { |
| 45 | |
| 46 | Status ValidateTensorId(const tf2xla::TensorId& id) { |
| 47 | if (id.node_name().empty()) { |
| 48 | return errors::InvalidArgument("TensorId node_name must be non-empty"); |
| 49 | } |
| 50 | if (id.output_index() < 0) { |
| 51 | return errors::InvalidArgument("TensorId output_index must be positive"); |
| 52 | } |
| 53 | return Status::OK(); |
| 54 | } |
| 55 | |
| 56 | Status CheckNameDuplicates(const string& kind, const string& name, |
| 57 | std::set<string>* names) { |
no test coverage detected