lava icon indicating copy to clipboard operation
lava copied to clipboard

Fix csp_port shape hack

Open PhilippPlank opened this issue 4 years ago • 5 comments

Currently a csp_port has a fixed shape to send data. Sometimes though, a "header" is additional needed, which is likely to have a different shape as the data.

Example:

Originally posted by @awintel in https://github.com/lava-nc/lava/pull/46#discussion_r748447199

PhilippPlank avatar Nov 15 '21 16:11 PhilippPlank

+1

We are running into similar issues.

mgkwill avatar Nov 16 '21 23:11 mgkwill

We could transmit header information via the token queue or flatten the arrays? Other suggestions?

awintel avatar Nov 16 '21 23:11 awintel

What are the requirements for Loihi with respect to channels? Would it be more efficient to internally create a second channel for the header information only, to keep the amount of data sent per read/write constant?

PhilippPlank avatar Nov 17 '21 13:11 PhilippPlank

For Loihi the Channel implementation will be different. We won't use PyPyChannels in this case but the lower level "Andrew"-CSP package as you know in which everything just gets serialized into flat bytes.

We could have a separate CSP channel increasing the number to 3 different things we have to transact information over. We might just use the Queue for that, which we already use to transact the synchronization tokes.

We should probably pull Harry into this discussion because we have to keep performance in mind.

awintel avatar Nov 17 '21 20:11 awintel