-
Notifications
You must be signed in to change notification settings - Fork 113
Introduce State Passing Between Operators #2802
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
Merged
Merged
Changes from all commits
Commits
Show all changes
203 commits
Select commit
Hold shift + click to select a range
3af95b0
init
aglinxinyuan 6c17a01
Merge branch 'master' into xinyuan-marker
aglinxinyuan c5208d7
fix format
aglinxinyuan a4c75c4
Merge remote-tracking branch 'origin/xinyuan-marker' into xinyuan-marker
aglinxinyuan 6830a06
fix format
aglinxinyuan c40fb17
Merge branch 'master' into xinyuan-marker
aglinxinyuan 8f3975b
rename
aglinxinyuan 7bb8c7e
Merge branch 'master' into xinyuan-marker
aglinxinyuan c1f48bf
fix fmt
aglinxinyuan 7e40798
update
aglinxinyuan 6ac2e71
Merge branch 'master' into xinyuan-marker
aglinxinyuan 775aff2
Merge branch 'master' into xinyuan-marker
aglinxinyuan a2e9f34
Merge branch 'master' into xinyuan-marker
aglinxinyuan 91beb72
Merge branch 'master' into xinyuan-marker
aglinxinyuan e7bab7f
add string serialization and test program
shengquan-ni e196f74
Merge branch 'master' into xinyuan-marker
aglinxinyuan 6fb5466
update
aglinxinyuan 772fbf7
update serialization
shengquan-ni 7fd673e
Merge branch 'master' into xinyuan-marker
aglinxinyuan 289787c
update
aglinxinyuan 4ccf968
Merge branch 'master' into xinyuan-marker
aglinxinyuan 3904018
update
aglinxinyuan 58d6afd
update
aglinxinyuan d32b4f1
Merge branch 'master' into xinyuan-marker
aglinxinyuan ab8d438
Merge branch 'master' into xinyuan-marker
aglinxinyuan 49a321d
update
aglinxinyuan 5020377
update
aglinxinyuan 20800ea
Merge branch 'master' into xinyuan-marker
aglinxinyuan bba1714
Merge branch 'master' into xinyuan-marker
aglinxinyuan 02f420f
update
aglinxinyuan e50ad09
update
aglinxinyuan c2ede6b
Merge branch 'master' into xinyuan-marker
aglinxinyuan 332aa0c
Merge branch 'master' into xinyuan-marker
aglinxinyuan 7c27f69
Merge branch 'master' into xinyuan-marker
aglinxinyuan 6981ea1
fix
aglinxinyuan 2c0c8d4
fix
aglinxinyuan a4e4982
fix fmt
aglinxinyuan f5aeeb9
Merge branch 'master' into xinyuan-marker
aglinxinyuan e47dc9d
update
aglinxinyuan 8cbb603
update
aglinxinyuan 4d4babc
update
aglinxinyuan bcad4bf
update
aglinxinyuan 98e98eb
update
aglinxinyuan 7286df5
Revert "update"
aglinxinyuan b617d62
update
aglinxinyuan 812706f
update
aglinxinyuan e6e93a6
update
aglinxinyuan cdf0d88
update
aglinxinyuan 9749cdb
update
aglinxinyuan 82367aa
update
aglinxinyuan 8402750
update
aglinxinyuan 7addf6e
update
aglinxinyuan 81b72c4
update
aglinxinyuan 6c403b8
update
aglinxinyuan 5931bb0
update
aglinxinyuan c77bc97
update
aglinxinyuan a64df1f
Merge branch 'master' into xinyuan-marker
aglinxinyuan 4a984b2
update
aglinxinyuan 85a7e07
update
aglinxinyuan 03a44f6
update
aglinxinyuan a5a27f6
update
aglinxinyuan dd623cf
update
aglinxinyuan ab2f9b0
update
aglinxinyuan eed3433
update
aglinxinyuan ca8d36b
update
aglinxinyuan cb5eecb
update
aglinxinyuan 30d4695
update
aglinxinyuan 4822bbe
update
aglinxinyuan 79856ba
update
aglinxinyuan ca02b6d
update
aglinxinyuan 1122caf
update
aglinxinyuan 5472101
update
aglinxinyuan 234e83b
update
aglinxinyuan 526b495
update
aglinxinyuan 3773ca1
update
aglinxinyuan 0b19214
Merge branch 'master' into xinyuan-marker
aglinxinyuan 1ff31d1
update
aglinxinyuan 72c873d
update
aglinxinyuan b9dd6ab
update
aglinxinyuan 0ee5fd3
update
aglinxinyuan d0acbbb
update
aglinxinyuan 66b3928
update
aglinxinyuan 78f3259
update
aglinxinyuan bd83627
Merge branch 'master' into xinyuan-marker
aglinxinyuan e177765
Merge branch 'master' into xinyuan-marker
aglinxinyuan dfcfa69
fix fmt
aglinxinyuan daf7615
fix fmt
aglinxinyuan 1add5d2
fix fmt
aglinxinyuan 11381c0
update
aglinxinyuan 484feda
update
aglinxinyuan eb60922
init
aglinxinyuan 25468fa
update
aglinxinyuan 995b6d5
update
aglinxinyuan 92b3c95
update
aglinxinyuan ad874a9
update
aglinxinyuan 770deba
update
aglinxinyuan fc38808
update
aglinxinyuan df3a3ab
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 3da62d8
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 64197e2
update
aglinxinyuan b636546
update
aglinxinyuan 7750b7f
update
aglinxinyuan ab93577
update
aglinxinyuan d08a830
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 86282de
update
aglinxinyuan 7ceea09
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 4fb386c
update
aglinxinyuan f3d7336
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 693ac00
update
aglinxinyuan 823919d
update
aglinxinyuan 436e113
update
aglinxinyuan 4773020
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 4a606e4
update
aglinxinyuan 8ddea2c
update
aglinxinyuan ce832ff
update
aglinxinyuan ffe9d26
update
aglinxinyuan a60f562
update
aglinxinyuan 27a40fc
update
aglinxinyuan a88edd1
update
aglinxinyuan 79a4e8f
update
aglinxinyuan 4c422f2
update
aglinxinyuan 00c1504
update
aglinxinyuan 205d589
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 51dff7d
update
aglinxinyuan bbffbbe
update
aglinxinyuan e0d6056
update
aglinxinyuan fdbc91f
update
aglinxinyuan e5c9cf5
update
aglinxinyuan 20f9c02
update
aglinxinyuan f9c201b
update
aglinxinyuan 5254aa7
update
aglinxinyuan 067247f
update
aglinxinyuan 13eafe0
update
aglinxinyuan 1887bfb
update
aglinxinyuan 083e866
update
aglinxinyuan 87e305a
update
aglinxinyuan 59aa9a9
update
aglinxinyuan d603c41
update
aglinxinyuan 30be7db
fix format
aglinxinyuan 4cc7e76
fix format
aglinxinyuan dbe435d
fix format
aglinxinyuan fdee773
fix test
aglinxinyuan e4594a8
fix test
aglinxinyuan 760b590
fix fmt
aglinxinyuan a2783f3
fix fmt
aglinxinyuan 809a9af
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 4e8c027
update
aglinxinyuan fdf68df
update
aglinxinyuan f0e028e
fix fmt
aglinxinyuan efa22ff
update
aglinxinyuan e3ff682
update
aglinxinyuan f4f5318
fix fmt
aglinxinyuan 2e136f2
fix fmt
aglinxinyuan cff6f57
fix fmt
aglinxinyuan 6372288
update
aglinxinyuan 990a720
update
aglinxinyuan 6e50be1
update
aglinxinyuan 8889e61
update
aglinxinyuan 183d21d
fix
aglinxinyuan a0a34a1
fix
aglinxinyuan 3316f47
fix
aglinxinyuan e0a856b
fix
aglinxinyuan 4eb0564
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan d91c167
fix
aglinxinyuan 600934f
fix
aglinxinyuan 7f511df
fix
aglinxinyuan 47f88e6
fix
aglinxinyuan bf159cc
fix
aglinxinyuan a1ead8f
fix
aglinxinyuan 4800620
fix
aglinxinyuan c454017
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 64b28f2
update
aglinxinyuan 13b4dae
update
aglinxinyuan d4d2a48
update
aglinxinyuan 38e57cc
update
aglinxinyuan f5b02cf
update
aglinxinyuan dbe12a0
update
aglinxinyuan 6903721
update
aglinxinyuan 4045d2f
update
aglinxinyuan c471697
update
aglinxinyuan 18da3a5
Revert "update"
aglinxinyuan c60e606
update
aglinxinyuan 96230f7
rename StartOfUpstream
aglinxinyuan c5632a3
rename EndOfUpstream
aglinxinyuan 7e4d937
fix fmt
aglinxinyuan 12dabe6
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 8989a26
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 1018814
update
aglinxinyuan 485a143
update
aglinxinyuan a97b49d
update
aglinxinyuan 52196b9
update
aglinxinyuan bda1ffc
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 6873652
update
aglinxinyuan fea6543
Merge remote-tracking branch 'origin/xinyuan-state-passing' into xiny…
aglinxinyuan 3fad565
update
aglinxinyuan b816ad4
update
aglinxinyuan 2f85274
update
aglinxinyuan 6e92ee4
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 901e3ea
update
aglinxinyuan 216dea8
fix fmt
aglinxinyuan d534956
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan 053eca6
update
aglinxinyuan 5828053
Merge branch 'master' into xinyuan-state-passing
aglinxinyuan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
core/amber/src/main/python/core/architecture/managers/marker_processing_manager.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| from typing import Optional | ||
| from core.models.marker import State, Marker | ||
|
|
||
|
|
||
| class MarkerProcessingManager: | ||
| def __init__(self): | ||
| self.current_input_marker: Optional[Marker] = None | ||
| self.current_output_state: Optional[State] = None | ||
|
|
||
| def get_input_marker(self) -> Optional[State]: | ||
| ret, self.current_input_marker = self.current_input_marker, None | ||
| return ret | ||
|
|
||
| def get_output_state(self) -> Optional[State]: | ||
| ret, self.current_output_state = self.current_output_state, None | ||
| return ret |
20 changes: 14 additions & 6 deletions
20
core/amber/src/main/python/core/architecture/managers/tuple_processing_manager.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,29 @@ | ||
| from threading import Event, Condition | ||
| from typing import Optional, Union, Tuple, Iterator | ||
| from typing import Optional, Tuple, Iterator | ||
|
|
||
| from core.models import InputExhausted | ||
| from proto.edu.uci.ics.amber.engine.common import PortIdentity | ||
|
|
||
|
|
||
| class TupleProcessingManager: | ||
| def __init__(self): | ||
| self.current_input_tuple: Optional[Union[Tuple, InputExhausted]] = None | ||
| self.current_input_tuple: Optional[Tuple] = None | ||
| self.current_input_port_id: Optional[PortIdentity] = None | ||
| self.current_input_tuple_iter: Optional[ | ||
| Iterator[Union[Tuple, InputExhausted]] | ||
| ] = None | ||
| self.current_input_tuple_iter: Optional[Iterator[Tuple]] = None | ||
| self.current_output_tuple: Optional[Tuple] = None | ||
| self.context_switch_condition: Condition = Condition() | ||
| self.finished_current: Event = Event() | ||
|
|
||
| def get_input_tuple(self) -> Optional[Tuple]: | ||
| ret, self.current_input_tuple = self.current_input_tuple, None | ||
| return ret | ||
|
|
||
| def get_output_tuple(self) -> Optional[Tuple]: | ||
| ret, self.current_output_tuple = self.current_output_tuple, None | ||
| return ret | ||
|
|
||
| def get_input_port_id(self) -> int: | ||
| port_id = self.current_input_port_id | ||
| # no upstream, special case for source executor. | ||
| if port_id is None: | ||
| return 0 | ||
| return port_id.id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.