You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Mithril, currently there are some primitives that creates array such as:
Arange
Eye
EyeComplement
these models take Dtype as an input, which is a Mithril specific enum type. Dtype, as its name suggests, determines type of output tensor. Therefore, it can also determine logical types of output connection at logical level.
Feature Request
Describe the Feature
In Mithril, currently there are some primitives that creates array such as:
Arange
Eye
EyeComplement
these models take
Dtype
as an input, which is aMithril
specific enum type.Dtype
, as its name suggests, determines type of output tensor. Therefore, it can also determine logical types of output connection at logical level.Examples
Dtype.int32
->Tensor[int]
Dtype.float32
->Tensor[float]
Dtype.bool
->Tensor[bool]
Right now,
Mithril
does not support this feature. So as to support this feature, a specific implementation of Dtype constraint is needed.Motivation
Implementing this feature will increase the type inference capability of
Mithril
. Which will benefit in multiple ways:Proposed Solution
Write a
dtype_constraint
Takes following inputs:
IOHyperEdge
IOHyperEdge
will operate between value of
Dtype
and type ofoutput
. Therefore, it will be both type and value constraint.Implement the logic and add this constraint to all array creation models.
Add tests to cover its logic and its integration.
Alternatives Considered
N/A
Additional Context
N/A
The text was updated successfully, but these errors were encountered: