oneapi-src/level-zero

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

eero-t opened this issue · 0 comments

eero-t commented

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?