[PR #281] Add memmove kernel (For linear combiner) #281

Open
opened 2026-10-26 22:22:25 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-kitchen/pull/281
Author: @rattus128
Created: 10/26/2026
Status: 🔄 Open

Base: main ← Head: prs/memmove-for-linear-merge


📝 Commits (2)

  • 3f46c9b Add memmove for overlapping device byte ranges
  • 7377a05 tests: memmove overlap cases

📊 Changes

10 files changed (+261 additions, -0 deletions)

View changed files

📝 comfy_kitchen/__init__.py (+10 -0)
📝 comfy_kitchen/backends/cuda/CMakeLists.txt (+1 -0)
📝 comfy_kitchen/backends/cuda/__init__.py (+9 -0)
📝 comfy_kitchen/backends/cuda/dlpack_bindings.cpp (+20 -0)
➕ comfy_kitchen/backends/cuda/ops/memmove.cu (+80 -0)
📝 comfy_kitchen/backends/hip/CMakeLists.txt (+1 -0)
📝 comfy_kitchen/backends/hip/__init__.py (+6 -0)
📝 comfy_kitchen/backends/hip/dlpack_bindings.cpp (+16 -0)
➕ comfy_kitchen/backends/hip/ops/memmove.hip (+80 -0)
➕ tests/test_memmove.py (+38 -0)

📄 Description

Add a kernel for in-place memmove of tensors. Useful for relaying out tensors already in VRAM without causing a VRAM allocation spike. Used by ComfyUI linear combiner.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-kitchen/pull/281 **Author:** [@rattus128](https://github.com/rattus128) **Created:** 10/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `prs/memmove-for-linear-merge` --- ### 📝 Commits (2) - [`3f46c9b`](https://github.com/Comfy-Org/comfy-kitchen/commit/3f46c9b1143511bc82dc39354a6ad51a326b27b7) Add memmove for overlapping device byte ranges - [`7377a05`](https://github.com/Comfy-Org/comfy-kitchen/commit/7377a05ca536da0aa4d17677f0673da683ed9f3e) tests: memmove overlap cases ### 📊 Changes **10 files changed** (+261 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `comfy_kitchen/__init__.py` (+10 -0) 📝 `comfy_kitchen/backends/cuda/CMakeLists.txt` (+1 -0) 📝 `comfy_kitchen/backends/cuda/__init__.py` (+9 -0) 📝 `comfy_kitchen/backends/cuda/dlpack_bindings.cpp` (+20 -0) ➕ `comfy_kitchen/backends/cuda/ops/memmove.cu` (+80 -0) 📝 `comfy_kitchen/backends/hip/CMakeLists.txt` (+1 -0) 📝 `comfy_kitchen/backends/hip/__init__.py` (+6 -0) 📝 `comfy_kitchen/backends/hip/dlpack_bindings.cpp` (+16 -0) ➕ `comfy_kitchen/backends/hip/ops/memmove.hip` (+80 -0) ➕ `tests/test_memmove.py` (+38 -0) </details> ### 📄 Description Add a kernel for in-place memmove of tensors. Useful for relaying out tensors already in VRAM without causing a VRAM allocation spike. Used by ComfyUI linear combiner. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-kitchen#281
No description provided.