fhelium.ir.dialects.core
Core references and open value roles shared by FHElium dialects.
ConstantOp
class View source
ConstantOp()Bases: IRDLOperation
Introduce one immutable scalar or structured literal descriptor.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium.constant' | |
value | result_def() | |
literal | opt_attr_def(StringAttr, attr_name='fhelium.literal') | |
traits | traits_def(Pure()) |
EncryptedType
class View source
EncryptedType()Bases: OpenStateType
Encrypted value with partial scheme and representation state.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium.encrypted' | |
ROLE | ClassVar[ValueRole] | 'encrypted' |
FHElium
data View source
FHElium = Dialect('fhelium', [MaterialRefOp, ResourceRefOp, ConstantOp], [EncryptedType, MessageType, PlaintextType, MaterialType, ResourceType])MaterialRefOp
class View source
MaterialRefOp(result_type: Attribute | None=None, *, symbol: str | StringAttr | None=None, kind: str | StringAttr | None=None, attributes: Mapping[str, Attribute] | None=None)Bases: IRDLOperation
Reference an external Tensor by its entry in the material table.
Missing Tensor dimensions or state may remain unknown in a saved Program. The symbol names data; it does not select a resource class or a factory.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium.material.ref' | |
value | result_def() | |
symbol | opt_attr_def(StringAttr) | |
kind | opt_attr_def(StringAttr) | |
traits | traits_def(Pure()) |
MaterialType
class View source
MaterialType()Bases: OpenStateType
Symbolic reference type for graph-external material.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium.material' |
MessageType
class View source
MessageType()Bases: OpenStateType
Public value with optional frontend and tensor metadata.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium.message' | |
ROLE | ClassVar[ValueRole] | 'message' |
OPERATION_SPECS
constant View source
OPERATION_SPECS: tuple[OperationSpec, ...] = (registered_operation_spec(MaterialRefOp, 'auxiliary', effect='pure', validator=_reference_specification), registered_operation_spec(ResourceRefOp, 'auxiliary', effect='pure', validator=_reference_specification), registered_operation_spec(ConstantOp, 'auxiliary', validator=_constant_specification))PlaintextType
class View source
PlaintextType()Bases: OpenStateType
Encoded plaintext with partial representation state.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium.plaintext' | |
ROLE | ClassVar[ValueRole] | 'plaintext' |
ResourceRefOp
class View source
ResourceRefOp(result_type: Attribute | None=None, *, symbol: str | StringAttr | None=None, kind: str | StringAttr | None=None, attributes: Mapping[str, Attribute] | None=None)Bases: IRDLOperation
Reference an execution resource supplied by Backend binding.
The operation returns the bound value without materializing or mutating it. An unused reference can be removed with its unused resource requirement.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium.resource.ref' | |
value | result_def() | |
symbol | opt_attr_def(StringAttr) | |
kind | opt_attr_def(StringAttr) | |
traits | traits_def(Pure()) |
ResourceType
class View source
ResourceType()Bases: OpenStateType
Symbolic reference type for graph-external execution resources.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium.resource' |