oneapi-src / oneapi-src/unified-runtime

Investigate the need for urContextSetExtendedDeleter

Open
#713 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

specification
Dominant language
C++
Stars
57
Forks
120
Avg merge
1d 14h
Merged PRs (30d)
1

Description

The goal of this ticket is to gather information on urContextSetExtendedDeleter, and feedback on its uses and whether or not this API is still needed.

As far as I know the only place this is used is in some of the libraries such as oneMKL:

This PR has some explanation on how this scope handle deals with deletion, but doesn't completely explain why it was required in the first place.

Digging into DPC++ this was initially added specifically for the CUDA plugin:

However since then we switched to using the CUDA primary context for the CUDA plugin which removes a lot of the context management complexity:

Therefore it's possible that the oneMKL use-case could now be re-written in a way that doesn't need to extended deleters, and if that's the case and if no other backends needs this API maybe it would make sense to remove it (it might still be used for the HIP adapter, but we probably should align it to the CUDA adapter too).

Contributor guide

No contributing guide indexed for this repository

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 with the urContextSetExtendedDeleter API documentation and the oneMKL cublas_scope_handle.cpp usage, then review the linked oneMKL PR and DPC++ CUDA context-management PRs. Done means determining whether current backends still require extended deleters and recording whether the API should remain or be removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, backend-api-design
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.