|
IRON dda37d5934b525fc5832d3d5e94037a8931956aa
|


Public Member Functions | |
| None | __init__ (self, str name, str|None object_file_name=None, str|None source_file=None, str|None source_string=None, list[type[np.ndarray]|np.dtype] arg_types=[], list[str] include_dirs=[], list[str] compile_flags=[]) |
| __call__ (self, *args, **kwargs) | |
| __hash__ (self) | |
Public Member Functions inherited from iron.kernel.Kernel | |
| str | object_file_name (self) |
| None | resolve (self, ir.Location|None loc=None, ir.InsertionPoint|None ip=None) |
Public Member Functions inherited from iron.kernel.BaseKernel | |
| int | tile_size (self, int arg_index=0) |
| list | arg_types (self) |
Protected Member Functions | |
| None | _validate_arg (self, int index, arg, expected_ty) |
Protected Attributes | |
| _source_file | |
| _source_string | |
| _include_dirs | |
| _compile_flags | |
| _compiled | |
| _arg_types | |
| _name | |
Protected Attributes inherited from iron.kernel.Kernel | |
| _object_file_name | |
| _op | |
| _name | |
Protected Attributes inherited from iron.kernel.BaseKernel | |
| _name | |
| _arg_types | |
| _op | |
Static Protected Attributes | |
| set | _instances = set() |
An AIE core function compiled from C/C++ source at JIT time. Each instance is registered in ``_instances`` at construction time so that the ``@jit`` decorator can discover and compile all source files before invoking the MLIR compilation pipeline. ``_instances`` is cleared at the start of each ``@jit`` call to prevent stale registrations from a previous (possibly failed) run. Use the base :class:`Kernel` class instead when you have a pre-built object file.
| None iron.kernel.ExternalFunction.__init__ | ( | self, | |
| str | name, | ||
| str | None | object_file_name = None, |
||
| str | None | source_file = None, |
||
| str | None | source_string = None, |
||
| list[type[np.ndarray] | np.dtype] | arg_types = [], |
||
| list[str] | include_dirs = [], |
||
| list[str] | compile_flags = [] |
||
| ) |
Args:
name: Symbol name of the function as it will appear in the object
file.
object_file_name: Output object file name. Defaults to
``<name>.o``.
source_file: Path to a C/C++ source file on disk. Mutually
exclusive with ``source_string``.
source_string: Inline C/C++ source code. Mutually exclusive with
``source_file``.
arg_types: Type signature of the function arguments. Defaults to
[].
include_dirs: Additional ``-I`` directories passed to the Peano
compiler. Defaults to [].
compile_flags: Additional flags passed verbatim to the Peano
compiler. Defaults to [].
Reimplemented from iron.kernel.Kernel.
| iron.kernel.ExternalFunction.__call__ | ( | self, | |
| * | args, | ||
| ** | kwargs | ||
| ) |
Call with argument count and type validation before emitting MLIR.
Reimplemented from iron.kernel.BaseKernel.
| iron.kernel.ExternalFunction.__hash__ | ( | self | ) |
Hash based on source content and compiler options for cache keying.
|
protected |
Validate a single argument against its expected type.
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |