oneapi-src / oneapi-src/unified-runtime

[Spec] `urUSMFree` is non conformant for CUDA, HIP adapters

Open
#2,782 4 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 description of urUSMFree notes:

Note that implementations are required to wait for previously enqueued commands that may be accessing pMem to finish before freeing the memory.

The CUDA and HIP adapters don't do any kind of dependency analysis to make sure that previously enqueued commands are complete before the native free is called. The OpenCL adapter seems to be the only adapter that gives blocking behaviour by using clMemBlockingFreeINTEL.

I suggest the spec is updated to not require urUSMFree to wait on previously enqueued commands to finish, and the OpenCL adapter can therefore use a simple clMemFreeINTEL, or that the CUDA and HIP adapters are updated to do some dependency analysis.

Ping @kbenzie @npmiller 😄

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 urUSMFree specification text and compare the CUDA, HIP, and OpenCL adapter implementations described in the issue. Resolve whether the specification or the adapters should change, then verify that the selected behavior is consistent across the affected adapters.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.