[Libre-soc-bugs] [Bug 713] PartitionedSignal enhancement to add partition-context-aware lengths

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Oct 12 14:26:41 BST 2021


https://bugs.libre-soc.org/show_bug.cgi?id=713

--- Comment #74 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #67)

> def layout(elwid, part_counts, lane_shapes=None,
>            fixed_width=None):
>     if lane_shapes is None:
>         # or would this work?
>         # lane_shapes = {i: lane_width // lane_shapes[i]
>                          for i in part_counts}

actually, 

    lane_shapes = {i: lane_width // part_counts[i]
                          for i in part_counts}

and it works well.

the problem is that you've defined lane_shapes to *be* the
sum total of the element width *times* the part_count.

* for an element width of e.g. 16
* and for a part_count[2] == 2
* you require lane_shapes[2] to be **32** not 16

this makes no sense, and is completely counterintuitive.

part_count defines the number of partitions in each elwidth

lane_shapes naturally should define the *individual element*
width *not* the element width times the number of partitions.

otherwise that information bleeds back into the actual usage
and it becomes impossible to define a transparent API that
allows dynamic SIMD or Scalar compile-time switching

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list