Skip to content

Conversation

@aelovikov-intel
Copy link
Contributor

For the following code (note no submit, just bare minimum cgh.single_task):


int main() {
  int *p;
  sycl::detail::loop<2>([&](auto outer_idx) {
    sycl::detail::loop<200>([&](auto idx) {
      auto krn = [=]() { *p = 42; };
      auto s = [&](sycl::handler &cgh) { cgh.single_task(krn); };
      (void)sycl::detail::type_erased_cgfo_ty{s};
    });
  });
}

compiled as

$ time clang++ -isystem ~/sycl/build/include a.cpp -c -o /dev/null -Wno-deprecated

(to simulate host-only compilation), improves 3.4s -> 3.0s.

For the following code (note no submit, just bare minimum
`cgh.single_task`):

```

int main() {
  int *p;
  sycl::detail::loop<2>([&](auto outer_idx) {
    sycl::detail::loop<200>([&](auto idx) {
      auto krn = [=]() { *p = 42; };
      auto s = [&](sycl::handler &cgh) { cgh.single_task(krn); };
      (void)sycl::detail::type_erased_cgfo_ty{s};
    });
  });
}
```

compiled as

` $ time clang++ -isystem ~/sycl/build/include a.cpp -c -o /dev/null -Wno-deprecated`

(to simulate host-only compilation), improves 3.4s -> 3.0s.
@aelovikov-intel
Copy link
Contributor Author

Don't think affects CTS much [compared to general noise level at least].

@aelovikov-intel
Copy link
Contributor Author

RHEL build failure is unrelated, merging.

@aelovikov-intel aelovikov-intel merged commit ac30c32 into intel:sycl Mar 31, 2025
33 of 35 checks passed
@aelovikov-intel aelovikov-intel deleted the split-throw-on-misuse branch March 31, 2025 17:07
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.

3 participants