fix(BACKEND-ROCM): bind resource operations to the requested device
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 423
- Forks
- 53
- Avg merge
- 20h 26m
- Merged PRs (30d)
- 310
Description
Row: BACKEND-ROCM
ROCm resource methods use the ambient HIP device instead of their recorded device index. At base 6db4bef906859e864c82523c01107473f7dcca29, src/vt/rocm/rocm_backend.hip:220-284 calls hipMalloc, hipStreamCreate, hipMemsetAsync, hipMemcpyAsync, and hipStreamSynchronize without selecting device_ or the queue device. The backend registers no DeviceResourceOps override for vt::Alloc(Device, ...). The introducing source history is 50b0709b3.
A native MoE boundary test on two local gfx1100 devices exposed this assumption. Device-1-labeled buffers were constructed while device 0 remained current. The operator run returned 1 with three failed comparisons in the null-default-stream case. The other six cases passed. Untouched 0x5555 buffers and invalid reference values identify invalid test resource placement, not a valid native-kernel numerical result. An isolated allocation-device probe remains required before accepting the precise runtime diagnosis.
Owner: BACKEND-ROCM, resource and queue device ownership. The new MoE component test must explicitly allocate, copy, and build its reference on each intended device before testing native operation device selection. That scoped harness adaptation does not establish full-model execution on multiple GPUs.
Acceptance requires a committed spec, a red test through the shared resource API with a deliberately different ambient device, verified pointer and stream ownership, preserved ambient-device restoration, and correct default-stream copy and synchronization. Cover two devices, host threads, existing single-device behavior, and graph lifetimes. Run the pinned primary oracle for applicable resource behavior, fresh mutation review, and operator GPU gates. Keep native provider and resource ownership claims separate.
Local reproduction: /home/vikash/vllm.cpp-rdna3-moe-impl/build-rdna3-moe-hip/evidence/native-boundary-1.log and its operator receipt. Binary SHA256: 124546db69241940fd5ee88fb26cf71d6053a1dab7ad425915d0422dfc4854f2. The run held /home/vikash/gpu.lock, exposed local devices 0 and 1, and ran on 9 September 2026 UTC.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/vt/rocm/rocm_backend.hip:220-284 and inspect the shared resource API and the missing DeviceResourceOps registration for vt::Alloc(Device, ...). Run the isolated allocation-device probe before relying on the native MoE boundary result. Done requires a red two-device test covering pointer and stream ownership, ambient-device restoration, default-stream copies and synchronization, host threads, single-device behavior, and graph lifetimes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, testing-qa
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100