Skip to content

Implement logical and bitwise operators in CUDA#300

Open
lzyy2024 wants to merge 5 commits into
InfiniTensor:masterfrom
lzyy2024:logical-op
Open

Implement logical and bitwise operators in CUDA#300
lzyy2024 wants to merge 5 commits into
InfiniTensor:masterfrom
lzyy2024:logical-op

Conversation

@lzyy2024

@lzyy2024 lzyy2024 commented Sep 20, 2025

Copy link
Copy Markdown
  • Removed logical operators from element_wise.h and added them to a new logical.h file.
  • Created BinaryLogicalObj and UnaryLogicalObj classes for handling binary and unary logical operations.
  • Implemented CUDA kernels for logical operations including And, Or, Xor, BitwiseAnd, BitwiseOr, BitwiseXor, Not, BitwiseNot BitLeftShift, and BitRightShift.
  • Added corresponding unit tests for CUDA logical and bitwise kernels, ensuring functionality for both boolean and integer types.
  • Enhanced DataGenerator to support int8_t for boolean data type.
  • Updated op_type.cc to include new operator types and adjusted isBinary function accordingly.
f21ea2830bad1a18899317b1e2a6f0af

@lzyy2024

Copy link
Copy Markdown
Author

位移不算逻辑算子吧,去掉了

@lzyy2024

Copy link
Copy Markdown
Author
image

@bitzyz

bitzyz commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator

👍

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.

2 participants