intel / intel/llvm

Refactor cl::sycl::info::device_type to allow bitwise operations internally

Open
#1,247 2 comments 0 reactions 0 assignees View on GitHub
confirmed enhancement good first issue
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

Current underlying values of `cl::sycl::info::device_type` do not lend themselves for bitwise operations.
```
enum class device_type : pi_uint64 {
cpu = PI_DEVICE_TYPE_CPU,
gpu = PI_DEVICE_TYPE_GPU,
accelerator = PI_DEVICE_TYPE_ACC,
// TODO: figure out if we need all the below in PI
custom = CL_DEVICE_TYPE_CUSTOM,
automatic,
host,
all = CL_DEVICE_TYPE_ALL
};
```
This leads to some unnecessarily complex logic of `cl::sycl::detail::match_types` and `cl::sycl::detail::force_types`, which could be merged into a single simpler method.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.