Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
aef8ca7
Implement extension for dpnp.choose
ndgrigorian Nov 26, 2024
5385707
Remove dead dpnp_choose code
ndgrigorian Nov 26, 2024
f3b68b4
unstack `choices` in `choose` when input is array
ndgrigorian Nov 26, 2024
7ee525c
Always unstack choices array regardless of dimension
ndgrigorian Nov 26, 2024
1a42b65
Do not allow choose tests to fallback to NumPy
ndgrigorian Nov 26, 2024
6784d96
Skip `test_choose_wrap` from CuPy tests
ndgrigorian Nov 26, 2024
a372de8
Factor `out` keyword validation and kernel run out of `choose`
ndgrigorian Nov 26, 2024
29067ed
pre-commit fixes
ndgrigorian Nov 26, 2024
3158fbb
Use `dpctl::tensor` scope for `ssize_t`
ndgrigorian Nov 26, 2024
a3dfd57
Use std::equal and get_size instead of loop over shape
ndgrigorian Dec 9, 2024
a41e858
Move first iteration of indices validation into loop
ndgrigorian Dec 9, 2024
15a921c
Use std::equal in loop over all choice arrays
ndgrigorian Dec 9, 2024
26cc0e0
Use unique_ptrs for temporary device allocations in choose
ndgrigorian Dec 9, 2024
28f4d10
Remove debug leftovers
ndgrigorian Dec 10, 2024
17b230e
Remove DPNP_FN_CHOOSE_EXT and DPNP_FN_CHOOSE
ndgrigorian Dec 10, 2024
1c311ac
Update choose docstring
ndgrigorian Dec 10, 2024
ec273dc
x -> a in choose
ndgrigorian Dec 10, 2024
520d763
Using issubdtype in choose integral indices check
ndgrigorian Dec 10, 2024
b9fc780
Use get_usm_allocations in choose
ndgrigorian Dec 10, 2024
8a32c37
choose method allows choices as keyword or positional argument
ndgrigorian Dec 10, 2024
eacf098
Remove unnecessary check_supported_arrays_type in choose
ndgrigorian Dec 10, 2024
5ad0067
Remove redundant get_usm_ndarray
ndgrigorian Dec 10, 2024
2b80aa6
Allow any Iterable object when building choices list
ndgrigorian Dec 10, 2024
205b1b0
Set rpath in indexing extension cmake
ndgrigorian Dec 10, 2024
0459c73
Add two examples to `choose`
ndgrigorian Dec 10, 2024
fcbcdd1
Make py_choose offsets constexpr
ndgrigorian Dec 10, 2024
bca0853
Adds new choose tests
ndgrigorian Dec 10, 2024
3125fe0
Fixes a bug for 0d inputs to choose and adds a test
ndgrigorian Dec 11, 2024
496d90c
Adds more tests for choose
ndgrigorian Dec 11, 2024
cbe923b
Remove unnecessary gws variable in choose kernel
ndgrigorian Dec 11, 2024
4e70b2b
Simplify _build_choices_list
ndgrigorian Dec 11, 2024
d56a76a
Tweaks to choose docstring
ndgrigorian Dec 11, 2024
00b9bb7
Add no_none=True to choose type matrix test
ndgrigorian Dec 11, 2024
bac8dac
Add take_along_axis to choose docstring and fix a typo
ndgrigorian Dec 11, 2024
9913bd8
Reduce choose dispatching code duplication
ndgrigorian Dec 11, 2024
338f0ae
Test choose with non-overlapping out and choose with invalid choice o…
ndgrigorian Dec 11, 2024
d4d72a0
Fix spacing in choose docstring
ndgrigorian Dec 12, 2024
981c079
Changes to choose docstring
ndgrigorian Dec 13, 2024
feac756
Use smart pointer utilities from dpctl
ndgrigorian Jan 8, 2025
ca26fbd
Use ChooseFunctor as choose kernel name
ndgrigorian Jan 8, 2025
92c6040
Break up _populate_choose_kernel_params
ndgrigorian Jan 28, 2025
7c9a987
Add assertion that NthStrideOffsetUnpacked struct is device copyable
ndgrigorian Feb 3, 2025
54676b9
Fix typos in choose docstring
ndgrigorian Feb 3, 2025
dd6e27e
Clarify choose method docstring
ndgrigorian Feb 3, 2025
6609637
Remove choose tests from skipped CUDA tests
ndgrigorian Feb 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add assertion that NthStrideOffsetUnpacked struct is device copyable
  • Loading branch information
ndgrigorian committed Feb 4, 2025
commit 7c9a987628dda4cad632f45c6f45402d643be5be
6 changes: 5 additions & 1 deletion dpnp/backend/extensions/indexing/choose_kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@
//*****************************************************************************

#pragma once

#include <algorithm>
#include <complex>
#include <cstdint>
#include <limits>
#include <sycl/sycl.hpp>
#include <type_traits>

#include <sycl/sycl.hpp>

#include "kernels/dpctl_tensor_types.hpp"
#include "utils/indexing_utils.hpp"
#include "utils/offset_utils.hpp"
Expand Down Expand Up @@ -71,6 +73,8 @@ struct NthStrideOffsetUnpacked
dpctl::tensor::ssize_t const *strides;
};

Comment thread
ndgrigorian marked this conversation as resolved.
static_assert(sycl::is_device_copyable_v<NthStrideOffsetUnpacked>);

} // namespace dpnp::extensions::indexing::strides_detail

namespace dpnp::extensions::indexing::kernels
Expand Down