Skip to content
Open
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Removed stale `select_host_device` and `has_host_device` names from `dpctl.__all__`, which made `from dpctl import *` fail with `AttributeError` [gh-2410](https://github.com/IntelPython/dpctl/pull/2410)

### Maintenance
* Removed compiler version checks made obsolete by the DPC++ 2026.0 minimum [gh-2415](https://github.com/IntelPython/dpctl/pull/2415)

## [0.23.0] - Oct. 22, 2026

Expand Down
3 changes: 2 additions & 1 deletion dpctl/tests/_device_attributes_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,8 @@ def check_device_type(device):
def check_max_clock_frequency(device):
freq = device.max_clock_frequency
assert isinstance(freq, int)
# FIXME: Change to freq > 0 after transition to 2024.1
# The value may be 0, e.g. the OpenCL CPU device (runtime 2026.22) reports
# 0 under WSL, where /sys/devices/system/cpu/*/cpufreq is not available
assert freq >= 0


Expand Down
4 changes: 0 additions & 4 deletions libsyclinterface/source/dpctl_sycl_device_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@ DPCTLDevice__GetMaxWorkItemSizes(__dpctl_keep const DPCTLSyclDeviceRef DRef)
auto D = unwrap<device>(DRef);
if (D) {
try {
#if __SYCL_COMPILER_VERSION >= __SYCL_COMPILER_MAX_WORK_ITEM_SIZE_THRESHOLD
auto id_sizes =
D->get_info<info::device::max_work_item_sizes<dim>>();
#else
auto id_sizes = D->get_info<info::device::max_work_item_sizes>();
#endif
sizes = new size_t[dim];
for (auto i = 0ul; i < dim; ++i) {
sizes[i] = id_sizes[i];
Expand Down
62 changes: 2 additions & 60 deletions libsyclinterface/source/dpctl_sycl_kernel_bundle_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,53 +967,7 @@ const char *DPCTLKernelBuildLog_Get(__dpctl_keep DPCTLKernelBuildLogRef Ref)

namespace syclex = sycl::ext::oneapi::experimental;

#if defined(SYCL_EXT_ONEAPI_KERNEL_COMPILER) && \
defined(__SYCL_COMPILER_VERSION) && !defined(SUPPORTS_SYCL_COMPILATION)
// SYCL source code compilation is supported from 2025.1 onwards.
#if __SYCL_COMPILER_VERSION >= 20250317u
#define SUPPORTS_SYCL_COMPILATION 1
#else
#define SUPPORTS_SYCL_COMPILATION 0
#endif
#endif

bool DPCTLKernelBundle_CreateFromSYCLSource_Available()
{
#if (SUPPORTS_SYCL_COMPILATION > 0)
return true;
#else
return false;
#endif
}

#if (SUPPORTS_SYCL_COMPILATION > 0)
// The property for registering names was renamed between DPC++ versions 2025.1
// and 2025.2. The original name was `registered_kernel_names`, the new name is
// `registered_names`. To select the correct name without being overly reliant
// on the SYCL compiler version definition, we forward declare both names and
// then select the new name if it is defined (i.e., not only declared).
namespace sycl::ext::oneapi::experimental
{
struct registered_names;
struct registered_kernel_names;
} // namespace sycl::ext::oneapi::experimental

template <typename NewT, typename FallbackT, typename = void>
struct new_type_if_defined
{
using type = FallbackT;
};

template <typename NewT, typename FallbackT>
struct new_type_if_defined<NewT, FallbackT, std::void_t<decltype(sizeof(NewT))>>
{
using type = NewT;
};

using registered_names_property_t =
new_type_if_defined<syclex::registered_names,
syclex::registered_kernel_names>::type;
#endif
bool DPCTLKernelBundle_CreateFromSYCLSource_Available() { return true; }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the sake of AdaptiveCpp builds, we will need to keep some conditions in here gating from extensions polluting the build unguarded.

May be fine to make that work in the AdaptiveCpp build PR though


__dpctl_give DPCTLSyclKernelBundleRef DPCTLKernelBundle_CreateFromSYCLSource(
__dpctl_keep const DPCTLSyclContextRef Ctx,
Expand All @@ -1024,7 +978,6 @@ __dpctl_give DPCTLSyclKernelBundleRef DPCTLKernelBundle_CreateFromSYCLSource(
__dpctl_keep DPCTLBuildOptionListRef BuildOptions,
__dpctl_keep DPCTLKernelBuildLogRef BuildLog)
{
#if (SUPPORTS_SYCL_COMPILATION > 0)
// optional arguments and BuildLog may be NULL, which is equivalent to
// passing an empty list or discarding the log
// Writing to the log is routed through a helper
Expand Down Expand Up @@ -1100,7 +1053,7 @@ __dpctl_give DPCTLSyclKernelBundleRef DPCTLKernelBundle_CreateFromSYCLSource(
*SyclCtx, syclex::source_language::sycl, Src));
}

registered_names_property_t RegisteredNames;
syclex::registered_names RegisteredNames;
for (const std::string &Name : KernelNames) {
RegisteredNames.add(Name);
}
Expand All @@ -1120,16 +1073,12 @@ __dpctl_give DPCTLSyclKernelBundleRef DPCTLKernelBundle_CreateFromSYCLSource(
set_build_log(e.what());
return nullptr;
}
#else
return nullptr;
#endif
}

__dpctl_give DPCTLSyclKernelRef
DPCTLKernelBundle_GetSyclKernel(__dpctl_keep DPCTLSyclKernelBundleRef KBRef,
__dpctl_keep const char *KernelName)
{
#if (SUPPORTS_SYCL_COMPILATION > 0)
if (!KBRef) {
error_handler("Input KBRef is nullptr", __FILE__, __func__, __LINE__);
return nullptr;
Expand All @@ -1148,16 +1097,12 @@ DPCTLKernelBundle_GetSyclKernel(__dpctl_keep DPCTLSyclKernelBundleRef KBRef,
error_handler(e, __FILE__, __func__, __LINE__);
return nullptr;
}
#else
return nullptr;
#endif
}

bool DPCTLKernelBundle_HasSyclKernel(__dpctl_keep DPCTLSyclKernelBundleRef
KBRef,
__dpctl_keep const char *KernelName)
{
#if (SUPPORTS_SYCL_COMPILATION > 0)
if (!KBRef) {
error_handler("Input KBRef is nullptr", __FILE__, __func__, __LINE__);
return false;
Expand All @@ -1175,7 +1120,4 @@ bool DPCTLKernelBundle_HasSyclKernel(__dpctl_keep DPCTLSyclKernelBundleRef
error_handler(e, __FILE__, __func__, __LINE__);
return false;
}
#else
return false;
#endif
}
Loading