Skip to content

Output Buffer Sharing between GPU and CPU #250

@OliverScherf

Description

@OliverScherf

Hello,

I'm working on a program that should use both CPU and GPU. I already opened an Issue where a similar question was answered. #229 The use case changed a bit, so I just open this issue.

I have the following scenario. I want to split up work between the CPU and GPU. They work mostly on the same input data, yet independent of each other. After the computation I want to merge the result of both CPU and GPU. But because CPU and GPU share the same physical memory, I want to avoid any unnecessary copies.
Note that the output values are independent of other output values.

The GPU would write to output[0 .. m], while the CPU would write to output[m .. n]
The result after the computation would be like this:
Output array: [0------GPU output------m---CPU output---n]

Is such a behavior possible? If yes, what do I need to consider while doing it?

Any help is much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions