oneapi-src / oneapi-src/level-zero

[Question] Blocking calls for data transfers and kernel launch?

Open
#60 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
335
Forks
140
Avg merge
12h 32m
Merged PRs (30d)
5

Description

In the spec, it seems data transfers using this function

zeCommandListAppendMemoryCopy

are not blocking. Is there any variant for blocking calls? Or is there any equivalent to the OpenCL call clEnqueue{Read/Write}Buffer with CL_TRUE to indicate a blocking call?

Similar to the kernel launch, is there any way to specify a blocking call?

What I have found is to close a command lists, and then launch all pending command within the list after each data transfer or kernel launch. For example, by running the following sequence:

zeCommandListAppendMemoryCopy( .. )
zeCommandListClose( .. )
zeCommandQueueExecuteCommandLists ( .. )
zeCommandQueueSynchronize ( ..) 
zeCommandListReset ( .. )

but is there any other way to get blocking calls?

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

Review the Level Zero specification entries for zeCommandListAppendMemoryCopy, kernel launch, zeCommandListClose, zeCommandQueueExecuteCommandLists, zeCommandQueueSynchronize, and zeCommandListReset. Determine whether blocking variants or an equivalent to OpenCL's CL_TRUE are specified, then document the supported synchronization behavior and the completion criterion for each operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp
Domain
api
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.