esiaccel 0.0.17.dev735__cp312-cp312-win_amd64.whl → 0.1.0__cp312-cp312-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.
- esiaccel/CosimBackend.dll +0 -0
- esiaccel/CosimBackend.lib +0 -0
- esiaccel/ESICppRuntime.dll +0 -0
- esiaccel/ESICppRuntime.lib +0 -0
- esiaccel/bin/esi-cosim.py +405 -0
- esiaccel/bin/esiquery.exe +0 -0
- esiaccel/cmake/esiaccelConfig.cmake +1 -1
- esiaccel/cosim/Cosim_DpiPkg.sv +85 -0
- esiaccel/cosim/Cosim_Endpoint.sv +189 -0
- esiaccel/cosim/Cosim_Manifest.sv +32 -0
- esiaccel/cosim/driver.cpp +131 -0
- esiaccel/cosim/driver.sv +60 -0
- esiaccel/esiCppAccel.cp312-win_amd64.pyd +0 -0
- esiaccel/include/esi/CLI.h +9 -3
- esiaccel/include/esi/Engines.h +124 -0
- esiaccel/include/esi/Logging.h +43 -7
- esiaccel/include/esi/Services.h +44 -0
- esiaccel/include/esi/backends/Cosim.h +85 -0
- esiaccel/include/esi/backends/RpcServer.h +55 -0
- esiaccel/lib/EsiCosimDpiServer.dll +0 -0
- esiaccel/lib/EsiCosimDpiServer.lib +0 -0
- esiaccel/lib/MtiPli.dll +0 -0
- esiaccel/lib/MtiPli.lib +0 -0
- esiaccel/types.py +55 -0
- esiaccel/zlib1.dll +0 -0
- {esiaccel-0.0.17.dev735.dist-info → esiaccel-0.1.0.dist-info}/METADATA +3 -3
- esiaccel-0.1.0.dist-info/RECORD +44 -0
- {esiaccel-0.0.17.dev735.dist-info → esiaccel-0.1.0.dist-info}/WHEEL +1 -1
- esiaccel-0.0.17.dev735.dist-info/RECORD +0 -29
- {esiaccel-0.0.17.dev735.dist-info → esiaccel-0.1.0.dist-info}/entry_points.txt +0 -0
- {esiaccel-0.0.17.dev735.dist-info → esiaccel-0.1.0.dist-info/licenses}/LICENSE +0 -0
- {esiaccel-0.0.17.dev735.dist-info → esiaccel-0.1.0.dist-info}/top_level.txt +0 -0
esiaccel/types.py
CHANGED
|
@@ -20,6 +20,8 @@ if TYPE_CHECKING:
|
|
|
20
20
|
|
|
21
21
|
from concurrent.futures import Future
|
|
22
22
|
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
|
23
|
+
import sys
|
|
24
|
+
import traceback
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
def _get_esi_type(cpp_type: cpp.Type):
|
|
@@ -364,8 +366,12 @@ class BundlePort:
|
|
|
364
366
|
# TODO: add a proper registration mechanism for service ports.
|
|
365
367
|
if isinstance(cpp_port, cpp.Function):
|
|
366
368
|
return super().__new__(FunctionPort)
|
|
369
|
+
if isinstance(cpp_port, cpp.Callback):
|
|
370
|
+
return super().__new__(CallbackPort)
|
|
367
371
|
if isinstance(cpp_port, cpp.MMIORegion):
|
|
368
372
|
return super().__new__(MMIORegion)
|
|
373
|
+
if isinstance(cpp_port, cpp.Telemetry):
|
|
374
|
+
return super().__new__(TelemetryPort)
|
|
369
375
|
return super().__new__(cls)
|
|
370
376
|
|
|
371
377
|
def __init__(self, owner: HWModule, cpp_port: cpp.BundlePort):
|
|
@@ -455,3 +461,52 @@ class FunctionPort(BundlePort):
|
|
|
455
461
|
|
|
456
462
|
def __call__(self, *args: Any, **kwds: Any) -> Future:
|
|
457
463
|
return self.call(*args, **kwds)
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
class CallbackPort(BundlePort):
|
|
467
|
+
"""Callback ports are the inverse of function ports -- instead of calls to the
|
|
468
|
+
accelerator, they get called from the accelerator. Specify the function which
|
|
469
|
+
you'd like the accelerator to call when you call `connect`."""
|
|
470
|
+
|
|
471
|
+
def __init__(self, owner: HWModule, cpp_port: cpp.BundlePort):
|
|
472
|
+
super().__init__(owner, cpp_port)
|
|
473
|
+
self.arg_type = self.read_port("arg").type
|
|
474
|
+
self.result_type = self.write_port("result").type
|
|
475
|
+
self.connected = False
|
|
476
|
+
|
|
477
|
+
def connect(self, cb: Callable[[Any], Any]):
|
|
478
|
+
|
|
479
|
+
def type_convert_wrapper(cb: Callable[[Any], Any],
|
|
480
|
+
msg: bytearray) -> Optional[bytearray]:
|
|
481
|
+
try:
|
|
482
|
+
(obj, leftover) = self.arg_type.deserialize(msg)
|
|
483
|
+
if len(leftover) != 0:
|
|
484
|
+
raise ValueError(f"leftover bytes: {leftover}")
|
|
485
|
+
result = cb(obj)
|
|
486
|
+
if result is None:
|
|
487
|
+
return None
|
|
488
|
+
return self.result_type.serialize(result)
|
|
489
|
+
except Exception as e:
|
|
490
|
+
traceback.print_exception(e)
|
|
491
|
+
return None
|
|
492
|
+
|
|
493
|
+
self.cpp_port.connect(lambda x: type_convert_wrapper(cb=cb, msg=x))
|
|
494
|
+
self.connected = True
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
class TelemetryPort(BundlePort):
|
|
498
|
+
"""Telemetry ports report an individual piece of information from the
|
|
499
|
+
acceelerator. The method of accessing telemetry will likely change in the
|
|
500
|
+
future."""
|
|
501
|
+
|
|
502
|
+
def __init__(self, owner: HWModule, cpp_port: cpp.BundlePort):
|
|
503
|
+
super().__init__(owner, cpp_port)
|
|
504
|
+
self.connected = False
|
|
505
|
+
|
|
506
|
+
def connect(self):
|
|
507
|
+
self.cpp_port.connect()
|
|
508
|
+
self.connected = True
|
|
509
|
+
|
|
510
|
+
def read(self) -> Future:
|
|
511
|
+
cpp_future = self.cpp_port.read()
|
|
512
|
+
return MessageFuture(self.cpp_port.type, cpp_future)
|
esiaccel/zlib1.dll
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: esiaccel
|
|
3
|
-
Version: 0.0
|
|
3
|
+
Version: 0.1.0
|
|
4
4
|
Summary: ESI accelerators runtime
|
|
5
5
|
Author-email: John Demme <John.Demme@microsoft.com>
|
|
6
6
|
License: ==============================================================================
|
|
@@ -251,4 +251,4 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
251
251
|
Classifier: Programming Language :: Python :: 3.13
|
|
252
252
|
Requires-Python: >=3.8
|
|
253
253
|
License-File: LICENSE
|
|
254
|
-
|
|
254
|
+
Dynamic: license-file
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
esiaccel/CosimBackend.dll,sha256=g34jUb0LvNNgRKXJf-sBu6hBDTxZOOW2QZqV5F02U2A,7161344
|
|
2
|
+
esiaccel/CosimBackend.lib,sha256=dZgNr_bh6UBFYi1UKscDYE5Hen86dlqPYcuOgmxDmgM,4990738
|
|
3
|
+
esiaccel/ESICppRuntime.dll,sha256=98loL53a7uZUonxsks0XKJ0bTYyrv3VkQxgn2gkR84M,3691520
|
|
4
|
+
esiaccel/ESICppRuntime.lib,sha256=MW64lU3tsrVY9LykjPD6zU1JLQmksPuNqYtyOC4AK3Y,14491514
|
|
5
|
+
esiaccel/__init__.py,sha256=C0GLqCQuF5g5qTzmAkf_YAHmBV2XAyiJad3Qz7h8u1g,562
|
|
6
|
+
esiaccel/accelerator.py,sha256=GM2FRZF_8nzAJ_7TSRSw_kaJCYWCHMK-cQD8ZZU8QVs,3071
|
|
7
|
+
esiaccel/codegen.py,sha256=uoYELtnIabVvgLeCABj-mWras0BvmSKABPH-cd9nDFk,6560
|
|
8
|
+
esiaccel/esiCppAccel.cp312-win_amd64.pyd,sha256=xT941L0xbEUZ_Ae4R8Nb58UrZRpMvBeuLaHKTDP4XnE,462336
|
|
9
|
+
esiaccel/types.py,sha256=gfUgrX67KYFruX5xsj_wLNJCdwczzLpseyH71M86pW0,17047
|
|
10
|
+
esiaccel/utils.py,sha256=nzar3WALJC_RfmM5v0GeUev5So1-EAYuAMxG9jLj3eQ,1062
|
|
11
|
+
esiaccel/zlib1.dll,sha256=NSctbD78GTQkWc4jCoI-jwkI3_Bfx1PDF11ziakyPOc,90624
|
|
12
|
+
esiaccel/bin/esi-cosim.py,sha256=Q-eW6S8m5fJsgY__-XlPXxXI8HHYsDDqjTNksrZcK60,13808
|
|
13
|
+
esiaccel/bin/esiquery.exe,sha256=-wlOL46mP0WvJWFVE1V33x-cFO3m-AhkfxAmoeu4i7s,436224
|
|
14
|
+
esiaccel/cmake/esiaccelConfig.cmake,sha256=ihqU8IJ4Y2zFJ6_fBsR8HA9dI6IblIb5fHyXV9BXYbI,579
|
|
15
|
+
esiaccel/cosim/Cosim_DpiPkg.sv,sha256=9qGn1VyAVrzBP5At1thV6xrovg0WghICD01Zz9J221E,3458
|
|
16
|
+
esiaccel/cosim/Cosim_Endpoint.sv,sha256=ri1fHdkiphe8S2-vm6Ru16rBGYiDiS1c8qeCAsl1diU,6498
|
|
17
|
+
esiaccel/cosim/Cosim_Manifest.sv,sha256=vl9b6XieEkP880IBw1ferekBnDJwFanZZggJJGertXM,1123
|
|
18
|
+
esiaccel/cosim/driver.cpp,sha256=DrEKkSN7Y_Hu7wcaUulH5mbC2L4yB9xLClRMeRUpzHM,3842
|
|
19
|
+
esiaccel/cosim/driver.sv,sha256=ro-j9GM164A1W0MDPkqYfEn3TUKHSqVvgjO31fnloQI,1428
|
|
20
|
+
esiaccel/include/esi/Accelerator.h,sha256=RhkZ2HeMZ0iHc5BkHdDWXoeg9J9lyPQciH5bWq5Qc_w,9772
|
|
21
|
+
esiaccel/include/esi/CLI.h,sha256=Nn8tHn_xtEfkrD7USE2tao6ktYOJ6xcbnhZkS9-ox0A,2540
|
|
22
|
+
esiaccel/include/esi/Common.h,sha256=GyB9S4GJn-1K4bZNWi6Fc5ftKsL2Y362QOsNYuCqk6I,5078
|
|
23
|
+
esiaccel/include/esi/Context.h,sha256=Tk_4nBDtTeVY62GfX4Cs_ZMIQstjSgrWHddN_PKANEA,2396
|
|
24
|
+
esiaccel/include/esi/Design.h,sha256=mU8OwpCYijiWSdDq17l45LMzZxBca93nosudWCXNHfQ,4922
|
|
25
|
+
esiaccel/include/esi/Engines.h,sha256=bbGbhXjYMpIpXh_DR0OS57zyGQUIDXh_S7xHX3su0Y0,4831
|
|
26
|
+
esiaccel/include/esi/Logging.h,sha256=sHqMcpp0lNIHkIEyvSm-BBWx4zXXh6NOATCgZpgzYI4,8944
|
|
27
|
+
esiaccel/include/esi/Manifest.h,sha256=j3v9UA0ogtJQBlv6k5s4j_3sCsq-gwF9btVg5dKTBlg,2244
|
|
28
|
+
esiaccel/include/esi/Ports.h,sha256=T2WbPBViUSvFbO5Jjxlcp_eGq9jMitguvNnz3O0564U,10543
|
|
29
|
+
esiaccel/include/esi/Services.h,sha256=NyeuBxBzmZLpDoikQsjI-ih5FfVivfepZU9Bt8oi0CE,14721
|
|
30
|
+
esiaccel/include/esi/Types.h,sha256=P4ExO8-zvm7qQocUmkM_ATIvamxtDZ8JT2ToLkFo1dk,5483
|
|
31
|
+
esiaccel/include/esi/Utils.h,sha256=KPd75GajIFeTBVJocXBjwsJqhbZg-ShWZCIe3oQdBss,3061
|
|
32
|
+
esiaccel/include/esi/backends/Cosim.h,sha256=s7vYd0ra6m1nvk-n37MjvBoGVI-CCUKBt0DU4PKlaHM,2838
|
|
33
|
+
esiaccel/include/esi/backends/RpcServer.h,sha256=WMwnhwU2qnrcglGNeiKg9QQHpkDx1QE1JydKYDK4jqE,1856
|
|
34
|
+
esiaccel/include/esi/backends/Trace.h,sha256=kx4wwLH3a0ndmRUdaDyYGZ1SP83zlpFrk30Nw8ZrJJA,3286
|
|
35
|
+
esiaccel/lib/EsiCosimDpiServer.dll,sha256=CR3_II-rVqPm5GDd6ZR8cpcEELCC7g7_fxf5GehIjwc,160768
|
|
36
|
+
esiaccel/lib/EsiCosimDpiServer.lib,sha256=YrKxoXvBjmyrC-yJ7aq4_ePloA9p5X04oXjM8Ers1wY,604164
|
|
37
|
+
esiaccel/lib/MtiPli.dll,sha256=mHH4E7qc771uwTpqgGHa6RiAHSCeVYRaXTXdc-6Taj0,14848
|
|
38
|
+
esiaccel/lib/MtiPli.lib,sha256=Q__4sWi51FSc2p1hDaN90G0HstSxRy07z0aaXGd2e_w,14570
|
|
39
|
+
esiaccel-0.1.0.dist-info/licenses/LICENSE,sha256=vtnVnB8_lN1yPYcA5MeT56R8UsQtBhyzZLBvu_KMf7I,13468
|
|
40
|
+
esiaccel-0.1.0.dist-info/METADATA,sha256=uKKxNFfPI2p2qDeatoqG61dx7uMtpgIOHSCPKrkC0VM,16141
|
|
41
|
+
esiaccel-0.1.0.dist-info/WHEEL,sha256=b7PoVIxzH_MOHKjftqMzQiGKfdHRlRFepVBVPg0y3vc,101
|
|
42
|
+
esiaccel-0.1.0.dist-info/entry_points.txt,sha256=_CuNLV0fyTURxRREFwpzGycifZW_-7-MyuJNEwKK9J8,137
|
|
43
|
+
esiaccel-0.1.0.dist-info/top_level.txt,sha256=fYWTWMDK4PDu4ePQ9NtcFHas2k8-d1kWhTs2avPpgB4,9
|
|
44
|
+
esiaccel-0.1.0.dist-info/RECORD,,
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
esiaccel/ESICppRuntime.dll,sha256=Ouq49CfklbJZAVX4cjCzxP-8iLvrMzNkoEk-3pEvk6s,3635712
|
|
2
|
-
esiaccel/ESICppRuntime.lib,sha256=gk57ew2IxjAabme0BB4LRa9Y0C6EFecbsq1frUigV0o,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.cp312-win_amd64.pyd,sha256=DPNBtBcOA9PRLQAT7k7YgI9-HeG054OLcd6rlU7LK-s,445952
|
|
7
|
-
esiaccel/types.py,sha256=quV7bQFrweocGVCvwX_8KZd-Wz3Y0Yvi2YGCmihKvZM,15132
|
|
8
|
-
esiaccel/utils.py,sha256=nzar3WALJC_RfmM5v0GeUev5So1-EAYuAMxG9jLj3eQ,1062
|
|
9
|
-
esiaccel/zlib1.dll,sha256=we1U1fudHZ_GfXH-Ifsh35T6SkBz4Bqk598Ddt2JzPo,90624
|
|
10
|
-
esiaccel/bin/esiquery.exe,sha256=lH6tPsfkQYN8TGJZazbivrlBHzEfAfxq3Ca98qlGelY,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.dev735.dist-info/LICENSE,sha256=vtnVnB8_lN1yPYcA5MeT56R8UsQtBhyzZLBvu_KMf7I,13468
|
|
25
|
-
esiaccel-0.0.17.dev735.dist-info/METADATA,sha256=u-dsvmCVlmQ9sYNxbsoJcqNHtbU0dwRNVRKHQEadRTM,16128
|
|
26
|
-
esiaccel-0.0.17.dev735.dist-info/WHEEL,sha256=aDrgWfEd5Ac7WJzHsr90rcMGiH4MHbAXoCWpyP5CEBc,102
|
|
27
|
-
esiaccel-0.0.17.dev735.dist-info/entry_points.txt,sha256=_CuNLV0fyTURxRREFwpzGycifZW_-7-MyuJNEwKK9J8,137
|
|
28
|
-
esiaccel-0.0.17.dev735.dist-info/top_level.txt,sha256=fYWTWMDK4PDu4ePQ9NtcFHas2k8-d1kWhTs2avPpgB4,9
|
|
29
|
-
esiaccel-0.0.17.dev735.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|