NVIDIA / NVIDIA/cccl

Deprecate / Remove old allocators

Open
#730 0 comments 1 reaction 0 assignees View on GitHub
thrust
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

Everything should be going through the new MR allocation layer.

# Overview

| Construct | Resolution | Replacement |
| ---- | ---- | ---- |
| `device_new_allocator` | Deprecate | `device_allocator` |
| `device_malloc_allocator` | Deprecate | `device_allocator` |
| `cuda::experimental::pinned_allocator` | Remove | `universal_host_pinned_allocator` |
| `detail::temporary_allocator` | Remove | `thrust::async` style temporary allocation |
| `detail::temporary_array` | Remove | `thrust::async` style temporary allocation |
| `thrust::(get/return)_temporary_buffer` | Remove | `thrust::async` style temporary allocation |
| `detail::malloc_allocator` | Remove | `host_allocator` |
| `detail::tagged_allocator` | Remove | (None, impl detail) |
| `device_free`/`device_malloc` | Keep | N/A |
| `device_new`/`device_delete` | Keep | N/A |

# Usages:

### `device_new_allocator`

Unused.

### `device_malloc_allocator`

- `vector.cu` (Unused include?)
- `uninitialized_copy.cu` (Unused include?)
- `uninitialized_fill.cu` (Unused include?)
- `allocator.cu`
- `vector_insert.cu`

### `device_new`

- `ASSERT_STATIC_ASSERT` in `runtime_static_assert`
- `device_make_unique`

### `device_malloc`

- `device_new`
- `testing/for_each.cu`
- `unwrap_pointer.cu`
- `examples/device_ptr.cu`
- `testing/adjacent_difference.cu`
- `testing/copy.cu`
- `cpp/adjacent_difference.cu`
- `cuda/adjacent_difference.cu`
- `testing/equal.cu`
- `testing/inner_product.cu`
- `testing/scan.cu` (unused?)
- `testing/uninitialized_fill.cu`

### `cuda::experimental::pinned_allocator`

- `pinned_allocator.cu`

### `temporary_allocator`

- `temporary_array`

### `get_temporary_buffer`

- `execute_with_allocator.h` defines `thrust::detail::(get|return)_temporary_buffer`
- Doc'd in `thrust/memory.h`
- dispatch logic in `detail/adl/temporary_buffer.h`
- `detail/generic/temporary_buffer.(h|inl)`
- `custom_temporary_allocation.cu` (mentioned in comments, but doesn't seem to actually be used at a glance)
- `allocator_aware_policies.cu`
- `cuda/memory.cu`
- `testing/memory.cu`

# Unresolved Issues

- [ ] Do we want to keep the `device_new`/`free`/`malloc` functions?
- [ ] Replacement for `temporary_allocator`?
- [ ] Keep or remove `temporary_array`?
- [ ] Keep or remove `(get|return)_temporary_buffer`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.