ExpandDims primitive (#1687)

* add squeeze primitive

* simplify squeeze, use in gather

* fix

* fix

* fix

* fix

* fix no cpu

* use squeeze in matmul and friends

* expand dims primitive

* comment
This commit is contained in:
Awni Hannun
2024-12-10 16:39:07 -08:00
committed by GitHub
parent 310ad8d9db
commit f76a49e555
13 changed files with 373 additions and 184 deletions

View File

@@ -1835,6 +1835,9 @@ TEST_CASE("test broadcast") {
}
TEST_CASE("test gather") {
// Empty input, non-empty indices/slice
CHECK_THROWS(gather(array({}), array({1}), 0, {1}));
// More indices than dimensions
CHECK_THROWS(gather(array(0), array({1}), 0, {1}));