diff --git a/dev/generate-kernel-signatures.py b/dev/generate-kernel-signatures.py index 7b1c55c8e9..b0c8d9e27f 100644 --- a/dev/generate-kernel-signatures.py +++ b/dev/generate-kernel-signatures.py @@ -82,6 +82,8 @@ "awkward_Content_getitem_next_missing_jagged_getmaskstartstop", "awkward_index_rpad_and_clip_axis0", "awkward_index_rpad_and_clip_axis1", + "awkward_NumpyArray_subrange_equal", + "awkward_NumpyArray_subrange_equal_bool", "awkward_IndexedArray_flatten_nextcarry", "awkward_IndexedArray_flatten_none2empty", "awkward_IndexedArray_getitem_nextcarry", diff --git a/dev/generate-tests.py b/dev/generate-tests.py index 5e544ff36d..8b2364936b 100644 --- a/dev/generate-tests.py +++ b/dev/generate-tests.py @@ -867,6 +867,8 @@ def gencpuunittests(specdict): "awkward_Content_getitem_next_missing_jagged_getmaskstartstop", "awkward_index_rpad_and_clip_axis0", "awkward_index_rpad_and_clip_axis1", + "awkward_NumpyArray_subrange_equal", + "awkward_NumpyArray_subrange_equal_bool", "awkward_IndexedArray_flatten_nextcarry", "awkward_IndexedArray_flatten_none2empty", "awkward_IndexedArray_getitem_nextcarry", diff --git a/kernel-specification.yml b/kernel-specification.yml index 93c0859444..e77af28e97 100644 --- a/kernel-specification.yml +++ b/kernel-specification.yml @@ -543,7 +543,7 @@ kernels: k = k + 1 automatic-tests: true - - name: awkward_IndexedArray_local_preparenext + - name: awkward_IndexedArray_local_preparenext_64 specializations: - name: awkward_IndexedArray_local_preparenext_64 args: @@ -555,7 +555,7 @@ kernels: - {name: nextlen, type: "Const[int64_t]", dir: in, role: default} description: null definition: | - def awkward_IndexedArray_local_preparenext( + def awkward_IndexedArray_local_preparenext_64( tocarry, starts, parents, parentslength, nextparents, nextlen ): j = 0 diff --git a/kernel-test-data.json b/kernel-test-data.json index fffc631108..d462facaf2 100644 --- a/kernel-test-data.json +++ b/kernel-test-data.json @@ -16614,7 +16614,7 @@ ] }, { - "name": "awkward_IndexedArray_local_preparenext", + "name": "awkward_IndexedArray_local_preparenext_64", "status": true, "tests": [ { @@ -16639,7 +16639,7 @@ "nextparents": [0, 0, 0, 0, 1, 1, 1], "parentslength": 11, "parents": [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], - "starts": [0, 2, 5] + "starts": [0, 6] }, "outputs": { "tocarry": [0, 1, 2, 3, -1, -1, 4, 5, 6, -1, -1] @@ -26387,12 +26387,38 @@ "tmpptr": [0, 2, 2, 3, 5], "fromstarts": [0, 2, 3, 3], "fromstops": [2, 3, 3, 5], - "length": 4 + "length": 5 }, "outputs": { "toequal": [0] } }, + { + "error": false, + "message": "", + "inputs": { + "tmpptr": [0, 2, 2, 0, 2], + "fromstarts": [0, 2, 3, 3], + "fromstops": [2, 3, 3, 5], + "length": 5 + }, + "outputs": { + "toequal": [1] + } + }, + { + "error": false, + "message": "", + "inputs": { + "tmpptr": [0, 0, 0, 0, 0], + "fromstarts": [0, 2, 3, 3], + "fromstops": [2, 3, 3, 5], + "length": 5 + }, + "outputs": { + "toequal": [1] + } + }, { "error": false, "message": "", @@ -26406,6 +26432,32 @@ "toequal": [1] } }, + { + "error": false, + "message": "", + "inputs": { + "tmpptr": [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], + "fromstarts": [0, 2, 4, 6, 8, 10], + "fromstops": [2, 4, 6, 8, 10, 12], + "length": 6 + }, + "outputs": { + "toequal": [1] + } + }, + { + "error": false, + "message": "", + "inputs": { + "tmpptr": [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 2], + "fromstarts": [0, 2, 4, 6, 8, 10], + "fromstops": [2, 4, 6, 8, 10, 12], + "length": 6 + }, + "outputs": { + "toequal": [1] + } + }, { "error": false, "message": "", @@ -26418,6 +26470,19 @@ "outputs": { "toequal": [1] } + }, + { + "error": false, + "message": "", + "inputs": { + "tmpptr": [1, 2, 3, 4, 5, 6], + "fromstarts": [2, 2, 2, 2, 2, 2], + "fromstops": [4, 4, 4, 4, 4, 4], + "length": 6 + }, + "outputs": { + "toequal": [1] + } } ] }, @@ -26458,12 +26523,38 @@ "tmpptr": [0, 2, 2, 3, 5], "fromstarts": [0, 2, 3, 3], "fromstops": [2, 3, 3, 5], - "length": 4 + "length": 5 }, "outputs": { "toequal": [0] } }, + { + "error": false, + "message": "", + "inputs": { + "tmpptr": [0, 2, 2, 0, 2], + "fromstarts": [0, 2, 3, 3], + "fromstops": [2, 3, 3, 5], + "length": 5 + }, + "outputs": { + "toequal": [1] + } + }, + { + "error": false, + "message": "", + "inputs": { + "tmpptr": [0, 0, 0, 0, 0], + "fromstarts": [0, 2, 3, 3], + "fromstops": [2, 3, 3, 5], + "length": 5 + }, + "outputs": { + "toequal": [1] + } + }, { "error": false, "message": "", @@ -26477,6 +26568,32 @@ "toequal": [1] } }, + { + "error": false, + "message": "", + "inputs": { + "tmpptr": [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], + "fromstarts": [0, 2, 4, 6, 8, 10], + "fromstops": [2, 4, 6, 8, 10, 12], + "length": 6 + }, + "outputs": { + "toequal": [1] + } + }, + { + "error": false, + "message": "", + "inputs": { + "tmpptr": [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 2], + "fromstarts": [0, 2, 4, 6, 8, 10], + "fromstops": [2, 4, 6, 8, 10, 12], + "length": 6 + }, + "outputs": { + "toequal": [1] + } + }, { "error": false, "message": "", @@ -26489,6 +26606,19 @@ "outputs": { "toequal": [1] } + }, + { + "error": false, + "message": "", + "inputs": { + "tmpptr": [1, 2, 3, 4, 5, 6], + "fromstarts": [2, 2, 2, 2, 2, 2], + "fromstops": [4, 4, 4, 4, 4, 4], + "length": 6 + }, + "outputs": { + "toequal": [1] + } } ] }, diff --git a/src/awkward/contents/indexedarray.py b/src/awkward/contents/indexedarray.py index c5e6524733..bdb2bb5fb2 100644 --- a/src/awkward/contents/indexedarray.py +++ b/src/awkward/contents/indexedarray.py @@ -838,9 +838,10 @@ def _unique(self, negaxis, starts, parents, outlength): and parents.nplike is self._backend.index_nplike and nextparents.nplike is self._backend.index_nplike ) + self._backend.maybe_kernel_error( self._backend[ - "awkward_IndexedArray_local_preparenext", + "awkward_IndexedArray_local_preparenext_64", nextoutindex.dtype.type, starts.dtype.type, parents.dtype.type, diff --git a/src/awkward/contents/indexedoptionarray.py b/src/awkward/contents/indexedoptionarray.py index 408f4b3028..e296b2fdab 100644 --- a/src/awkward/contents/indexedoptionarray.py +++ b/src/awkward/contents/indexedoptionarray.py @@ -983,9 +983,10 @@ def _unique(self, negaxis, starts, parents, outlength): and parents.nplike is self._backend.index_nplike and nextparents.nplike is self._backend.index_nplike ) + self._backend.maybe_kernel_error( self._backend[ - "awkward_IndexedArray_local_preparenext", + "awkward_IndexedArray_local_preparenext_64", nextoutindex.dtype.type, starts.dtype.type, parents.dtype.type, @@ -1258,9 +1259,10 @@ def _argsort_next( and parents.nplike is self._backend.index_nplike and nextparents.nplike is self._backend.index_nplike ) + self._backend.maybe_kernel_error( self._backend[ - "awkward_IndexedArray_local_preparenext", + "awkward_IndexedArray_local_preparenext_64", nextoutindex.dtype.type, starts.dtype.type, parents.dtype.type, @@ -1342,7 +1344,7 @@ def _sort_next(self, negaxis, starts, parents, outlength, ascending, stable): self._backend.maybe_kernel_error( self._backend[ - "awkward_IndexedArray_local_preparenext", + "awkward_IndexedArray_local_preparenext_64", nextoutindex.dtype.type, starts.dtype.type, parents.dtype.type,