Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 933c5b4

Browse files
committed
Reintroduce host to the map. Can be removed after host device removal.
Signed-off-by: Larsen, Steffen <[email protected]>
1 parent c34a21c commit 933c5b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

SYCL/Regression/device_num.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ using namespace std;
1919
const std::map<info::device_type, std::string> DeviceTypeStringMap = {
2020
{info::device_type::cpu, "cpu"},
2121
{info::device_type::gpu, "gpu"},
22+
{info::device_type::host, "host"},
2223
{info::device_type::accelerator, "acc"}};
2324

2425
const std::map<backend, std::string> BackendStringMap = {
2526
{backend::opencl, "opencl"},
27+
{backend::host, "host"},
2628
{backend::ext_oneapi_level_zero, "ext_oneapi_level_zero"},
2729
{backend::ext_intel_esimd_emulator, "ext_intel_esimd_emulator"},
2830
{backend::ext_oneapi_cuda, "ext_oneapi_cuda"},
@@ -109,7 +111,8 @@ int GetPreferredDeviceIndex(const std::vector<device> &devices,
109111
const std::map<info::device_type, int> scoreByType = {
110112
{info::device_type::cpu, 300},
111113
{info::device_type::gpu, 500},
112-
{info::device_type::accelerator, 75}};
114+
{info::device_type::accelerator, 75},
115+
{info::device_type::host, 100}};
113116
int score = -1;
114117
int index = -1;
115118
int devCount = devices.size();

0 commit comments

Comments
 (0)