Build a lowering rule for an foreign function interface (FFI) target.
By default, this lowering rule can use the input and output abstract values to compute the input and output types and shapes for the custom call, assuming row-major layouts.
Note that layouts passed to this function as tuples should be in minor-to-major order (as expected by XLA) rather than major-to-minor as used by ffi_call()
and DeviceLocalLayout
.
If keyword arguments are passed to the lowering rule, these are treated as attributes, and added to backend_config.
call_target_name (str) – The name of the custom call target.
operand_layouts (Sequence[FfiLayoutOptions] | None | None) – A sequence of layouts (dimension orders) for each operand. By default, the operands are assumed to be row-major.
result_layouts (Sequence[FfiLayoutOptions] | None | None) – A sequence of layouts (dimension orders) for each result. By default, the results are assumed to be row-major.
backend_config (Mapping[str, ir.Attribute] | str | None | None) – Configuration data for the custom call. Any keyword arguments passed to the lowering rule will added to this dictionary.
lowering_args (Any) – Any other arguments to mlir.custom_call()
will also be passed through if provided as extra arguments to this function.
mlir.LoweringRule
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3