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

Method Hash

tensorflow/compiler/xla/literal.cc:888–907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

886}
887
888size_t LiteralBase::Hash() const {
889 using tensorflow::Hash64;
890 using tensorflow::Hash64Combine;
891
892 size_t hash_value = ShapeUtil::Hash(shape());
893
894 ShapeUtil::ForEachSubshape(
895 shape(), [&](const Shape& subshape, const ShapeIndex& index) {
896 if (!subshape.IsArray()) {
897 return;
898 }
899
900 CHECK(LayoutUtil::IsDense(subshape.layout()));
901 hash_value = Hash64Combine(
902 hash_value, Hash64(static_cast<const char*>(untyped_data(index)),
903 size_bytes(index)));
904 });
905
906 return hash_value;
907}
908
909Status MutableLiteralBase::SetIntegralAsS64(absl::Span<const int64> multi_index,
910 int64 value) {

Callers

nothing calls this directly

Calls 6

Hash64CombineFunction · 0.85
HashClass · 0.50
shapeFunction · 0.50
Hash64Function · 0.50
IsArrayMethod · 0.45
layoutMethod · 0.45

Tested by

no test coverage detected