femtocrux 0.7.2__py3-none-any.whl → 0.8.0__py3-none-any.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.
femtocrux/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.2
1
+ 0.8.0
@@ -2,7 +2,7 @@
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # NO CHECKED-IN PROTOBUF GENCODE
4
4
  # source: compiler_service.proto
5
- # Protobuf Python Version: 5.27.2
5
+ # Protobuf Python Version: 5.28.1
6
6
  """Generated protocol buffer code."""
7
7
  from google.protobuf import descriptor as _descriptor
8
8
  from google.protobuf import descriptor_pool as _descriptor_pool
@@ -12,8 +12,8 @@ from google.protobuf.internal import builder as _builder
12
12
  _runtime_version.ValidateProtobufRuntimeVersion(
13
13
  _runtime_version.Domain.PUBLIC,
14
14
  5,
15
- 27,
16
- 2,
15
+ 28,
16
+ 1,
17
17
  '',
18
18
  'compiler_service.proto'
19
19
  )
@@ -6,7 +6,7 @@ import warnings
6
6
  import compiler_service_pb2 as compiler__service__pb2
7
7
  from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
8
8
 
9
- GRPC_GENERATED_VERSION = '1.67.1'
9
+ GRPC_GENERATED_VERSION = '1.68.0'
10
10
  GRPC_VERSION = grpc.__version__
11
11
  _version_not_supported = False
12
12
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: femtocrux
3
- Version: 0.7.2
3
+ Version: 0.8.0
4
4
  Summary: Femtosense Compiler
5
5
  Home-page: https://github.com/femtosense/femtocrux
6
6
  Author: Femtosense
@@ -40,6 +40,9 @@ Supported ML model representations:
40
40
 
41
41
  ## Installation
42
42
 
43
+ You will need to install `femtocrux` and `femtodriver` to compile models to run on the SPU and to run simulations to
44
+ get power metrics.
45
+
43
46
  You will need to have python `3.10` and Docker installed.
44
47
  Install Docker by following [these instructions](https://docs.docker.com/get-docker/).
45
48
 
@@ -49,53 +52,17 @@ femtocrux is available on PyPI via
49
52
  pip install femtocrux
50
53
  ```
51
54
 
52
- ## Basic Usage
53
-
54
- ### `ManagedCompilerClient`
55
- `ManagedCompilerClient` is the recommended way to use femtocrux within a context manager.
56
-
57
- ```python
58
- from femtocrux import ManagedCompilerClient, FQIRModel
59
-
60
- # fqir_graph = ... # Assuming we have an FQIR graph using fmot
61
- # inputs = ... # Assuming we have numpy array inputs to the model
62
-
63
- fqir_model = FQIRModel(fqir_graph, batch_dim=0, sequence_dim=1)
64
- with ManagedCompilerClient() as client:
65
-
66
- # simulate execution, view power, energy, and latency metrics
67
- simulator = client.simulate(fqir_model)
68
- outputs, metrics = simulator.simulate(inputs)
55
+ femtodriver is also available on PyPI via
69
56
 
70
- # compile the model to a bitfile
71
- bitstream = client.compile(fqir_model)
72
- with open('my_bitfile.zip', 'wb') as f:
73
- f.write(bitstream)
57
+ ```
58
+ pip install femtodriver
74
59
  ```
75
60
 
76
- The bitfile can be used to generate program files to run on the SPU, using [femtodriverpub](https://github.com/femtosense/femtodriverpub.git)
77
-
78
- ### `CompilerClient`
79
- `CompilerClient` is another interface to the compiler. This will be deprecated in future releases, so we recommend using `ManagedCompilerClient`.
80
-
81
- ```python
82
- from femtocrux import CompilerClient, FQIRModel
83
-
84
- # fqir_graph = ... # Assuming we have an FQIR graph using fmot
85
- # inputs = ... # Assuming we have numpy array inputs to the model
86
-
87
- fqir_model = FQIRModel(fqir_graph, batch_dim=0, sequence_dim=1)
88
- client = CompilerClient()
89
-
90
- # simulate execution, view power, energy, and latency metrics
91
- simulator = client.simulate(fqir_model)
92
- outputs, metrics = simulator.simulate(inputs)
61
+ ## Usage
93
62
 
94
- # compile the model to a bitfile
95
- bitstream = client.compile(fqir_model)
96
- with open('my_bitfile.zip', 'wb') as f:
97
- f.write(bitstream)
63
+ Please refer to the documentation in the [e2e walkthrough](https://femtocrux.femtosense.ai/en/latest/e2e_example/e2e_example.html) for a full example of how to create a model in pytorch, use femtodriver to compile program files
64
+ to run on the SPU, and for how to run simulations of the model to get power estimates.
98
65
 
99
- # close the client (important to avoid background docker containers that continue running)
100
- client.close()
66
+ If you want more detailed documentation of all the options you can use to compile and simulate with please refer to
67
+ the [femtodriver documentation](https://pypi.org/project/femtodriver/).
101
68
  ```
@@ -1,6 +1,6 @@
1
1
  femtocrux/ENV_REQUIREMENTS.sh,sha256=t_O1B4hJAMgxvH9gwp1qls6eVFmhSYBJe64KmuK_H-4,1389
2
2
  femtocrux/PY_REQUIREMENTS,sha256=wvbsR34rwqytCWDCFxBubN9d5tkUkr1ocfJVjS6nwH0,283
3
- femtocrux/VERSION,sha256=0BdnGL0hTOhHTAbtYcOVyhE_38Ks3YbZqpkztA2bVh4,6
3
+ femtocrux/VERSION,sha256=pmeA2iMQO-rxJDK0GFCJZrMaKjp4f5RopbbNqoZnwe8,6
4
4
  femtocrux/__init__.py,sha256=yIWd9I2PEXCn_PKIILAN3mkWeTf0tgtVualeTIHNxfQ,342
5
5
  femtocrux/version.py,sha256=uNg2kHxQo6oUN1ah7s9_85rCZVRoTHGPD1GAQPZW4lw,164
6
6
  femtocrux/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -15,16 +15,16 @@ femtocrux/femtostack/tflite_api/tflite_frontend.py,sha256=CsvurJ2RJPnUgjfwQ8ru6j
15
15
  femtocrux/femtostack/torch_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  femtocrux/femtostack/torch_api/frontend.py,sha256=-12zz0NpvQgpPNqBMg7EJQdomtRJPNffrVKC6rBqfBE,4064
17
17
  femtocrux/grpc/__init__.py,sha256=uiMHQt5I2eAKJqI3Zh0h1Gm7cmPR4PbaGS71nCJQCGw,169
18
- femtocrux/grpc/compiler_service_pb2.py,sha256=E2Yl97eENjTeP5n_O1y2qDHOCUfPCFxNWSBdupdkmhg,4703
19
- femtocrux/grpc/compiler_service_pb2_grpc.py,sha256=obq4BMaP9ozJgDjqpl4BS5rvAqPauFgVwozgcPSJkTo,8501
18
+ femtocrux/grpc/compiler_service_pb2.py,sha256=CQM23zxPQPocdekXSb1nSetgdkwt4ji067X9BU9ICao,4703
19
+ femtocrux/grpc/compiler_service_pb2_grpc.py,sha256=G51LUdb34R4IAFjRx8-Ti0wEG4QhsEVjcrHdDmxSS_s,8501
20
20
  femtocrux/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  femtocrux/server/exceptions.py,sha256=lI6n471n5QKf5G3aL_1kuBVEItD-jBgithVVpPDwNYc,609
22
22
  femtocrux/server/healthcheck.py,sha256=ehqAwnv0D0zpy-AUZAPwv8rp874DZCwUmP8nzdXzZvI,1565
23
23
  femtocrux/server/server.py,sha256=fpwL1GtFvdw7E0inkMDbDKd-Hu3QAuEgvlqFP7vtZhY,7928
24
24
  femtocrux/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  femtocrux/util/utils.py,sha256=FZ8cssDom4B3FDbVU_ew4Cf3wOWjo2w1jwcbnLzoYnM,1003
26
- femtocrux-0.7.2.dist-info/LICENSE,sha256=eN9ZI1xHjUmFvN3TEeop5kBGXRUBfbsl55KBNBYYFqI,36
27
- femtocrux-0.7.2.dist-info/METADATA,sha256=RPtpcqpg23QzvMEZxm2DGxzy_4Ex-yXb-wk7-Dho660,3556
28
- femtocrux-0.7.2.dist-info/WHEEL,sha256=a7TGlA-5DaHMRrarXjVbQagU3Man_dCnGIWMJr5kRWo,91
29
- femtocrux-0.7.2.dist-info/top_level.txt,sha256=BkTttlioC3je__8577wxRieZqY3Abu7FOOdMnmYbcNI,10
30
- femtocrux-0.7.2.dist-info/RECORD,,
26
+ femtocrux-0.8.0.dist-info/LICENSE,sha256=eN9ZI1xHjUmFvN3TEeop5kBGXRUBfbsl55KBNBYYFqI,36
27
+ femtocrux-0.8.0.dist-info/METADATA,sha256=LYOOgHsNDrpnuc_9Y4vlf7TEfb2sVCxvcNcEuniiG-U,2530
28
+ femtocrux-0.8.0.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
29
+ femtocrux-0.8.0.dist-info/top_level.txt,sha256=BkTttlioC3je__8577wxRieZqY3Abu7FOOdMnmYbcNI,10
30
+ femtocrux-0.8.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.4.0)
2
+ Generator: setuptools (75.5.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5