oneapi-src / oneapi-src/level-zero

Provide "dummy" backend for unit-testing application's L0 API usage

Open
#117 0 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 my own project, I've mocked every Sysman call used, so that I can verify code handling properly any of them working or erroring: https://github.com/collectd/collectd/blob/collectd-6.0/src/gpu_sysman_test.c

But it would be nice to avoid every L0 API user needing to duplicate the same work. Could level-zero frontend provide a dummy backend, that depending on e.g. env variable, either returns synthetized value according to some pre-determined formula (so that this value can be validated), or an error for the Nth Sysman call?

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

The issue links collectd's gpu_sysman_test.c; read that mock implementation first to understand the requested Sysman coverage. Then identify the Level Zero frontend/backend entry point, which the issue does not name, and determine how an environment selection could produce deterministic synthetic values or an error on the Nth call; done means L0 API users can exercise both paths without duplicating mocks.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, testing-qa
Issue type
Feature
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.