da4ml 0.3.0__py3-none-any.whl → 0.3.1__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.

Potentially problematic release.


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

da4ml/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.3.0'
21
- __version_tuple__ = version_tuple = (0, 3, 0)
20
+ __version__ = version = '0.3.1'
21
+ __version_tuple__ = version_tuple = (0, 3, 1)
@@ -1,7 +1,7 @@
1
1
  set project_name "${PROJECT_NAME}"
2
2
  set device "${DEVICE}"
3
3
 
4
- set top_module "${project_name}_wrapper"
4
+ set top_module "${project_name}"
5
5
  set output_dir "./output_${project_name}"
6
6
 
7
7
  create_project $project_name "${output_dir}/$project_name" -force -part $device
@@ -9,9 +9,10 @@ create_project $project_name "${output_dir}/$project_name" -force -part $device
9
9
  set_property TARGET_LANGUAGE Verilog [current_project]
10
10
  set_property DEFAULT_LIB work [current_project]
11
11
 
12
- read_verilog "${project_name}_wrapper.v"
13
12
  read_verilog "${project_name}.v"
14
13
  read_verilog "shift_adder.v"
14
+ read_verilog "negative.v"
15
+ read_verilog "mux.v"
15
16
  foreach file [glob -nocomplain "${project_name}_stage*.v"] {
16
17
  read_verilog $file
17
18
  }
@@ -25,8 +26,7 @@ file mkdir "${output_dir}/reports"
25
26
 
26
27
  # synth
27
28
  synth_design -top $top_module -mode out_of_context -retiming \
28
- -flatten_hierarchy rebuilt -resource_sharing auto \
29
- -directive AlternateRoutability
29
+ -flatten_hierarchy full -resource_sharing auto
30
30
 
31
31
  write_checkpoint -force "${output_dir}/${project_name}_post_synth.dcp"
32
32
 
@@ -34,15 +34,13 @@ report_timing_summary -file "${output_dir}/reports/${project_name}_post_synth_ti
34
34
  report_power -file "${output_dir}/reports/${project_name}_post_synth_power.rpt"
35
35
  report_utilization -file "${output_dir}/reports/${project_name}_post_synth_util.rpt"
36
36
 
37
- # set_property CARRY_REMAP 3 [get_cells -hier -filter {ref_name == CARRY8}]
38
-
39
- opt_design -directive ExploreSequentialArea
37
+ # opt_design -directive ExploreSequentialArea
40
38
  opt_design -directive ExploreWithRemap
41
39
 
42
40
  report_design_analysis -congestion -file "${output_dir}/reports/${project_name}_post_opt_congestion.rpt"
43
41
 
44
42
  # place
45
- place_design -directive AltSpreadLogic_high -fanout_opt
43
+ place_design -directive SSI_HighUtilSLRs -fanout_opt
46
44
  report_design_analysis -congestion -file "${output_dir}/reports/${project_name}_post_place_congestion_initial.rpt"
47
45
 
48
46
  phys_opt_design -directive AggressiveExplore
@@ -28,10 +28,10 @@ class VerilogModel:
28
28
  solution: Solution | CascadedSolution,
29
29
  prj_name: str,
30
30
  path: str | Path,
31
- latency_cutoff: int = -1,
31
+ latency_cutoff: float = -1,
32
32
  print_latency: bool = True,
33
33
  part_name: str = 'xcvu13p-flga2577-2-e',
34
- clock_period: int = 5,
34
+ clock_period: float = 5,
35
35
  clock_uncertainty: float = 0.1,
36
36
  io_delay_minmax: tuple[float, float] = (0.2, 0.4),
37
37
  register_layers: int = 1,
@@ -157,7 +157,7 @@ class MirrorQDense(MirrorOperationBase):
157
157
  dim = inputs._vars.ndim
158
158
  axis = op.axis
159
159
  assert axis != 0, 'Cannot normalizing on batch axis'
160
- axis -= 1
160
+ axis = axis - 1 if axis >= 0 else dim + axis
161
161
  idx = ''.join(chr(ord('a') + i) for i in range(dim))
162
162
  eq = f'...{idx},{idx[axis]}->...{idx}'
163
163
  else:
@@ -40,7 +40,7 @@ def stride_arr(stride: int | tuple[int, ...], arr: np.ndarray):
40
40
  stride = (stride,) * (ndim - 1)
41
41
 
42
42
  _idx = tuple(slice(None, None, st) for st in stride)
43
- return arr[*_idx]
43
+ return arr[_idx]
44
44
 
45
45
 
46
46
  TA = TypeVar('TA', 'FixedVariableArray', NDArray[np.integer | np.floating])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: da4ml
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Digital Arithmetic for Machine Learning
5
5
  Author-email: Chang Sun <chsun@cern.ch>
6
6
  License: GNU Lesser General Public License v3 (LGPLv3)
@@ -1,5 +1,5 @@
1
1
  da4ml/__init__.py,sha256=IETRRvzsJvPMLu1kzzi8UN5FYaM5MhNaXH2A_ZKr2_w,469
2
- da4ml/_version.py,sha256=AGmG_Lx0-9ztFw_7d9mYbaYuC-2abxE1oXOUNAY29YY,511
2
+ da4ml/_version.py,sha256=lOWWIGJeBi0KkFopWU_n3GH71C1PsaZ-ZYDfxFkne6c,511
3
3
  da4ml/cmvm/__init__.py,sha256=4Tbt913k9zP0w8R1p6Oss06v5jrManbUhskyHl6e-U0,154
4
4
  da4ml/cmvm/api.py,sha256=JpecMt6g8zutGh_uWT61_0iX8TuXct7-jq7N7HMIsgA,9626
5
5
  da4ml/cmvm/types.py,sha256=hdthYdP5muIQ-9qFE0CjObGT7lCxB1-udXU16LxtuBI,20959
@@ -36,10 +36,10 @@ da4ml/codegen/verilog/__init__.py,sha256=rXmW2V9sDp2RYMDAWlhj_gfMXH3G5lPNmLrFtsJ
36
36
  da4ml/codegen/verilog/comb.py,sha256=CmCwiddeiT4TCZV088lF2ENlAXx3vjZKszTz1sYXEao,7614
37
37
  da4ml/codegen/verilog/io_wrapper.py,sha256=SSs-ZRhBVLR6tpFso8GNGk-FH6JDe-p7LPvVPjTspxo,5002
38
38
  da4ml/codegen/verilog/pipeline.py,sha256=YsPRTLp04Aofg33QMw6_ga3fNX9LeCD7Pq2PnERLWOg,2377
39
- da4ml/codegen/verilog/verilog_model.py,sha256=_50dggtH24xMdI0beuyvdsv8G8dlB4MWa1m8KWZQdNE,12295
39
+ da4ml/codegen/verilog/verilog_model.py,sha256=3ZFaHqx1ONX3uxDKsbzLPxy3D7dehveRmdBfBiiS64o,12299
40
40
  da4ml/codegen/verilog/source/binder_util.hh,sha256=Dn9ysUdonw0HR8bxom8YfQF7vc1LEvT_B1V_o8Gw1rY,2503
41
41
  da4ml/codegen/verilog/source/build_binder.mk,sha256=rQbI98itE_b1wIQ_0uCXfBzNmGK2XT4vWmRyCJNnPKk,960
42
- da4ml/codegen/verilog/source/build_prj.tcl,sha256=bcFCpcHR26TJGOQZEpUx0eM1SEiJOCoH-9EPpIvqWu0,3124
42
+ da4ml/codegen/verilog/source/build_prj.tcl,sha256=JA-zLl7fd2PV-BFaX22-MTex04QTi0urWUXNAEUDTy0,3003
43
43
  da4ml/codegen/verilog/source/ioutil.hh,sha256=1o1-oIyQyYc9CU91bBxuitVzzcrNT8p4MTarFKiJoG4,3967
44
44
  da4ml/codegen/verilog/source/mux.v,sha256=1PMSQKGR_Cku1EQnePBVCuX6we_dqYBXW54WBEURvs0,1928
45
45
  da4ml/codegen/verilog/source/negative.v,sha256=YphTCLnYslktsnCPq1xjbYgIFavani5NBbqs20uwhBI,688
@@ -47,18 +47,18 @@ da4ml/codegen/verilog/source/shift_adder.v,sha256=qrpXBX9bhHI-o75v5zshOfq0giEATv
47
47
  da4ml/codegen/verilog/source/template.xdc,sha256=GlSRy8tw_orohSuUwUSNEYJLLkAAHttGTfLTcQqRQDg,1262
48
48
  da4ml/converter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
49
  da4ml/converter/hgq2/parser.py,sha256=bAtnEXQxRKU9a1HFJWTy-e_HDzZY_wXOBVdyYG3ndsM,3826
50
- da4ml/converter/hgq2/replica.py,sha256=9ICJGfK2Q2C_glwE0KMcvXttuWvJYRblkO7RLmalzss,13829
50
+ da4ml/converter/hgq2/replica.py,sha256=VzasMOasU73ZQr0xH2e8uOeKVFX_Is0n9aZFscGKcik,13864
51
51
  da4ml/trace/__init__.py,sha256=dv-rti3t8iE0RqeThfOb40mAg8FZB2WkkGQq3enJft0,282
52
52
  da4ml/trace/fixed_variable.py,sha256=6dfMHBN1NfqYIbPZ79GCPCXj2JFQUKTyDZu6xDaG3rg,17082
53
53
  da4ml/trace/fixed_variable_array.py,sha256=A0ApTvZxpkr7kHrUQkyhrGJuuPe4kDgLFyD_1CW7lBk,10985
54
54
  da4ml/trace/pipeline.py,sha256=_R2uqWgnpuQ4tD7VKz2eu8CF9Air2RtYH2o03Vfg0Mk,5353
55
55
  da4ml/trace/tracer.py,sha256=NqPEH9hyVlGQOf9_kJL3A7SujCcxkT-z28bk0Ael5jE,5664
56
56
  da4ml/trace/ops/__init__.py,sha256=I4VqB43lVkFlLtkoWxiSDHBFGvxKwutNbAJw5aLVeAI,2108
57
- da4ml/trace/ops/conv_utils.py,sha256=P8ccpeHF5D0jY9LdkIfwui3HNs-WpTnGfwiYehtboCU,8246
57
+ da4ml/trace/ops/conv_utils.py,sha256=Yn73t4F6Tcs1hBwK08L1DPOin2HYVcng4PSkU4vuZFo,8245
58
58
  da4ml/trace/ops/einsum_utils.py,sha256=MoWvOfvtVjXGwqEhXEzZ3uGrgSmLTHngV8I1eLyANGE,11433
59
59
  da4ml/trace/ops/reduce_utils.py,sha256=8gohGQRVr8Bn5rfyrGsnE8EDxUXAObv521qu4mJrX9I,3348
60
- da4ml-0.3.0.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
61
- da4ml-0.3.0.dist-info/METADATA,sha256=JVugmlP6dRkZ8PZTOisE6OZ3JaNNjm18yKAUBDZC04s,4569
62
- da4ml-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
63
- da4ml-0.3.0.dist-info/top_level.txt,sha256=N0tnKVwRqFiffFdeAzCgFq71hUNySh5-ITbNd6-R58Q,6
64
- da4ml-0.3.0.dist-info/RECORD,,
60
+ da4ml-0.3.1.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
61
+ da4ml-0.3.1.dist-info/METADATA,sha256=3H1yt5sKqrIncAGok6NqE27O66_yD7hPUN6jFmCdMqQ,4569
62
+ da4ml-0.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
63
+ da4ml-0.3.1.dist-info/top_level.txt,sha256=N0tnKVwRqFiffFdeAzCgFq71hUNySh5-ITbNd6-R58Q,6
64
+ da4ml-0.3.1.dist-info/RECORD,,
File without changes