Remove RTTI from the Tensor API. Refactor operation handling in the graph.#10253
Open
copybara-service[bot] wants to merge 1 commit into
Open
Remove RTTI from the Tensor API. Refactor operation handling in the graph.#10253copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
83365b2 to
41b1450
Compare
…raph. Remove virtual inheritance from the operation implementations and stop using side-casting using `dynamic_cast` to find out if an operation is implemented by a backend. Add a list of "graph::BackendExtension" elements that can be grafted onto an operation. Backends implementation of every operation are now implemented by deriving from this new class. When lowering to a specific backend, we go through the list of extensions attached to an operation to find a matching backend. Backend identification is done by calling `BackendExtension::GetTypeId()`. As a result of the above changes, operation node implementations don't need to be defined as templates anymore. PiperOrigin-RevId: 914983314
41b1450 to
5329bc3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove RTTI from the Tensor API. Refactor operation handling in the graph.
Remove virtual inheritance from the operation implementations and stop using
side-casting using
dynamic_castto find out if an operation is implemented bya backend.
Add a list of "graph::BackendExtension" elements that can be grafted onto an
operation. Backends implementation of every operation are now implemented by
deriving from this new class. When lowering to a specific backend, we go
through the list of extensions attached to an operation to find a matching
backend.
Backend identification is done by calling
BackendExtension::GetTypeId().As a result of the above changes, operation node implementations don't need to
be defined as templates anymore.