Add bitwise ops (#1037)

* bitwise ops

* fix tests
This commit is contained in:
Awni Hannun
2024-04-26 22:03:42 -07:00
committed by GitHub
parent 67d1894759
commit 86f495985b
17 changed files with 568 additions and 58 deletions

View File

@@ -596,7 +596,7 @@ TEST_CASE("test op vjps") {
// Test power
{
auto fun = [](std::vector<array> inputs) {
return std::vector<array>{inputs[0] ^ inputs[1]};
return std::vector<array>{power(inputs[0], inputs[1])};
};
auto out = vjp(fun, {array(4.0f), array(3.0f)}, {array(1.0f)}).second;
CHECK_EQ(out[0].item<float>(), 48.0f);