Skip to content

Add byte boolean frontend data type#302

Open
yeliu-oss wants to merge 1 commit into
NVIDIA:developfrom
yeliu-oss:codex/frontend-byte-boolean
Open

Add byte boolean frontend data type#302
yeliu-oss wants to merge 1 commit into
NVIDIA:developfrom
yeliu-oss:codex/frontend-byte-boolean

Conversation

@yeliu-oss

@yeliu-oss yeliu-oss commented Jun 10, 2026

Copy link
Copy Markdown

Add DataType_t::BYTE_BOOLEAN and map it to CUDNN_DATA_BYTE_BOOLEAN for cuDNN 9.30+. Update the boolean membound sample to use byte-backed boolean tensor storage on 9.30+ backends while keeping logical compute precision as BOOLEAN.

Summary by CodeRabbit

  • New Features
    • Added BYTE_BOOLEAN data type support with full serialization capabilities.
    • Implemented automatic version-aware detection to ensure compatibility with cuDNN 93000 and later.
    • Enhanced boolean operations to dynamically select optimal storage representation based on backend version.

Add DataType_t::BYTE_BOOLEAN and map it to CUDNN_DATA_BYTE_BOOLEAN for cuDNN 9.30+. Update the boolean membound sample to use byte-backed boolean tensor storage on 9.30+ backends while keeping logical compute precision as BOOLEAN.
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 40bc6743-1d26-40ff-aa54-8ef029fdea87

📥 Commits

Reviewing files that changed from the base of the PR and between 5bcf8d2 and 5050bd3.

📒 Files selected for processing (2)
  • include/cudnn_frontend_utils.h
  • samples/cpp/membound/boolean_fusion.cpp

📝 Walkthrough

Walkthrough

Added BYTE_BOOLEAN to the frontend DataType_t enum with complete cuDNN backend conversion support guarded by version checks (>= 93000), along with size and element-bit-count utilities. Updated the boolean_fusion test to conditionally select the new datatype based on runtime cuDNN version.

Changes

BYTE_BOOLEAN datatype support

Layer / File(s) Summary
DataType_t enum and JSON serialization
include/cudnn_frontend_utils.h
BYTE_BOOLEAN enumerator added to DataType_t with corresponding JSON serialization/deserialization mapping.
Backend conversion and size utilities
include/cudnn_frontend_utils.h
Frontend-to-backend conversion handles BYTE_BOOLEAN via CUDNN_DATA_BYTE_BOOLEAN with version guard, returning INVALID_VALUE on older cuDNN versions. Backend-to-frontend conversion reverses the mapping. Size and element-bit-count queries return appropriate values for the new type.
Test integration with boolean_fusion
samples/cpp/membound/boolean_fusion.cpp
Test selects BYTE_BOOLEAN when cuDNN compile-time and runtime versions both support it (>= 93000), defaulting to BOOLEAN otherwise. Graph intermediate and output nodes use the selected datatype.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

A byte-sized boolean hops into view,
With version guards to keep things true.
Frontend to backend, back again—
New types flow through the data zen. 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a new byte boolean frontend data type to the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant