Skip to content

Feature Request: Bitwise Operations #768

@avloss

Description

@avloss

it seems that there is SOME support for bitwise operations in NumPy:
https://docs.scipy.org/doc/numpy/reference/generated/numpy.bitwise_xor.html
Bitwise operations are also supported by CUDA:
https://docs.nvidia.com/cuda/cuda-c-programming-guide/#warp-shuffle-functions
yet, the implementation of binary operation xor in PyTorch is
return (self + other).eq(1)
which takes two ByteTensor. My undertsanding is that this is inefficient, because only one Bit within every Byte of this tensor is actually encoding something. Please correct me if I'm wrong!!

for the record neither TensorFlow has bitwise operations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions