Tensor-Tensor Broadcasting in 1/2/3/ND for Bitwise operations#682
Merged
kiritigowda merged 99 commits intoROCm:developfrom Mar 27, 2026
Merged
Tensor-Tensor Broadcasting in 1/2/3/ND for Bitwise operations#682kiritigowda merged 99 commits intoROCm:developfrom
kiritigowda merged 99 commits intoROCm:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds tensor–tensor bitwise operations (AND/OR/XOR) with broadcasting support across 1D/2D/3D/ND for both HOST and HIP backends, and wires them into the test-suite (QA + perf).
Changes:
- Introduces new public APIs:
rppt_tensor_and_tensor,rppt_tensor_or_tensor,rppt_tensor_xor_tensorwithRpptBroadcastMode. - Adds new HOST and HIP kernel/executor implementations for tensor–tensor bitwise ops with broadcasting.
- Extends the test suite (cases, bit-depth modes, CLI args) and adds reference outputs.
Reviewed changes
Copilot reviewed 21 out of 29 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
api/rppt_tensor_bitwise_operations.h |
Declares new tensor–tensor bitwise APIs w/ broadcasting. |
api/rppdefs.h |
Adds RpptBitwiseOp, RpptBroadcastMode, new RpptDataType values, and RPPT_MAX_DIMS_SAMPLE. |
src/modules/tensor/rppt_tensor_bitwise_operations.cpp |
Implements new APIs and dispatches to HOST/HIP executors. |
src/modules/tensor/cpu/kernel/tensor_bitwise_binary_operations.cpp |
Adds HOST implementation for tensor–tensor bitwise ops incl. broadcasting. |
src/modules/tensor/hip/kernel/tensor_bitwise_binary_operations.cpp |
Adds HIP implementation for tensor–tensor bitwise ops incl. broadcasting. |
src/include/common/hip/rpp_hip_math.hpp |
Refactors bitwise math to generic templated ops (AND/OR/XOR). |
src/include/common/hip/rpp_hip_load_store.hpp |
Adds ushort/uint vector load/store helpers. |
utilities/test_suite/* files |
Adds new misc cases, broadcast flag plumbing, new bit-depth modes, and updates host/hip runners. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/modules/tensor/hip/kernel/tensor_bitwise_binary_operations.cpp
Outdated
Show resolved
Hide resolved
src/modules/tensor/hip/kernel/tensor_bitwise_binary_operations.cpp
Outdated
Show resolved
Hide resolved
src/modules/tensor/hip/kernel/tensor_bitwise_binary_operations.cpp
Outdated
Show resolved
Hide resolved
src/modules/tensor/hip/kernel/tensor_bitwise_binary_operations.cpp
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #682 +/- ##
===========================================
- Coverage 92.55% 92.42% -0.13%
===========================================
Files 206 208 +2
Lines 92763 93900 +1137
===========================================
+ Hits 85851 86783 +932
- Misses 6912 7117 +205
🚀 New features to boost your workflow:
|
rrawther
requested changes
Mar 18, 2026
Contributor
rrawther
left a comment
There was a problem hiding this comment.
please address the review comments
AryanSalmanpour
approved these changes
Mar 27, 2026
LakshmiKumar23
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds Tensor-Tensor Broadcasting functionality support for Bitwise operations HIP/HOST backend.