Skip to content

CAGRA tech debt: distance descriptor and workspace memory#436

Merged
rapids-bot[bot] merged 5 commits intorapidsai:branch-24.12from
achirkin:enh-cagra-ddesc-and-memres-debt
Nov 6, 2024
Merged

CAGRA tech debt: distance descriptor and workspace memory#436
rapids-bot[bot] merged 5 commits intorapidsai:branch-24.12from
achirkin:enh-cagra-ddesc-and-memres-debt

Conversation

@achirkin
Copy link
Copy Markdown
Contributor

This PR introduces two changes:

  1. Refactor dataset_descriptor_host to pass and cache it by value while keeping the state in a thread-safe object in a shared pointers. Before this, the descriptor host itself was kept in shared pointer in LRU cache and was passed by reference; as a result, it could in theory die due to cache eviction while still being used via references to it.
  2. Adjust the temporary buffers to always use the workspace resource in all CAGRA algo implementations (as of now, only SINGLE_CTA algo does this; the PR expands the change to MULTI_CTA and MULTI_KERNEL).

Both of the changes are required for effective use of stream-ordered dynamic batching #261 (1. fixes crashes and 2. fixes thread-blocking behavior).

@achirkin achirkin added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Oct 30, 2024
@achirkin achirkin requested a review from a team as a code owner October 30, 2024 15:48
@github-actions github-actions Bot added the cpp label Oct 30, 2024
@achirkin achirkin self-assigned this Oct 30, 2024
@achirkin
Copy link
Copy Markdown
Contributor Author

achirkin commented Nov 6, 2024

/merge

@rapids-bot rapids-bot Bot merged commit 6b35b65 into rapidsai:branch-24.12 Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cpp improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants