openxla / xla

A machine learning compiler for GPUs, CPUs, and ML accelerators
Apache License 2.0
2.55k stars 394 forks source link

[xla:ffi] Extract TypeIdRegistry and add ExecutionState #14888

Closed copybara-service[bot] closed 1 month ago

copybara-service[bot] commented 1 month ago

[xla:ffi] Extract TypeIdRegistry and add ExecutionState

Extract TypeId registration into a separate library as TypeId will be shared by execution context and execution state.

Similar to ExecutionContext implement a type-erased RAII wrapper for execution state.

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/14859 from openxla:device_info_test 7428e40409f867d63a0c5815abb934bdb2144afb