IRON dda37d5934b525fc5832d3d5e94037a8931956aa
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
iron.kernel.Kernel Class Reference
Inheritance diagram for iron.kernel.Kernel:
Inheritance graph
[legend]
Collaboration diagram for iron.kernel.Kernel:
Collaboration graph
[legend]

Public Member Functions

None __init__ (self, str name, str object_file_name, list[type[np.ndarray]|np.dtype] arg_types=[])
 
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)
 
 __call__ (self, *args, **kwargs)
 

Protected Attributes

 _object_file_name
 
 _op
 
 _name
 
- Protected Attributes inherited from iron.kernel.BaseKernel
 _name
 
 _arg_types
 
 _op
 

Detailed Description

An AIE core function backed by a pre-compiled object file.

Use :class:`ExternalFunction` instead when you want to compile from
C/C++ source at JIT time.

``resolve()`` emits a ``func.func private`` declaration with a
``link_with`` attribute naming ``object_file_name``.  The
``aie-assign-core-link-files`` pass propagates this into the CoreOp's
``link_files`` attribute so the linker knows which file to include.

Constructor & Destructor Documentation

◆ __init__()

None iron.kernel.Kernel.__init__ (   self,
str  name,
str  object_file_name,
list[type[np.ndarray] | np.dtype]   arg_types = [] 
)
Args:
    name: Symbol name of the function as it appears in the object file.
    object_file_name: Filename of the pre-compiled object file
        (e.g. ``"add_one.o"``).  Must be on the linker search path
        at compile time.
    arg_types: Type signature of the function arguments.  Defaults to [].

Reimplemented from iron.kernel.BaseKernel.

Reimplemented in iron.kernel.ExternalFunction.

Member Function Documentation

◆ object_file_name()

str iron.kernel.Kernel.object_file_name (   self)
Filename of the compiled object file.

◆ resolve()

None iron.kernel.Kernel.resolve (   self,
ir.Location | None   loc = None,
ir.InsertionPoint | None   ip = None 
)
Resolve the current object into one or more MLIR operations.
Should only be called within an MLIR context.

Args:
    loc (ir.Location | None, optional): Location is used by MLIR object during construction in some cases. Defaults to None.
    ip (ir.InsertionPoint | None, optional): InsertionPoint is used by MLIR object during construction in some cases. Defaults to None.

Reimplemented from iron.resolvable.Resolvable.

Member Data Documentation

◆ _name

iron.kernel.Kernel._name
protected

◆ _object_file_name

iron.kernel.Kernel._object_file_name
protected

◆ _op

iron.kernel.Kernel._op
protected

The documentation for this class was generated from the following file: