Skip to content

[SYCL] Remove esimd_emulator from filters #12428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sycl/source/detail/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ getSyclDeviceTypeMap() {

// Array is used by SYCL_DEVICE_FILTER and SYCL_DEVICE_ALLOWLIST and
// ONEAPI_DEVICE_SELECTOR
// TODO: Remove esimd_emulator in the next ABI breaking window.
const std::array<std::pair<std::string, backend>, 8> &getSyclBeMap() {
static const std::array<std::pair<std::string, backend>, 8> SyclBeMap = {
{{"host", backend::host},
Expand Down
6 changes: 2 additions & 4 deletions sycl/source/detail/device_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,10 @@ ods_target_list::ods_target_list(const std::string &envStr) {
// 2. Filter backend match exactly with the given 'Backend'
bool ods_target_list::backendCompatible(backend Backend) {

bool isESIMD = Backend == backend::ext_intel_esimd_emulator;
return std::any_of(
TargetList.begin(), TargetList.end(), [&](ods_target &Target) {
backend TargetBackend = Target.Backend.value_or(backend::all);
return (TargetBackend == Backend) ||
(TargetBackend == backend::all && !isESIMD);
return (TargetBackend == Backend) || (TargetBackend == backend::all);
});
}

Expand Down Expand Up @@ -363,7 +361,7 @@ device_filter::device_filter(const std::string &FilterString) {
std::string Message =
std::string("Invalid device filter: ") + FilterString +
"\nPossible backend values are "
"{opencl,level_zero,cuda,hip,esimd_emulator,*}.\n"
"{opencl,level_zero,cuda,hip,*}.\n"
"Possible device types are {cpu,gpu,acc,*}.\n"
"Device number should be an non-negative integer.\n";
throw sycl::invalid_parameter_error(Message, PI_ERROR_INVALID_VALUE);
Expand Down
2 changes: 0 additions & 2 deletions sycl/source/detail/filter_selector_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ filter create_filter(const std::string &Input) {
Result.Backend = backend::ext_oneapi_cuda;
} else if (Token == "hip" && !Result.Backend) {
Result.Backend = backend::ext_oneapi_hip;
} else if (Token == "esimd_emulator" && !Result.Backend) {
Result.Backend = backend::ext_intel_esimd_emulator;
} else if (std::regex_match(Token, IntegerExpr) && !Result.DeviceNum) {
try {
Result.DeviceNum = std::stoi(Token);
Expand Down
2 changes: 2 additions & 0 deletions sycl/unittests/allowlist/ParseAllowList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ TEST(ParseAllowListTests, CheckMissingClosedDoubleCurlyBracesAreHandled) {
}
}

// TODO: Remove esimd_emulator from ExpectedValue in the next ABI
// breaking window.
TEST(ParseAllowListTests, CheckAllValidBackendNameValuesAreProcessed) {
std::string AllowList;
for (const auto &SyclBe : sycl::detail::getSyclBeMap()) {
Expand Down