Commit Graph

59 Commits

Author SHA1 Message Date
colin 2044397047 app: stacked_cores: prototype
the long term goal of this demo is to see if:
(a) we can get stronger coupling between two cores than with multi-core-inverter.
(b) we can get amplification by using a charge-pump like concept.
(c) we can construct a *working* multi-core-inverter from this.
2022-09-01 18:41:49 -07:00
colin 45d2de29c6 rename 'coremem_types' -> 'coremem_cross' to better reflect its purpose 2022-07-28 15:40:23 -07:00
colin 9d102e0152 split `real` out into its own crate
this is a move toward reusing some of the coremem helper types in the
spirv backend.
2022-07-17 17:32:35 -07:00
colin a2d35782a1 lift the post-processing tools (viewer, csv, decimate) into their own crate
- these tools shouldn't need access to coremem internals.
- lifting them out reduces some dependencies in coremem-the-library.
- separation allows faster iteration in the coremem library while
  temporarily breaking the post-processing tools (specifically,
  those tools could take deps on a specific coremem version and thereby
  we split the update process into two, smaller steps).
2022-07-17 15:47:39 -07:00
colin b778acfd28 add a new crate where i'll explicitly simulate the inverter i hypothesize in an upcoming blog about this project 2022-07-15 17:13:41 -07:00
colin 99e7306ae9 make all the examples be their own binary crates
this achieves a few things:
- trivial way to get these shipped as the default nix package
- better dependency management
- ability to split large applications into multiple files

the README probably needs some updating.
2022-07-06 01:30:31 -07:00
colin 4dce151e9c remove spirv_backend_lib
this was a hack from earlier where we needed a different lib types
based on whethere we were targeting the native host or the spirv
backend.

at some point we no longer needed different lib types. so the _lib piece
is unnecessary.
2022-07-06 00:26:54 -07:00
colin 5b99d30cda restructure this multi-crate project to use Cargo's "workspace" feature
this solves an issue in the Nix build, where managing multiple
Cargo.lock files is otherwise tricky. it causes (or fails to fix?) an adjacent issue where
the spirv builder doesn't seem to have everything it needs vendored.
2022-07-05 17:34:21 -07:00
colin d3cd12aa47 split the spirv builder out of the runtime spirv executable
this means that we unconditionally build the spirv runner,
and hence it requires that the user setup the proper rustc toolchain,
etc. may want to hide this behind a feature flag.
2022-07-05 16:37:00 -07:00
colin 1a0f7687db update typetag: 0.1 => 0.2 2022-07-04 04:30:00 -07:00
colin 1acb4233ae runtime fix: update rust-toolchain and EmbarkStudios deps, switch from dylib => lib
this resolves the issue where Nix builds would segfault when trying to
initialize wgpu -- *possibly* because of multiple dynamically linked
versions of LLVM sitting in the mix (hence, dylib => lib).
2022-07-04 04:28:30 -07:00
colin fa4075818d update dependencies 2022-07-04 03:47:17 -07:00
colin 92deaf6c8d Cargo: lock spirv deps & update the rest 2022-07-04 02:03:23 -07:00
Colin 3cc2353c3b audit the licenses of each direct dependency
they're all MIT or CC0. that should enable free distribution so long as
MIT license copies are provided alongside all the MIT dependencies
(IANAL).
2022-04-30 16:32:16 -07:00
Colin afaf76224c remove some commented-out code from Cargo.toml 2022-04-29 00:39:07 -07:00
Colin 98b03aeb76 spirv: put all the spirv stuff behind a submodule
future work will factor out bindings, etc
2022-01-27 23:01:08 -08:00
Colin d399d51895 update wgpu 0.9 => 0.12
there looks to be a 25% perf hit when running the 160x160x160 benchmark.
2022-01-25 04:11:24 -08:00
Colin a997e01c48 update crossterm and lru dependencies 2022-01-25 03:19:01 -08:00
Colin 1e4560ce4c update rust-gpu dependencies and rustc version
also add the Cargo.lock files to version control, since the spirv stuff
is highly dependent on specific versions of dependencies.

TODO: update wgpu to 0.12
2022-01-25 03:10:29 -08:00
Colin 8bda52d973 memoize the region lookups for better perf
102s => 57s
2022-01-11 16:21:05 -08:00
Colin 7fd2c0991d Change crate-type to dylib to get all targets building
i.e. `cargo test`, `cargo bench`, `Cargo run --release --bin csv` all
pass. Previously they couldn't all pass.

Also, change the benchmarks so that spirv code is compiled only once per
bench.

Early results have the spirv backend taking twice as long per-frame as
the cpu backend for a 80x80x80 sim.
2021-08-07 22:35:45 -07:00
Colin 6239b5bb18 Update dependencies.
`cargo bench` still doesn't work :|
2021-08-07 17:09:12 -07:00
Colin 1395e56730 Add some tests which use the spirv_backend code w/o a runtime
They're broken: due to an underflow!
2021-08-03 22:31:33 -07:00
Colin 2f043b92e6 Add a test which runs stuff on the GPU with rust-gpu 2021-07-25 16:44:53 -07:00
Colin eecf848875 Remove plotly
Git/crates.io version of plotly had some bugs which were patched locally.
But this added extra maintenance and I haven't used the plotly renderer for some time.
So, remove plotly & reintegrate it only when we need it.
2021-07-25 13:21:16 -07:00
Colin 42fca8ae2b Validate the CsvRenderer 2021-06-15 00:47:59 -07:00
Colin 1a6f13e271 Add an (untested) way to persist measurements to disk 2021-06-15 00:15:04 -07:00
Colin 71a50a5a5f Add a way to turn measurements into csv (partially broken)
I guess the sort order for HashMaps with identical keys isn't reliable?
2021-06-05 21:21:52 -07:00
Colin 0843874bde add a chaos UPML test (broken) 2020-12-29 23:02:29 -08:00
Colin 7c88f276e6 Fill in a few more UPML tests to nail down which specific scenarios are problematic 2020-12-28 21:13:56 -08:00
Colin 89bce42efd Backfill some more tests for anisotropic conductors 2020-12-25 17:38:09 -08:00
Colin d08013763b Backfill tests for some of the simulation 2020-12-24 15:25:09 -08:00
Colin 14e01ed726 Add LTO for 3% perf bump; fix P measurements 2020-12-19 14:55:55 -08:00
Colin 56630b02b3 Prefetch frames 2020-12-15 18:34:54 -08:00
Colin 639ab4b117 Add a cache to the viewer 2020-12-15 17:39:59 -08:00
Colin 6362b5a60e parallelize render_scalar_field 2020-12-15 14:19:29 -08:00
Colin abac9be49c Viewer navigates based on natsorted paths 2020-11-29 15:08:31 -08:00
Colin ed86aff504 measurements are now rendered alongside the terminal view 2020-11-29 12:27:52 -08:00
Colin 8f8c42a853 renderer can navigate forward in time (and also in the + or - z direction)
Can't navigate backward yet
2020-11-28 13:49:30 -08:00
Colin a96473640b Write a skeleton for the viewer (presently no-op) 2020-11-28 11:54:59 -08:00
Colin d39a13190f Use bincode instead of CBOR to cut file size by 70%
Also use a BufWriter to significantly speed up the serialization
2020-11-27 22:37:18 -08:00
Colin 2c042810d8 Implement a 'SerializerRenderer' output format
It's CBOR, which seems to pack not so efficiently (250*250*20 * 12
floats takes 400 MB per frame, whereas this many doubles could pack into
120 MB). serde_cbor also seems to be extremely slow: taking multiple
minutes per frame. This could be parallelized to be less problematic
though (it already is -- just bump the parallelism).

Might be worth testing other formats.
2020-11-27 22:11:53 -08:00
Colin 9d15e126a7 Cleanup
AKA I made these changes a month ago but forgot to commit them and don't
really want to figure out what they did.
2020-11-27 21:22:42 -08:00
Colin 1a9093315a Basic support for plotly backend
NOTE: this requires you to clone `plotly`, copy the
`plotly_kaleido` folder to be adjacent to this one, and then run `cargo
build --release` from within that plotly_kaleido folder.
2020-10-09 21:51:34 -07:00
Colin b9a48641c1 use `lazy_static` to avoid duplicating the MHCurve many times
Bumps FPS from 22 -> 26fps for my particular case
2020-10-03 22:58:18 -07:00
Colin 3f7ab1a39a Simplify the SimState decimation logic. 2020-09-13 16:29:18 -07:00
Colin b4b0fde8af Use ndarray's parallelism features
It's easier to read, and it also gets 10-30% perf improvement for
Driver::step
2020-09-12 20:37:31 -07:00
Colin f4cdd1240d Switch to Criterion for benchmarking 2020-09-12 19:47:38 -07:00
Colin d611e822dd Add a 'Measurement' concept, e.g. to display current at a point. 2020-09-07 20:14:41 -07:00
Colin 8ce5ef1c07 Parallelize the simulation loop 2020-09-05 23:32:02 -07:00