google / xls

XLS: Accelerated HW Synthesis
http://google.github.io/xls/
Apache License 2.0
1.22k stars 180 forks source link

[enhancement] Proc JIT should rely on `Package` less #1675

Open grebe opened 1 month ago

grebe commented 1 month ago

What's hard to do? (limit 100 words)

Constructing an AOT proc wrapper can be slow because it needs to parse the package for relevant metadata. Until recently, this was also true for function and block AOT wrappers, but I recently landed a change that allows those wrappers to only use protos that describe the interface for relevant metadata. The proc jit relies more on this metadata, e.g. for managing the queues, so I didn't do the same thing for the AOT proc wrapper.

Current best alternative workaround (limit 100 words)

Accept that constructing a AOT proc wrapper is slow. Reuse a singleton proc wrapper (getting new continuations from a common wrapper instead of constructing a new wrapper each time).

Your view of the "best case XLS enhancement" (limit 100 words)

The proc jit will be the same as the function+block jits in that it doesn't have enduring hooks into Package metadata.