-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fud2 Tracker #1878
Comments
Thanks for getting started on this @sampsyo! What do you think about the following milestone: getting all of the tests in the monorepo working with |
Yes! That seems like the milestone to shoot for. I think we are a few steps away from that being feasible (mostly the documentation/QoL stuff in the first stanza of checkboxes above, and of course the extra ops in the second stanza), but that is the right medium-term goal to shoot for. |
I came across when playing with |
Yes, having "secondary inputs" be treated as first-class citizens would be really really satisfying… |
Proposal: |
I think this should be promoted into a general discussion about a new |
One problem I've been running into when using Woo! New set of challenges from incremental execution but it'll be worth it once we have it figured out. |
Ah yes, exciting!! Makes sense to force (e.g.) Calyx compilation rules to have an implicit dependency on the Calyx compiler binary. This is mostly a note to myself, but making that work would probably benefit from some sort of abstraction inside the fud-core emitter to make it easy to include that dependency every time… Ninja does not let you attach dependencies to rules (only build statements), so there is a need to repeat this dependency every place the rule is used. That is very understandable for Ninja, but it means we will want a way for fud2 code to do the right thing by default instead of needing to remember the implicit dependency every time. (This already comes up in #1910, where we need similar implicit dependencies on resource files.) |
Adding an idea to the tracker above that might make sense in the medium term: internal ops. Currently, fud2 only orchestrates external commands. Everything it does must be implemented in a separate binary that can be invoked on the command line. This is great for modularity/testability/clarity, but it comes with obvious downsides: the overhead of serializing everything to files on disk, and the complexity of managing external dependencies. That's why clang, for example, is both a compiler driver and a toolbox of actual toolchain elements that it wraps up into one big burrito. It would be cool if we could optionally include functionality inside the fud2 binary itself for certain, specific cases. For example, a version of fud2 could link in the entire Calyx compiler as a library. Then we wouldn't need to find the Calyx compiler executable; fud2 could instead emit Ninja "callbacks" to itself to do the compilation. As in, maybe fud2 exposes a command like this:
…and emits Ninja commands to call it this way instead of an external Calyx binary. This would just make the dependency management easier, at the expense of a gigantic monolithic fud2 binary. Beyond this, fud2 could try to detect when there is a "chain" of internal ops in the plan. Then it could call itself to do the entire chain in a single Finally, in the limit, if the entire plan is a chain of internal ops, then we don't need to involve Ninja at all. Basically, the idea would be that fud2 could follow a "progressive enhancement" strategy where external commands always exist as a fallback, but we can use internal ops opportunistically, solely as an optimization with identical semantics. |
This is a cool idea!! A potential challenge is that this make An alternative approach to the serialization problem is coming up with binary formats that can be |
Ah, yes, thank you for articulating the downside. It would cost a lot of complexity! And, as you say, create two implementations to test for every possible plan. I guess one thing it wouldn't incur, however, is process management: everything would be in-process (that would be the point) so no And yeah, you're right that there might be better alternatives to explore if serialization becomes a bottleneck… I guess the real lesson here is that we should wait for an actual bottleneck to appear before picking the solution. 🤪 |
Here is a tracking issue to catalog all the stuff to do to fud2, after the initial import in #1877. As I turn these bullet points into issues, I'll edit this issue to link to them.
Near-term infrastructure completion:
list
subcommand #1937Missing functionality from OG fud (an incomplete list):
Big features to explore:
--set sim.data=foo.json
route, where the data input is a "second-class citizen" w/r/t the actual code for simulation, is a hack. We should instead treatfoo.json
as a proper input, just like the Verilog program, that goes through its own op-based transformation, discovered with a BFS traversal of the op graph. This would let you, for example, dofud2 foo.json -o foo.hex
or whatever to run the data conversion alone, and it would allow other formats other than the "blessed" JSON format to work transparently. [fud2] Hypergraph #1958icarus
andicarus-trace
ops because one produces a JSON data file and the other produces a VCD file. Maybe we can make this one op? Then you wouldn't have to do--through icarus-trace --to vcd
, which seems redundant; it would suffice to just do--through icarus --to vcd
to specify which output you want. [fud2] Hypergraph #1958--to dat
computations #2208 for a specific current problem with prioritization.fud check
that can automatically diagnose lots of installation and versioning problems.fud install
sampsyo/fake#2 and Self-containedfud2
package #1899.fud2
package #1899. fud2: Embed resources in executable, in release mode #1910-s key=value
. We'd need to collect examples of how this might be useful.The text was updated successfully, but these errors were encountered: