mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
[CUDA] Implement DynamicSlice/DynamicSliceUpdate (#2533)
* Move DynamicSlice to gpu/primitives * Implement compute_dynamic_offset in CUDA
This commit is contained in:
@@ -46,6 +46,11 @@ struct KernelArgs {
|
||||
append_ptr(std::get<SmallVector<T>>(storage_.back()).data());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void append(const std::vector<T>& vec) {
|
||||
append(SmallVector<T>(vec.begin(), vec.end()));
|
||||
}
|
||||
|
||||
// Make sure the arg is copied to an array with size of NDIM.
|
||||
template <size_t NDIM = MAX_NDIM, typename T>
|
||||
void append_ndim(SmallVector<T> vec) {
|
||||
|
||||
Reference in New Issue
Block a user