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

Function ShapeContainsToken

tensorflow/compiler/xla/service/hlo_verifier.cc:1282–1291  ·  view source on GitHub ↗

Returns true if the given Shape has a TOKEN shape as any subshape.

Source from the content-addressed store, hash-verified

1280
1281// Returns true if the given Shape has a TOKEN shape as any subshape.
1282bool ShapeContainsToken(const Shape& shape) {
1283 bool contains_token = false;
1284 ShapeUtil::ForEachSubshape(
1285 shape, [&contains_token](const Shape& subshape, const ShapeIndex&) {
1286 if (subshape.IsToken()) {
1287 contains_token = true;
1288 }
1289 });
1290 return contains_token;
1291}
1292
1293// Verifies that all types entering and exiting the entry computation are
1294// legal.

Callers 1

VerifyEntryAndExitShapesFunction · 0.85

Calls 1

IsTokenMethod · 0.80

Tested by

no test coverage detected