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

Method GetDeviceToHostShapes

tensorflow/compiler/tf2xla/xla_compiler.cc:1376–1389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1374}
1375
1376Status XlaCompiler::GetDeviceToHostShapes(
1377 const string& key, std::vector<TensorShape>* shapes) const {
1378 const auto iter = host_compute_sends_.find(key);
1379 if (iter == host_compute_sends_.end()) {
1380 return errors::InvalidArgument(
1381 "No host compute send shapes registered for key ", key);
1382 }
1383 shapes->clear();
1384 for (int i = 0; i < iter->second.metadata_size(); ++i) {
1385 TensorShape shape(iter->second.metadata(i).shape());
1386 shapes->push_back(shape);
1387 }
1388 return Status::OK();
1389}
1390
1391Status XlaCompiler::SetHostToDeviceMetadata(
1392 const string& key, absl::Span<const DataType> types,

Callers

nothing calls this directly

Calls 7

InvalidArgumentFunction · 0.85
metadataMethod · 0.80
findMethod · 0.45
endMethod · 0.45
clearMethod · 0.45
shapeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected