[XLA:cpu] allow overriding of MLIR pass pipeline via debug flags #8543
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.
[XLA:cpu] allow overriding of MLIR pass pipeline via debug flags
Use a backend-specific flag to allow overriding the MLIR pass pipeline when
compiling to CPU via the new runtime pass. This is helpful to debug the
pipeline, in particular the performance of the generated code, without having
to recompile XLA every time. The feature is marked as experimental, hidden deep
inside debug options and obviously disabled in absence of the option.
Also update the signatures of
create_compilation_pipeline
andcreate_specialization_pipeline
inJitOptions
to return a status. Thisallows for a more graceful failure when MLIR pass pipeline cannot be
constructed. CPU pipeline constructor was already aborting with a fatal error,
update that to returning internal error. This makes the JIT friendlier to
library users such as JAX.