esiaccel 0.0.17.dev618__cp311-cp311-win_amd64.whl → 0.0.17.dev664__cp311-cp311-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of esiaccel might be problematic. Click here for more details.

Binary file
Binary file
esiaccel/bin/esiquery.exe CHANGED
Binary file
Binary file
@@ -133,6 +133,13 @@ public:
133
133
  return clientEngines[id];
134
134
  }
135
135
 
136
+ Accelerator &getAccelerator() {
137
+ if (!ownedAccelerator)
138
+ throw std::runtime_error(
139
+ "AcceleratorConnection does not own an accelerator");
140
+ return *ownedAccelerator;
141
+ }
142
+
136
143
  protected:
137
144
  /// If `createEngine` is overridden, this method should be called to register
138
145
  /// the engine and all of the channels it services.
@@ -163,9 +170,8 @@ private:
163
170
 
164
171
  std::unique_ptr<AcceleratorServiceThread> serviceThread;
165
172
 
166
- /// List of accelerator objects owned by this connection. These are destroyed
167
- /// when the connection dies or is shutdown.
168
- std::vector<std::unique_ptr<Accelerator>> ownedAccelerators;
173
+ /// Accelerator object owned by this connection.
174
+ std::unique_ptr<Accelerator> ownedAccelerator;
169
175
  };
170
176
 
171
177
  namespace registry {
@@ -0,0 +1,71 @@
1
+ //===- CLI.h - ESI runtime tool CLI parser common ---------------*- 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 file contains the common CLI parser code for ESI runtime tools. Exposed
10
+ // publicly so that out-of-tree tools can use it. This is a header-only library
11
+ // to make compilation easier for out-of-tree tools.
12
+ //
13
+ // DO NOT EDIT!
14
+ // This file is distributed as part of an ESI package. The source for this file
15
+ // should always be modified within CIRCT (lib/dialect/ESI/runtime/cpp).
16
+ //
17
+ //===----------------------------------------------------------------------===//
18
+
19
+ // NOLINTNEXTLINE(llvm-header-guard)
20
+ #ifndef ESI_CLI_H
21
+ #define ESI_CLI_H
22
+
23
+ #include "CLI/CLI.hpp"
24
+ #include "esi/Context.h"
25
+
26
+ namespace esi {
27
+
28
+ /// Common options and code for ESI runtime tools.
29
+ class CliParser : public CLI::App {
30
+ public:
31
+ CliParser(const std::string &toolName)
32
+ : CLI::App(toolName), debug(false), verbose(false) {
33
+ add_option("backend", backend, "Backend to use for connection")->required();
34
+ add_option("connection", connStr,
35
+ "Connection string to use for accelerator communication")
36
+ ->required();
37
+ add_flag("--debug", debug, "Enable debug logging");
38
+ add_flag("-v,--verbose", verbose, "Enable verbose (info) logging");
39
+ require_subcommand(0, 1);
40
+ }
41
+
42
+ /// Run the parser.
43
+ int esiParse(int argc, const char **argv) {
44
+ CLI11_PARSE(*this, argc, argv);
45
+ if (debug)
46
+ ctxt = Context::withLogger<ConsoleLogger>(Logger::Level::Debug);
47
+ else if (verbose)
48
+ ctxt = Context::withLogger<ConsoleLogger>(Logger::Level::Info);
49
+ return 0;
50
+ }
51
+
52
+ /// Connect to the accelerator using the specified backend and connection.
53
+ std::unique_ptr<AcceleratorConnection> connect() {
54
+ return ctxt.connect(backend, connStr);
55
+ }
56
+
57
+ /// Get the context.
58
+ Context &getContext() { return ctxt; }
59
+
60
+ protected:
61
+ Context ctxt;
62
+
63
+ std::string backend;
64
+ std::string connStr;
65
+ bool debug;
66
+ bool verbose;
67
+ };
68
+
69
+ } // namespace esi
70
+
71
+ #endif // ESI_CLI_H
@@ -30,7 +30,7 @@ class AcceleratorConnection;
30
30
  /// context. It owns all the types, uniquifying them.
31
31
  class Context {
32
32
  public:
33
- Context() : logger(std::make_unique<NullLogger>()) {}
33
+ Context() : logger(std::make_unique<ConsoleLogger>(Logger::Level::Warning)) {}
34
34
  Context(std::unique_ptr<Logger> logger) : logger(std::move(logger)) {}
35
35
 
36
36
  /// Create a context with a specific logger type.
@@ -73,9 +73,7 @@ public:
73
73
  return ret;
74
74
  }
75
75
  /// Access the module's ports by ID.
76
- const std::map<AppID, const BundlePort &> &getPorts() const {
77
- return portIndex;
78
- }
76
+ const std::map<AppID, BundlePort &> &getPorts() const { return portIndex; }
79
77
  /// Access the services provided by this module.
80
78
  const std::vector<services::Service *> &getServices() const {
81
79
  return services;
@@ -86,13 +84,22 @@ public:
86
84
  /// the `poll` calls returns true.
87
85
  bool poll();
88
86
 
87
+ /// Attempt to resolve a path to a module instance. If a child is not found,
88
+ /// return null and set lastLookup to the path which wasn't found.
89
+ const HWModule *resolveInst(const AppIDPath &path,
90
+ AppIDPath &lastLookup) const;
91
+
92
+ /// Attempt to resolve a path to a port. If a child or port is not found,
93
+ /// return null and set lastLookup to the path which wasn't found.
94
+ BundlePort *resolvePort(const AppIDPath &path, AppIDPath &lastLookup) const;
95
+
89
96
  protected:
90
97
  const std::optional<ModuleInfo> info;
91
98
  const std::vector<std::unique_ptr<Instance>> children;
92
99
  const std::map<AppID, Instance *> childIndex;
93
100
  const std::vector<services::Service *> services;
94
101
  const std::vector<std::unique_ptr<BundlePort>> ports;
95
- const std::map<AppID, const BundlePort &> portIndex;
102
+ const std::map<AppID, BundlePort &> portIndex;
96
103
  };
97
104
 
98
105
  /// Subclass of `HWModule` which represents a submodule instance. Adds an AppID,
@@ -165,6 +165,20 @@ private:
165
165
  std::ostream &errorStream;
166
166
  };
167
167
 
168
+ /// A logger that writes to the console. Includes color support.
169
+ class ConsoleLogger : public TSLogger {
170
+ public:
171
+ /// Create a stream logger that logs to stdout, stderr.
172
+ ConsoleLogger(Level minLevel);
173
+ void logImpl(Level level, const std::string &subsystem,
174
+ const std::string &msg,
175
+ const std::map<std::string, std::any> *details) override;
176
+
177
+ private:
178
+ /// The minimum log level to emit.
179
+ Level minLevel;
180
+ };
181
+
168
182
  /// A logger that does nothing.
169
183
  class NullLogger : public Logger {
170
184
  public:
esiaccel/zlib1.dll CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: esiaccel
3
- Version: 0.0.17.dev618
3
+ Version: 0.0.17.dev664
4
4
  Summary: ESI accelerators runtime
5
5
  Author-email: John Demme <John.Demme@microsoft.com>
6
6
  License: ==============================================================================
@@ -0,0 +1,29 @@
1
+ esiaccel/ESICppRuntime.dll,sha256=EgU-J8DQKZyMimMSuJUHFuT0dgEVdrzv1gJQCiB0gS4,3635712
2
+ esiaccel/ESICppRuntime.lib,sha256=XVLmSmDIf_p23vZeN_4VXyLPeA7SfCWxRYmJCrEScy8,14292648
3
+ esiaccel/__init__.py,sha256=C0GLqCQuF5g5qTzmAkf_YAHmBV2XAyiJad3Qz7h8u1g,562
4
+ esiaccel/accelerator.py,sha256=GM2FRZF_8nzAJ_7TSRSw_kaJCYWCHMK-cQD8ZZU8QVs,3071
5
+ esiaccel/codegen.py,sha256=uoYELtnIabVvgLeCABj-mWras0BvmSKABPH-cd9nDFk,6560
6
+ esiaccel/esiCppAccel.cp311-win_amd64.pyd,sha256=6OZOQ564hORoAYohDpKVhgwJY0r0wrPOU6nuTW69XDI,438784
7
+ esiaccel/types.py,sha256=quV7bQFrweocGVCvwX_8KZd-Wz3Y0Yvi2YGCmihKvZM,15132
8
+ esiaccel/utils.py,sha256=nzar3WALJC_RfmM5v0GeUev5So1-EAYuAMxG9jLj3eQ,1062
9
+ esiaccel/zlib1.dll,sha256=ZghNM5Ou-ExO63kYxhYrfPBa0CgIm96PSAAXFzfZWF8,90624
10
+ esiaccel/bin/esiquery.exe,sha256=riqrGRbzyW-WRwe5F9qZRFIUUPTaWRVBhQK7edFvKoQ,424448
11
+ esiaccel/cmake/esiaccelConfig.cmake,sha256=HcLuZRVSMGdr1ln6gsLTfo9iWCsAPf9wVLejnYqnpVE,564
12
+ esiaccel/include/esi/Accelerator.h,sha256=RhkZ2HeMZ0iHc5BkHdDWXoeg9J9lyPQciH5bWq5Qc_w,9772
13
+ esiaccel/include/esi/CLI.h,sha256=hqU1yAsp8tYmqvyeG-Ddi_mO0HxJ89KoQK2y-P6D6aQ,2317
14
+ esiaccel/include/esi/Common.h,sha256=GyB9S4GJn-1K4bZNWi6Fc5ftKsL2Y362QOsNYuCqk6I,5078
15
+ esiaccel/include/esi/Context.h,sha256=Tk_4nBDtTeVY62GfX4Cs_ZMIQstjSgrWHddN_PKANEA,2396
16
+ esiaccel/include/esi/Design.h,sha256=mU8OwpCYijiWSdDq17l45LMzZxBca93nosudWCXNHfQ,4922
17
+ esiaccel/include/esi/Logging.h,sha256=QUMzkFFIoPg8kERdvBSZ9OisBF_o18qRZm_6N8X-3V4,7441
18
+ esiaccel/include/esi/Manifest.h,sha256=j3v9UA0ogtJQBlv6k5s4j_3sCsq-gwF9btVg5dKTBlg,2244
19
+ esiaccel/include/esi/Ports.h,sha256=T2WbPBViUSvFbO5Jjxlcp_eGq9jMitguvNnz3O0564U,10543
20
+ esiaccel/include/esi/Services.h,sha256=1bjsDS9JvrONlDTGyxkIXprQL2wGSWIayrlxstyaqw0,13278
21
+ esiaccel/include/esi/Types.h,sha256=P4ExO8-zvm7qQocUmkM_ATIvamxtDZ8JT2ToLkFo1dk,5483
22
+ esiaccel/include/esi/Utils.h,sha256=KPd75GajIFeTBVJocXBjwsJqhbZg-ShWZCIe3oQdBss,3061
23
+ esiaccel/include/esi/backends/Trace.h,sha256=kx4wwLH3a0ndmRUdaDyYGZ1SP83zlpFrk30Nw8ZrJJA,3286
24
+ esiaccel-0.0.17.dev664.dist-info/LICENSE,sha256=vtnVnB8_lN1yPYcA5MeT56R8UsQtBhyzZLBvu_KMf7I,13468
25
+ esiaccel-0.0.17.dev664.dist-info/METADATA,sha256=AZJ-GKCEeciMZOmLfHu5V3f38_dGbB_0zTIPUPfoO8o,16128
26
+ esiaccel-0.0.17.dev664.dist-info/WHEEL,sha256=badvNS-y9fEq0X-qzdZYvql_JFjI7Xfw-wR8FsjoK0I,102
27
+ esiaccel-0.0.17.dev664.dist-info/entry_points.txt,sha256=_CuNLV0fyTURxRREFwpzGycifZW_-7-MyuJNEwKK9J8,137
28
+ esiaccel-0.0.17.dev664.dist-info/top_level.txt,sha256=fYWTWMDK4PDu4ePQ9NtcFHas2k8-d1kWhTs2avPpgB4,9
29
+ esiaccel-0.0.17.dev664.dist-info/RECORD,,
@@ -1,28 +0,0 @@
1
- esiaccel/ESICppRuntime.dll,sha256=61Cz0z8epfekGqAGDmgp2rieYmjK5_UoEGMNzk_ouCQ,3308032
2
- esiaccel/ESICppRuntime.lib,sha256=-foT3nic2AmfyKYxEDdxuBvmwoHAQJujGyqSjaEqTaU,13455416
3
- esiaccel/__init__.py,sha256=C0GLqCQuF5g5qTzmAkf_YAHmBV2XAyiJad3Qz7h8u1g,562
4
- esiaccel/accelerator.py,sha256=GM2FRZF_8nzAJ_7TSRSw_kaJCYWCHMK-cQD8ZZU8QVs,3071
5
- esiaccel/codegen.py,sha256=uoYELtnIabVvgLeCABj-mWras0BvmSKABPH-cd9nDFk,6560
6
- esiaccel/esiCppAccel.cp311-win_amd64.pyd,sha256=2QKBG095WxTEUdx94mTY9H_Ddqme3VC8eW46Jn1pn0U,429568
7
- esiaccel/types.py,sha256=quV7bQFrweocGVCvwX_8KZd-Wz3Y0Yvi2YGCmihKvZM,15132
8
- esiaccel/utils.py,sha256=nzar3WALJC_RfmM5v0GeUev5So1-EAYuAMxG9jLj3eQ,1062
9
- esiaccel/zlib1.dll,sha256=XY625nWryrAljnGQMMb0oDFriqs06it1uArnmy-04ok,90624
10
- esiaccel/bin/esiquery.exe,sha256=dEQWGfTpFEgNS4q-45OFmJp5QVPrwx5T6KO0SWnW3YI,45056
11
- esiaccel/cmake/esiaccelConfig.cmake,sha256=HcLuZRVSMGdr1ln6gsLTfo9iWCsAPf9wVLejnYqnpVE,564
12
- esiaccel/include/esi/Accelerator.h,sha256=s_3bYulDQUBnKYs43oG7r1AMycy588V103tbWFZEwvI,9664
13
- esiaccel/include/esi/Common.h,sha256=GyB9S4GJn-1K4bZNWi6Fc5ftKsL2Y362QOsNYuCqk6I,5078
14
- esiaccel/include/esi/Context.h,sha256=0o9desdPYzqTnZWqR74d6Mvg75PnoTAbr7tvJYclubc,2371
15
- esiaccel/include/esi/Design.h,sha256=DFcmUA7j-xWQO2L0rWnq5Jfc_BDXX90GD92pYS20CpY,4446
16
- esiaccel/include/esi/Logging.h,sha256=eAN4e_0l1-zKlbScsuwCm9wstjzw5-B8jAiS9EXB_xo,6984
17
- esiaccel/include/esi/Manifest.h,sha256=j3v9UA0ogtJQBlv6k5s4j_3sCsq-gwF9btVg5dKTBlg,2244
18
- esiaccel/include/esi/Ports.h,sha256=T2WbPBViUSvFbO5Jjxlcp_eGq9jMitguvNnz3O0564U,10543
19
- esiaccel/include/esi/Services.h,sha256=1bjsDS9JvrONlDTGyxkIXprQL2wGSWIayrlxstyaqw0,13278
20
- esiaccel/include/esi/Types.h,sha256=P4ExO8-zvm7qQocUmkM_ATIvamxtDZ8JT2ToLkFo1dk,5483
21
- esiaccel/include/esi/Utils.h,sha256=KPd75GajIFeTBVJocXBjwsJqhbZg-ShWZCIe3oQdBss,3061
22
- esiaccel/include/esi/backends/Trace.h,sha256=kx4wwLH3a0ndmRUdaDyYGZ1SP83zlpFrk30Nw8ZrJJA,3286
23
- esiaccel-0.0.17.dev618.dist-info/LICENSE,sha256=vtnVnB8_lN1yPYcA5MeT56R8UsQtBhyzZLBvu_KMf7I,13468
24
- esiaccel-0.0.17.dev618.dist-info/METADATA,sha256=eOgH-qTyEehQrCqRXXQ7zQSNK6UHKve0d3-Z0oVr6bo,16128
25
- esiaccel-0.0.17.dev618.dist-info/WHEEL,sha256=badvNS-y9fEq0X-qzdZYvql_JFjI7Xfw-wR8FsjoK0I,102
26
- esiaccel-0.0.17.dev618.dist-info/entry_points.txt,sha256=_CuNLV0fyTURxRREFwpzGycifZW_-7-MyuJNEwKK9J8,137
27
- esiaccel-0.0.17.dev618.dist-info/top_level.txt,sha256=fYWTWMDK4PDu4ePQ9NtcFHas2k8-d1kWhTs2avPpgB4,9
28
- esiaccel-0.0.17.dev618.dist-info/RECORD,,