Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortform syntax for external parameter access #406

Open
UnsignedByte opened this issue Dec 12, 2023 · 1 comment
Open

Shortform syntax for external parameter access #406

UnsignedByte opened this issue Dec 12, 2023 · 1 comment
Labels
C: language Component: the Filament language S: needs triage Status: Needs some more thinking before being actionable

Comments

@UnsignedByte
Copy link
Collaborator

Often times when we want the existential latency for a component, we have to generate a dummy instance to do so:

Bx := new Butterfly[8, 23];
L := Bx::L

To fix this, we can have a syntax like follows:

L := Butterfly[8, 23]::L;

We also have this issue where different components cannot have any sort of relation between their existential parameters. In some cases, such as with floating point addition and subtraction components, our implementation knows the relationship between their latencies (they are equal in most cases), but existential parameters obfuscate all this information.

Ideally, we would want something like this:

comp FPSub[E, M]<'G: 1>(
   // ...
) -> (
   // ...
) with {
   some L where L == FPAdd[E, M]::L;
}

so that this information can be preserved.

@UnsignedByte UnsignedByte added C: language Component: the Filament language S: needs triage Status: Needs some more thinking before being actionable labels Dec 12, 2023
@rachitnigam
Copy link
Member

In some ways, this is not a hard change to make. We need to make Comp[Params]::Param an expression so that it can be used anywhere. One consequence of this is that the following is also a valid expression:

assert FAdd[23, 8]::L + FSub[8, 7]::T == FMul[19, 24]::E

The encoding for this is straightforward; we can just use the functions declared for each existential parameter as the expression that shows up in SMT.

Note that this is fundamentally more expressive because previously, there was no way to say that the latency of something is dependent/equal to the output parameter of something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: language Component: the Filament language S: needs triage Status: Needs some more thinking before being actionable
Projects
None yet
Development

No branches or pull requests

2 participants