MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ValidateConfig

Function ValidateConfig

tensorflow/compiler/tf2xla/tf2xla_util.cc:307–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305const char kXlaOutsideCompilationAttrName[] = "_xla_outside_compilation";
306
307Status ValidateConfig(const tf2xla::Config& config) {
308 std::set<string> names;
309 for (const tf2xla::Feed& feed : config.feed()) {
310 TF_RETURN_IF_ERROR(ValidateTensorId(feed.id()));
311 TF_RETURN_IF_ERROR(TensorShape::IsValidShape(feed.shape()));
312 TF_RETURN_IF_ERROR(CheckNameDuplicates("feed", feed.name(), &names));
313 }
314 TF_RETURN_IF_ERROR(CheckFeedFetchNameConflicts("feed", names));
315 names.clear();
316 for (const tf2xla::Fetch& fetch : config.fetch()) {
317 TF_RETURN_IF_ERROR(ValidateTensorId(fetch.id()));
318 TF_RETURN_IF_ERROR(CheckNameDuplicates("fetch", fetch.name(), &names));
319 }
320 TF_RETURN_IF_ERROR(CheckFeedFetchNameConflicts("fetch", names));
321 if (config.fetch().empty()) {
322 return errors::InvalidArgument("fetches must be specified");
323 }
324 return Status::OK();
325}
326
327Status AddPlaceholdersForFeeds(
328 const tf2xla::Config& config, const OpRegistryInterface* op_registry,

Callers 5

InitGraphFunction · 0.85
TESTFunction · 0.85
GenerateHeaderFunction · 0.85
MainFunction · 0.85

Calls 11

ValidateTensorIdFunction · 0.85
CheckNameDuplicatesFunction · 0.85
InvalidArgumentFunction · 0.85
nameMethod · 0.65
feedMethod · 0.45
idMethod · 0.45
shapeMethod · 0.45
clearMethod · 0.45
fetchMethod · 0.45
emptyMethod · 0.45

Tested by 1

TESTFunction · 0.68