Parameter validation layer erroneously checks pCommandQueueGroupProperties

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

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
cpp
Domain
api, testing-qa

Research direction

Start at source/layers/validation/parameter_validation/ze_parameter_validation.cpp around line 292 and trace validation for zeDeviceGetCommandQueueGroupProperties(). Reproduce the call with the validation layer enabled, then verify that an application need not preinitialize ze_command_queue_group_properties_t::stype and that the function populates pCommandQueueGroupProperties without returning ZE_RESULT_ERROR_INVALID_ARGUMENT.

Written by the indexing model from the issue text.

Description

I'm seeing some unexpected behavior with the parameter validation layer enabled.

Expected behavior:

Calling zeDeviceGetCommandQueueGroupProperties() populates the memory pointed to by the pCommandQueueGroupProperties parameter.

Actual behavior:

Calling zeDeviceGetCommandQueueGroupProperties() returns ZE_RESULT_ERROR_INVALID_ARGUMENT.

Comments

The issue is that the validation layer expects the ze_command_queue_group_properties_t::stype field to be set by the application. However, it is the responsibility of the zeDeviceGetCommandQueueGroupProperties() function to initialize the data. The work-around is for the application to partially initialize the data by setting all ze_command_queue_group_properties_t::stype fields before calling zeDeviceGetCommandQueueGroupProperties().

I think this is the offending line, and I suspect the solution is just to remove it.

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

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.

More from oneapi-src/level-zero

All issues in oneapi-src/level-zero

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.