Skip to content

Commit

Permalink
[SYCL] Implement device arch comparison according to sycl_ext_oneapi_…
Browse files Browse the repository at this point in the history
…device_architecture spec update (#12752)

This patch implements device AOT and host APIs for device architecture
comparison in accordance to [spec
update](#12259)
  • Loading branch information
dm-vodopyanov authored Mar 6, 2024
1 parent 650528e commit 6844546
Show file tree
Hide file tree
Showing 8 changed files with 988 additions and 254 deletions.
11 changes: 11 additions & 0 deletions sycl/include/sycl/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,17 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase<device> {
/// the function.
bool ext_oneapi_architecture_is(ext::oneapi::experimental::architecture arch);

/// Indicates if the SYCL device architecture is in the category passed
/// to the function.
///
/// \param category is one of the architecture categories from arch_category
/// enum described in sycl_ext_oneapi_device_architecture specification.
///
/// \return true if the SYCL device architecture is in the category passed to
/// the function.
bool
ext_oneapi_architecture_is(ext::oneapi::experimental::arch_category category);

// TODO: Remove this diagnostics when __SYCL_WARN_IMAGE_ASPECT is removed.
#if defined(__clang__)
#pragma clang diagnostic pop
Expand Down
Loading

0 comments on commit 6844546

Please sign in to comment.