Proto commits in google/gematria

These 5 commits are when the Protocol Buffers files have changed:

Commit:cb9d214
Author:Aiden Grossman
Committer:GitHub

Refactor benchmark annotations into a proto (#188) This patch refactors the benchmark annotations into a proto rather than a struct so that it can more easily be serialized inside the Beam pipeline.

The documentation is generated from this commit.

Commit:52ca765
Author:Viraj Shah
Committer:GitHub

Add support for instruction annotations to the graph builder. (#93) * Add instruction annotation message to proto specification. * Add new message type `AnnotationProto` (`gematria/proto/annotation.proto`). * Include it `CanonicalizedInstructionProto`. * Add instruction annotation support to basic block representation. * Add new `Annotation` class. * Add `instruction_annotations` vector to `Instruction`. * Add Python bindings for these. * Add tests for all above changes. * Add conversions between `Annotation` and `AnnotationProto` and back. * Add `Annotation` conversion and update `Instruction` conversion. * Refactor `ToVector` and `ToRepeatedPtrField` to be generic. * Add Python bindings for conversions. * Add tests for all changes. * Store instruction annotations while building graph. * Make instruction annotations available to models via the graph builder, where they are stored as a vector-of-vector matrix. * Add Python bindings for the same. * Add tests for the C++ graph builder implementation, and update the tests for the Python bindings to be compatible with the changes. * Add test for graph builder instruction annotation Python bindings. * Add a test adding basic blocks with annotations to the graph builder. * Add `annotated_basic_blocks_with_throughput.pbtxt` as a source for annotated basic blocks for tests. * Add utilities to get the annotated blocks to `gematria/testing`. * Make requested changes. * `annotation_names` is now a vector, not a set. * Improve annotation related graph builder tests.

Commit:4ecbb54
Author:Viraj Shah
Committer:GitHub

Add instruction annotations to the basic block representations. (#92) * Add instruction annotation message to proto specification. * Add new message type `AnnotationProto` (`gematria/proto/annotation.proto`). * Include it `CanonicalizedInstructionProto`. * Add instruction annotation support to basic block representation. * Add new `Annotation` class. * Add `instruction_annotations` vector to `Instruction`. * Add Python bindings for these. * Add tests for all above changes. * Add conversions between `Annotation` and `AnnotationProto` and back. * Add `Annotation` conversion and update `Instruction` conversion. * Refactor `ToVector` and `ToRepeatedPtrField` to be generic. * Add Python bindings for conversions. * Add tests for all changes. * Address reviewer comments. * Fix a bug in the Python `Annotation` constructor. * Make some other minor changes.

Commit:5cc349c
Author:Google
Committer:Ondrej Sykora

Added code for importing training data from LLVM and BHive CSV files. Added the LLVM framework as a dependency and functions and classes needed to convert LLVM data structures (llvm::MCInst) to Gematria data structures. This is currently used mainly to implement the BHive importer, but it can be used for building importers also from other formats (e.g. from within an LLVM pass, or other binary analysis tools). A tool that imports basic blocks from compiled ELF binaries based on this code is coming in the near future. Bonus changes: - added a bibtex of the GRANITE paper to README.md. PiperOrigin-RevId: 532481549

Commit:b3f0b3e
Author:Google
Committer:Ondrej Sykora

Initial import of the source code. PiperOrigin-RevId: 517913253