Repository navigation
One host runtime, step 2: cuda-oxide adopts the root cuda-core types and cuda_core::simt goes away #1460
Copy link
Copy link
Open
Labels
cuda-oxideSIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, bookSIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, bookruntimeShared runtime crates: cuda-bindings, cuda-core, cuda-core-derive, cuda-async; Tile and SIMT co-ownShared runtime crates: cuda-bindings, cuda-core, cuda-core-derive, cuda-async; Tile and SIMT co-owntrackingUmbrella tracking issueUmbrella tracking issue
Milestone
Description
Remove the duplicate cuda_core::simt host runtime so Tile and SIMT code share allocation, context, stream, launch, and resource types. This builds on #1459 and coordinates with the async migration in #1461.
Requirements
- Share the allocation implementation and retain
DeviceBuffer<T>as the typed wrapper. Preserve owned, borrowed, foreign, and sliced storage semantics; coordinate borrowed subviews with feat(cuda-core): add borrowed DeviceBuffer subviews #1447. - Keep
DTypeandDeviceCopyindependent. UseDeviceCopyfor general raw-buffer operations,DTypefor tensor/scalar APIs, andDType + DeviceCopyonly where both contracts are needed. - Add the missing compatible scalar-wrapper
DeviceCopyimplementations:tf32,f8e4m3fn,f8e5m2,f8e8m0fnu,f8e5m3fnu, andf4e2m1fnx2, with safety justifications. - Implement
DeviceCopyforbooland keepbool: DType.booldoes not implementbytemuck::AnyBitPattern, and the safe reinterpreting casts (DeviceBuffer::cast_elem,DeviceBuffer::cast_chunks,Tensor::reinterpret) are bounded onAnyBitPattern, so aboolbuffer can only come from memory written asbool. This is Safe element casts can produce invalidboolvalues (Tensor::reinterpret,DeviceBuffer::cast_elem/cast_chunks) #1506 and lands before the rest of this issue. Storage and padding/packing policy for packed and sub-byte types are tracked in cuda-core: define boolean storage and element padding/packing policy #1503. - Migrate
CudaStreamto sharedStreamand unify the context API while keeping device and context identities distinct. Resolve the type model and any convenience pairing in cuda-core: distinguish CUDA devices and contexts in the shared host API #1504; coordinate global-context handling with Make with_global_device_context state explicit (Uninitialized | Available | Borrowed) #1403. - Do not implicitly synchronize GPU work on drop. Preserve resource lifetimes until submitted work completes, including early-dropped async work and borrowed views. Coordinate cleanup and lifetime changes with One host runtime, step 3: cuda-oxide adopts the root cuda-async types and cuda_async::simt goes away #1461.
Implementation
- Integrate shared typed storage and per-operation trait bounds, including
PinnedHostBuffer. - Migrate context, stream, event, module, and function users to the shared API defined by cuda-core: distinguish CUDA devices and contexts in the shared host API #1504.
- Share
LaunchConfigandlaunch_kernel*helpers while preserving launch modes, validation, and resource checks. - Specify the shared launch-query API signatures and implement them in independently reviewable changes.
- Reconcile
simt::vmm,peer,memory, andembeddedwith shared modules. - Implement completion-safe cleanup without synchronization on drop.
- Migrate cuda-oxide crates, examples, generated-project templates, and documentation. Retire or replace
check-host-api-paths.shwhen its SIMT-specific spelling is obsolete. - Move
simt_*tests into shared suites and deletecuda-core/src/simt/after consumers are migrated.
Acceptance
Both programming models use the shared types, and the temporary SIMT module is removed. Validate allocation identity and zero-copy sharing between a Tile tensor and a SIMT launch argument, including view offsets, context compatibility, ordering, and completion lifetimes. Cover positive and negative trait bounds and boolean validity. Document breaking API changes and their migration path.
Related: #1461 (async runtime), #1503 (element representation), #1504 (device/context model), #1505 (public namespaces), #1506 (bool and the safe casts).
Metadata
Metadata
Assignees
Labels
cuda-oxideSIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, bookSIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, bookruntimeShared runtime crates: cuda-bindings, cuda-core, cuda-core-derive, cuda-async; Tile and SIMT co-ownShared runtime crates: cuda-bindings, cuda-core, cuda-core-derive, cuda-async; Tile and SIMT co-owntrackingUmbrella tracking issueUmbrella tracking issue
Activity
nihalpasham commentedon Oct 9, 2026
@elibol, I agree that consolidation makes sense here, but my preference is we do this in stages. I need more time to work through it, as there are other items higher on the priority list (Tile-SIMT interop, cute-rs, Windows support etc.), so let’s take 0.5.0 off the table for this migration.
Quick question: is any of this currently blocking
cutile-rs? If there’s a specific part holding things up, we can discuss that separately. Otherwise, I’d like to keep this on the roadmap and work out where it fits alongside the other priorities.Some pieces look straightforward, and others need a little more thought:
LaunchConfig: Both versions contain the same fields, so sharing that type looks straightforward. We should preserve the existing launch checks and supported launch modes around it.DTypeandDeviceCopy: MakingDTyperequireDeviceCopylooks worth exploring. We need to reconcile their safety requirements—for example,DTypecurrently supportsbool, whileDeviceCopydeliberately excludes it.We can use this issue to work toward that design, then agree on the individual steps and timing before replacing or removing the existing SIMT APIs.