DPC++ Runtime
Runtime libraries for oneAPI DPC++
allowlist.hpp
Go to the documentation of this file.
1 //==-------------- allowlist.hpp - SYCL_DEVICE_ALLOWLIST -------------------==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #pragma once
10 
12 #include <CL/sycl/detail/pi.hpp>
13 #include <detail/plugin.hpp>
14 
15 #include <map>
16 #include <vector>
17 
19 namespace sycl {
20 namespace detail {
21 
22 using DeviceDescT = std::map<std::string, std::string>;
23 using AllowListParsedT = std::vector<DeviceDescT>;
24 
25 AllowListParsedT parseAllowList(const std::string &AllowListRaw);
26 
27 bool deviceIsAllowed(const DeviceDescT &DeviceDesc,
28  const AllowListParsedT &AllowListParsed);
29 
30 void applyAllowList(std::vector<RT::PiDevice> &PiDevices,
31  RT::PiPlatform PiPlatform, const plugin &Plugin);
32 
33 } // namespace detail
34 } // namespace sycl
35 } // __SYCL_INLINE_NAMESPACE(cl)
cl::sycl::detail::parseAllowList
AllowListParsedT parseAllowList(const std::string &AllowListRaw)
Definition: allowlist.cpp:53
defines_elementary.hpp
cl::sycl::detail::DeviceDescT
std::map< std::string, std::string > DeviceDescT
Definition: allowlist.hpp:22
sycl
Definition: invoke_simd.hpp:68
plugin.hpp
_pi_platform
A PI platform stores all known PI devices, in the CUDA plugin this is just a vector of available devi...
Definition: pi_cuda.hpp:63
pi.hpp
cl::sycl::detail::AllowListParsedT
std::vector< DeviceDescT > AllowListParsedT
Definition: allowlist.hpp:23
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
cl::sycl::detail::plugin
The plugin class provides a unified interface to the underlying low-level runtimes for the device-agn...
Definition: plugin.hpp:90
cl::sycl::detail::deviceIsAllowed
bool deviceIsAllowed(const DeviceDescT &DeviceDesc, const AllowListParsedT &AllowListParsed)
Definition: allowlist.cpp:282
cl::sycl::detail::applyAllowList
void applyAllowList(std::vector< RT::PiDevice > &PiDevices, RT::PiPlatform PiPlatform, const plugin &Plugin)
Definition: allowlist.cpp:336
cl::sycl::detail::pi::PiPlatform
::pi_platform PiPlatform
Definition: pi.hpp:101
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12