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.
NFC: Simplify some aspects of options management (OptionsContext)
Adds a convenience 'OptionsContext::Option' class that simplifies how
options are declared.
Closes a loophole where tuples of structs containing options can cause
crashes if they populate options in their constructor. Due to how the
external storage mechanism works, we can no longer use direct
std::tuple
of aggregate objects which invoke
addOption
. Instead, one must useunique_ptr
to wrap those types when used as elements of astd::tuple
.To help enforce this, we explicitly delete the move constructor of
OptionsProvider
.[compiler|python] Update how cached pipelines/"Compiler Tasks" are registered
This change updates how registration functions for "compilation tasks"
invoked. We now expose a C API method that can be invoked within the
Pybind11 module initializer. This decouples compiler task registration from
pass or dialect registration.
This change also cleans up the C API function naming for pass/dialect
registration functions.
[python] Add more robust CMake logic for fixing missing CAPI dependency in core MLIR PyBind module
Adds CMake logic to ensure that the Core '_mlir' pybind extension has the
correct CAPI dependencies declared until the upstream CMake declarations can be
fixed.
NFC: Remove unnecessary PyCapsule <-> CAPI casters in compiler and runtime bindings
Removes unnecessary custom PyBind11 capsule -> C API object casters.
These cast functions are only required when it is desired to allow
PyBind11 to extract the C API object from the C++ python wrapper type
automatically.
[tensorrt|compiler] Drop "layer metadata callback" utility from TensorRT translation
This change removes the "layer metadata callback" feature from the
MLIR-to-TensorRT translation. It also removes the relevant APIs from the
MLIR-TensorRT compiler's C++ and Python APIs.
This capability was originally offered as a bridge for populating the
generated TensorRT ILayers with custom metadata. However, the mechanism
prevents caching of pass pipelines and therefore is too expensive to use.
In the future, any metadata passed to TensorRT should be derived from
the MLIR operations' location information.
NFC: update various uses of "Stablehlo" in class and function names to have consistent capitalization
NFC: Reorganize some directories
This change:
since the 'tensorrt' project is supposed to be independent.
tensorrt/python
.[executor]: Add a missing guard for builds without CUDA enabled.
Wrapping the makeCudaStringError function with MLIR_EXECUTOR_ENABLE_CUDA fixes builds without CUDA enabled.
[executor] Use Lua locals for block arguments
Previously, the Executor MLIR-to-Lua translator used Lua globals for
block arguments outside of the entry block since the values that
represent block arguments need to be passed between blocks. On the
other hand, the scope of Lua local variables are restricted to their
block. It is almost never a good idea to use Lua global variables in
our translation strategy, however -- for coroutine functions, a
translation that uses globals is obviously incorrect since all Lua
coroutines in a single Lua environment share the same set of globals.
This change declares all block arguments up front as locals in the
"entry block" and just sets them to
nil
initially. Since we don'tdeclare a block scope for the entry block, all the following Lua block
scopes will have these locals in scope. This allows us to retain the
use of locals for all block arguments.