Skip to content

Conversation

@tyoungsc
Copy link
Owner

No description provided.


////////////////////////////////////////////////////////////////////////////////
template <typename T, int n>
struct DataBundle {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not put DataBundle in a header file in the include directory?

Copy link
Owner Author

Choose a reason for hiding this comment

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

We could, but I want the idea to be that the memory utilities work with any bundle-esque class, where DataBundle is one example.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like the plan to make the memory utilities generic, but I still think providing this bundle class in a separate header would be useful.

class USMProducerID;
class USMConsumerID;

event SubmitBufferProducer(queue &q, buffer<int, 1> &in_buf, size_t count) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we also encapsulate these producers/consumers into a shared header? Don't you already have this in the FakeIOPipes?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I was trying to avoid having anything about SYCL queues in the shared header files.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think that's an important goal? I think if it's generically useful, which this clearly is, we should try to put it into the include directory. Maybe we isolate it into a special sub-directory?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I see them as orthogonal, but I understand the confusion because of what I named this project.

I think we should have a generic "bundle" class that has operator[] semantics, but that didn't end up being my goal here (despite the name, sorry).

The goal here is to make the MemoryToPipe and PipeToMemory, and don't think these methods should depend on a specific bundle type.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Wow. Early monday. My response makes no sense.

I have no problem throwing the actual kernels into the file, but I kind of like the user having to wrap all of our utilities in kernels. That way they know what they are submitting.

}

template<typename Pipe, typename PtrT>
void StreamToPipe(PtrT out_ptr, size_t count_div_elements_per_cycle) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be called PipeToMemory?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Ya. I messed up. Not too worried about names right now.

Copy link

@whitepau whitepau left a comment

Choose a reason for hiding this comment

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

The readme doesn't contain any info about using data_bundle to pass data in parallel through a pipe; I think that deserves a shout-out.



## Purpose
This tutorial demonstrates how a kernel in a DPC++ FPGA program transfers

Choose a reason for hiding this comment

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

Suggested change
This tutorial demonstrates how a kernel in a DPC++ FPGA program transfers
This tutorial demonstrates how a kernel in a DPC++ FPGA program streams

I would like to lean on the idea that pipes are streams. particularly with an eye to IP Authoring.

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.

4 participants