Skip to content

[NFC][Driver] Refactor SYCLTargetInfoList init. #19414

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 2 commits into from
Jul 12, 2025
Merged

[NFC][Driver] Refactor SYCLTargetInfoList init. #19414

merged 2 commits into from
Jul 12, 2025

Conversation

bader
Copy link
Contributor

@bader bader commented Jul 11, 2025

Changed the logic from

if ( not NVPTX and not AMDGCN) {
  if (Intel) {
    // process Intel case
    continue;
  }
  // process targets which are not Intel, NVPTX or AMDGCN
} else {
  // process NVPTX and AMDGCN case
}

to more readable (in my opinion)

if (NVPTX or AMDGCN) {
  // process NVPTX and AMDGCN case
} else if (Intel) {
  // process Intel case
} else {
  // process targets which are not Intel, NVPTX or AMDGCN
}

Inside NVPTX and AMDGCN branch replaced

auto it = find_if(...);
if (it == end)
  ...

to

if (none_of(...))
  ...

Changed the logic from

```c++
if ( not NVPTX and not AMDGCN) {
  if (Intel) {
    // process Intel case
    continue;
  }
  // process targets which are not Intel, NVPTX or AMDGCN
} else {
  // process NVPTX and AMDGCN case
}
```

to more readable (in my opinion)

```c++
if (NVPTX or AMDGCN) {
  // process NVPTX and AMDGCN case
} else if (Intel) {
  // process Intel case
} else {
  // process targets which are not Intel, NVPTX or AMDGCN
}
```

Inside NVPTX and AMDGCN branch replaced
```c++
auto it = find_if(...);
if (it == end)
  ...
```
to
```c++
if (none_of(...))
  ...
```
@bader bader requested a review from a team as a code owner July 11, 2025 23:57
@bader
Copy link
Contributor Author

bader commented Jul 12, 2025

Hit Reduction/reduction_big_data.cpp failure from #15003 again. @cperkinsintel, FYI.

@bader bader merged commit bc273ff into intel:sycl Jul 12, 2025
24 of 25 checks passed
@bader bader deleted the flip branch July 12, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants