CIRCT 21.0.0git
Loading...
Searching...
No Matches
Xrt.h
Go to the documentation of this file.
1//===- Xrt.h - ESI XRT device backend ---------------------------*- C++ -*-===//
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// This is a specialization of the ESI C++ API (backend) for connection into
10// hardware on an XRT device. Requires XRT C++ library.
11//
12// DO NOT EDIT!
13// This file is distributed as part of an ESI package. The source for this file
14// should always be modified within CIRCT (lib/dialect/ESI/runtime/cpp).
15//
16//===----------------------------------------------------------------------===//
17
18// NOLINTNEXTLINE(llvm-header-guard)
19#ifndef ESI_BACKENDS_XRT_H
20#define ESI_BACKENDS_XRT_H
21
22#include "esi/Accelerator.h"
23
24#include <memory>
25
26namespace esi {
27namespace backends {
28namespace xrt {
29
30/// Connect to an ESI simulation.
32public:
33 struct Impl;
34
35 XrtAccelerator(Context &, std::string xclbin, std::string kernelName);
37 static std::unique_ptr<AcceleratorConnection>
38 connect(Context &, std::string connectionString);
39
40protected:
41 virtual Service *createService(Service::Type service, AppIDPath path,
42 std::string implName,
43 const ServiceImplDetails &details,
44 const HWClientDetails &clients) override;
45
46private:
47 std::unique_ptr<Impl> impl;
48};
49
50} // namespace xrt
51} // namespace backends
52} // namespace esi
53
54#endif // ESI_BACKENDS_XRT_H
Abstract class representing a connection to an accelerator.
Definition Accelerator.h:79
AcceleratorConnections, Accelerators, and Manifests must all share a context.
Definition Context.h:31
Connect to an ESI simulation.
Definition Xrt.h:31
static std::unique_ptr< AcceleratorConnection > connect(Context &, std::string connectionString)
Parse the connection std::string and instantiate the accelerator.
Definition Xrt.cpp:38
std::unique_ptr< Impl > impl
Definition Xrt.h:47
virtual Service * createService(Service::Type service, AppIDPath path, std::string implName, const ServiceImplDetails &details, const HWClientDetails &clients) override
Called by getServiceImpl exclusively.
Definition Xrt.cpp:205
Parent class of all APIs modeled as 'services'.
Definition Services.h:46
const std::type_info & Type
Definition Services.h:48
Definition esi.py:1
std::map< std::string, std::any > ServiceImplDetails
Definition Common.h:98
std::vector< HWClientDetail > HWClientDetails
Definition Common.h:97