Skip to content

Gpu remove redundant copies#113

Merged
pthomadakis merged 3 commits into
dev-newfrom
gpu-remove-redundant-copies
Jun 27, 2025
Merged

Gpu remove redundant copies#113
pthomadakis merged 3 commits into
dev-newfrom
gpu-remove-redundant-copies

Conversation

@pthomadakis

Copy link
Copy Markdown
Collaborator

This PR partially resolves #112

  • First, the GPU kernel is examined and all load/store operations on any of its inputs are detected. Thus, we can track which arguments read, write or read-write the data provided by the host. As a result, the host can decide which data really need to be transferred to/from the device.
  • Second, we add a simple and conservative heuristic that tracks memrefs used in each GPU kernel launch operation and tries to remove redundant data transfers when the host does not access the data used/ produced by a previous kernel execution. (Assuming a single GPU)

…access required in a kernel (read/write/read-write)
…n the device (because of a previous operation).

Currently it's quite conservative as it does not track memref aliases and will just copy if an alias is detected.
@pthomadakis pthomadakis merged commit c8fa059 into dev-new Jun 27, 2025
3 checks passed
@pthomadakis pthomadakis deleted the gpu-remove-redundant-copies branch June 27, 2025 23:29
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.

1 participant