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

[DC] Add merge operation #5213

Merged
merged 2 commits into from
May 19, 2023
Merged

[DC] Add merge operation #5213

merged 2 commits into from
May 19, 2023

Conversation

mortbopet
Copy link
Contributor

Looks like we're going to have to introduce a possibility for non-determinism in DC to make it generally applicable.

dc.merge will non-deterministically select one of the incoming tokens and emit an output (dc.value<i1>) stating which token was selected.

Looks like we're going to have to introduce a possibility for non-determinism in DC to make it generally applicable.

`dc.merge` will non-deterministically select one of the incoming tokens and emit an output (`dc.value<i1>`) stating which token was selected.
Copy link
Contributor

@lucas-rami lucas-rami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@teqdruid teqdruid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I was thinking: is there a reason that this operation shouldn't give priority to one of the two images no matter what?

@mortbopet
Copy link
Contributor Author

@teqdruid hmm... giving it a bit of thought, I'm not finding any situation where a prioritized merge wouldn't lead to a situation that couldn't, probabilistically speaking, be reached with a non-deterministic merge. And nevertheless, the hardware implementation would have to give priority. I like it. I personally cannot stand non-deterministic semantics, so that solves that whole ordeal... just make it deterministic with priority!

@teqdruid
Copy link
Contributor

If you say so...

I don't know exactly how you define "determinism" in this context. I had just assumed that you defined it as having the same result with different pipeline depths (aka timing in the literature) -- kinda like a KPN is deterministic. By that definition, I don't think what we need would be deterministic. "On a given cycle, consume a token from the priority input if there's one available there", which is the mechanism by which a KPN guarantees determinism. But I'm faaaaaar from knowledgeable in the field of theoretical control networks.

If, however, you define determinism as "same outputs under the same pipeline depths" (i.e. timing) then that's a different matter and we could absolutely build something which is deterministic.

Overloaded terms are very painful... Especially when they're technical terms.

@mortbopet
Copy link
Contributor Author

I'm not even thinking about pipelines or anything hardware related at this point - strictly KPN. My definition of a deterministic operation would be "Under any possible input combination (/state), the output of the operation is deterministic".

@mortbopet mortbopet merged commit f9a8974 into main May 19, 2023
@darthscsi darthscsi deleted the dev/mpetersen/dc_merge branch June 4, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants