oneapi-src / oneapi-src/unified-memory-framework

Replace critnib with a RAVL tree to track allocations in providers

Open
#1,045 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
98
Forks
48
Avg merge
3d 20h
Merged PRs (30d)
6

Description

This is a rough idea - I'm not 100% sure that this solution will not have any disadvantages.

Currently, on every split or merge, we add and remove entries from critnib structures to track allocations at various levels. This proposal suggests replacing those structures with a RAVL tree instead.

A key advantage of using a RAVL tree is the ability to search for a key that is equal to or lower than a specified value. After a split, this feature allows reusing the original entry in the tree, eliminating the need to update it. As a result, overall performance is improved by reducing the overhead of frequent insertions and deletions. In addition, a RAVL tree will be smaller, which further enhances search times.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the provider allocation-tracking code that currently uses critnib structures, then review how split and merge operations add and remove entries. Evaluate whether a RAVL tree supports the proposed lower-or-equal-key lookup without introducing disadvantages. Done means a justified implementation or decision, with performance and correctness validated for allocation tracking.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
backend, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.