Skip to content

[IDEA] GPU-side tiling and merging support #28

Description

@hamlet2019

Is your feature request related to a problem? Please describe.

I use tiler in a deployment pipeline to split large images into smaller patches before running model inference. As far as I understand, the current tiling and merging operations are handled on the CPU.

In my use case, the patches are eventually fed into a GPU model. This means data may need to move between CPU and GPU, and the tiling/merging steps can become a bottleneck, especially for large images or high-throughput inference workloads.

Describe the solution you'd like

It would be useful to support GPU-side tiling and merging, for example with PyTorch, CuPy, or another GPU array backend.

Ideally, the workflow could keep image tensors on the GPU throughout the pipeline:

large image tensor on GPU
→ split into patches on GPU
→ model inference on GPU
→ merge patches back on GPU
→ final output

This could reduce CPU-GPU data transfers and improve latency in deployment scenarios.

Additional context

This would be especially helpful for patch-based inference on large images, such as segmentation or restoration models, where overlapping patches need to be merged after inference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions