Skip to content

Remove RTTI from the Tensor API. Refactor operation handling in the graph.#10253

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_914983314
Open

Remove RTTI from the Tensor API. Refactor operation handling in the graph.#10253
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_914983314

Conversation

@copybara-service
Copy link
Copy Markdown
Contributor

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_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.

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant