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

TPU-friendly Historian #166

Merged
merged 2 commits into from
May 3, 2018
Merged

Conversation

garious
Copy link
Contributor

@garious garious commented May 2, 2018

Before these patches, the Historian owned both its input and output channels. If other stages in the TPU pipeline followed suit, there'd be no way to stitch them together. With these patches, we look to set a more composable precedent. We have 3 choices of which channel to hoist: the input, the output, or both. With a bit of experimentation, it seems hoisting just the input channel results in both the most natural code and the most flexible. One might guess that hoisting both would be more flexible, but because Sync leaks into the sender's type signature, the only advantage to hoisting the output channel is to set the size of it (so might as well just pass in an integer!)

A pipeline can now be written as:

let (input, output) = channel();
let a = Stage0::new(output);
let b = Stage1::new(a.output);
let c = Stage2::new(b.output);
input.send(42);
drop(input);
assert_eq(c.output.iter().collect().len(), 1)

@garious garious merged commit a158d74 into solana-labs:master May 3, 2018
garious added a commit to garious/solana that referenced this pull request May 7, 2018
vkomenda pushed a commit to vkomenda/solana that referenced this pull request Aug 29, 2021
* Setup rollup, fix prettier, and clean dependencies

* Setup rollup specific babel config

* Fix token-swap config
steviez pushed a commit to steviez/solana that referenced this pull request Mar 13, 2024
… of solana-labs#165) (solana-labs#166)

ci: fix Windows gh release pipeline (solana-labs#165)

(cherry picked from commit 3863bb1)

Co-authored-by: Yihau Chen <a122092487@gmail.com>
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.

1 participant