KhronosGroup / KhronosGroup/OpenCL-CTS

Get rid of gDeviceType

Open
#574 0 comments 0 reactions 0 assignees View on GitHub
bug cleanup/refactoring
Dominant language
C++
Stars
232
Forks
235
Avg merge
8d 7h
Merged PRs (30d)
18

Description

There are several issues surrounding this global variable, see discussions on https://github.com/KhronosGroup/OpenCL-CTS/pull/560 and #517.

The following seem to need addressing (this list needs refining):

- [x] Define and declare gDeviceType once in the common code. I would move this to test_common/harness/imageHelpers.{cpp,h}.
- [x] Get rid of checkDeviceTypeOverride (possibly moving some of the logging) and set gDeviceType in runTestHarnessWithCheck from device_type.
- [x] Remove all code setting gDeviceType in tests, possibly still accepting the command-line parameters for a transition period.
- [x] Remove all command line parameters used to declared a device type.
- [ ] Have tests get the device type from the queue provided by the framework or the device(s) they selected themselves.
- [ ] Change tests to they no longer test the device type bitfield for equality (see https://github.com/KhronosGroup/OpenCL-CTS/pull/597#discussion_r381917156)
- [ ] Deal with outcome of https://github.com/KhronosGroup/OpenCL-Docs/issues/224
- [ ] Modify the image helpers that use gDeviceType to take a device or device type as an argument.
- [ ] Remove the last remnants of gDeviceType.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with test_common/harness/imageHelpers.{cpp,h} and runTestHarnessWithCheck, then trace the remaining gDeviceType uses across the tests. Review the linked pull requests and OpenCL-Docs issue before refining the unchecked work. Done means the listed device-type handling is resolved and the last gDeviceType remnants are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.