Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

cuda-core: define boolean storage and element padding/packing policy

Open
#1,503 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
8/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Active
Tech stack
rust

Research direction

This is a design decision, not a starter task: the issue defers to the survey and proposed direction in its first comment and to #1506, #1460/#1461, #1401 and #1513. Read those first, then the DTypeId and DeviceCopy definitions and the bool handling they reference. Done means a written representation and cast policy that the maintainers accept, plus tests for invalid boolean encodings and supported packed layouts.

Written by the indexing model from the issue text.

Description

cuda-oxide cutile-rs interop runtime

Define a consistent storage and conversion policy for boolean, packed, and sub-byte element types. Logical dtype width, host storage layout, and Rust value validity impose different constraints on copies, casts, and readback.

Requirements

  • Document boolean storage as one byte per element holding 0x00 or 0x01, the Rust bool layout. There is no separate byte-backed boolean storage type: bool implements DeviceCopy, and the safe reinterpreting casts exclude it through the AnyBitPattern bound (#1506).
  • Specify conversions and validation between raw bytes, device boolean storage, and Rust bool. Safe APIs must not materialize invalid Rust boolean values.
  • Distinguish logical dtype width from host storage size/alignment. Specify element counts, byte extents, and explicit pack/unpack boundaries for packed and sub-byte types.
  • Define how padding, alignment, and initialized bytes affect copies, casts, and readback, including which guarantees belong to dtype metadata and which to the raw-buffer contract.
  • Apply the policy consistently to owned, borrowed, and foreign storage and document foreign-memory validity requirements.
  • Mark DTypeId #[non_exhaustive] so storage types can be added without breaking downstream matches.

Acceptance

Document the representation/cast policy and add coverage for invalid boolean encodings and supported packed layouts. Coordinate cast coverage with #1401.

The shared-runtime migration in #1460/#1461 implements DeviceCopy for bool and keeps bool: DType; the cast rule is #1506, and no new boolean representation is planned. The sub-byte, packed, and padded storage questions (shape semantics for packed types, nibble order, odd extents, DeviceCopy aggregate layout, DTypeId::size_in_bytes versus logical width) were filed as #1513 and are consolidated here; the survey and proposed direction are in the first comment.

Dominant language
Rust
Stars
3.7k
Forks
312
Avg merge
6d 5h
Merged PRs (30d)
68

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/cuda-rust

All issues in NVIDIA/cuda-rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.