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