KomputeProject / kompute

General purpose GPU compute framework built on Vulkan to support 1000s of cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends). Blazing fast, mobile-enabled, asynchronous and optimized for advanced GPU data processing usecases. Backed by the Linux Foundation.
http://kompute.cc/
Apache License 2.0
1.88k stars 145 forks source link

Add tensor copy operations with region support #332

Open Crydsch opened 11 months ago

Crydsch commented 11 months ago

This PR adds the operations OpTensorCopyRegion, OpTensorSyncRegionDevice and OpTensorSyncRegionLocal. They behave similar to their non Region counterparts, but support copying only regions of a tensor.

I have also added a Test, illustrating their use. Each tensor is accompanied by a region (src, dst, size) to be copied. For the two sync operations this relates to each given tensor itself. For the copy operation this relates to the source tensor.

It is based on PR #329 and PR #331 so their commits are currently included as well. If they get merged I can rebase this PR.