alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
PlatformGpuSyclAmd.hpp
Go to the documentation of this file.
1/* Copyright 2025 Aurora Perego
2 * SPDX-License-Identifier: MPL-2.0
3 */
4
5#pragma once
6
10
11#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_GPU_AMD)
12
13# include <sycl/sycl.hpp>
14
15namespace alpaka
16{
17 namespace detail
18 {
19 template<>
20 struct SYCLDeviceSelector<TagGpuSyclAmd>
21 {
22 auto operator()(sycl::device const& dev) const -> int
23 {
24 auto const& vendor = dev.get_info<sycl::info::device::vendor>();
25 auto const is_intel_gpu = dev.is_gpu() && (vendor.find("AMD") != std::string::npos);
26
27 return is_intel_gpu ? 1 : -1;
28 }
29 };
30 } // namespace detail
31
32 //! The SYCL device manager.
33 using PlatformGpuSyclAmd = PlatformGenericSycl<TagGpuSyclAmd>;
34} // namespace alpaka
35
36#endif
The alpaka accelerator library.