31726abb99
Driver: stimulus: use our own JobPool abstraction
...
this one leverages crossbeam.
it does appear to schedule jobs faster than the rust-threadpool.
curiously, the `recv` impl seems to be slower.
maybe that's because of the (inadvertent, unecessary) switch from mpsc
to mppc. worth trying to just insert a buffer.
2022-08-22 20:09:59 -07:00
eb95367fa5
JobPool: don't parameterize the type over its Worker
...
the Worker is often hard to specify concretely at the use site.
2022-08-22 20:05:41 -07:00
284b7368ef
add a JobPool type to better abstract over repeat asynchronous work
2022-08-22 19:30:07 -07:00
5fff872890
app: multi-core-inverter: implement 2-core inverter
...
this is a simpler test-bed to explore things like clock duration
2022-08-22 18:14:28 -07:00
b160823a81
fix broken cargo build --all
2022-08-22 14:17:51 -07:00
7bce17f56b
driver: more precisely measure stimuli "prep"
...
i'm beginning to think the `threadpool` library is actually just kinda
slow.
2022-08-22 02:32:58 -07:00
4df6e19abe
Driver: slightly better instrumentation
2022-08-22 02:17:59 -07:00
532dd26e22
driver: optimization: don't memcopy the RenderedStimulus across threads
2022-08-22 01:49:35 -07:00
8268215441
app: multi-core-inverter: fix non-terminating drive signal
2022-08-22 01:41:20 -07:00
232e0fdafb
Stimulus: replace Gated
with a type alias
2022-08-22 01:36:47 -07:00
b0bedd1efa
Driver: fix a bug where we might step more than the user wanted
2022-08-22 01:23:41 -07:00
82af4b100d
driver: optimize the step_multiple
step count calculation
...
this was using a stupid amount of compute.
we still have about 7% time unaccounted for. down from 12-15%.
2022-08-22 01:07:27 -07:00
e5c8bcff95
Driver: remove dead add_classical_boundary_explicit
function
2022-08-22 00:51:53 -07:00
ff13a1e96c
driver: address a TODO
2022-08-22 00:43:07 -07:00
24b82037b4
Stimulus: parameterize over R.
...
this saves us from a `mem::transmute` in the sim code to get
`Fields<R>`.
2022-08-22 00:37:34 -07:00
e32d500f8c
real: add sin
, cos
and ln2
functions
2022-08-22 00:37:19 -07:00
f0fc324188
Stimulus: remove unused eval_into
trait method
2022-08-21 21:41:27 -07:00
c02e5427d4
spirv tests: port to R32
...
this gives better debug info
2022-08-21 20:46:57 -07:00
29e78c74fe
real: implement std::iter::Sum
2022-08-21 20:46:43 -07:00
527e2746ed
driver: TODO about optimization
2022-08-21 19:25:20 -07:00
75a5041ed6
diagnostics: nicer formatting
2022-08-21 19:18:42 -07:00
98d6a5b34f
spirv: instrument the device read/write operations
2022-08-21 18:51:51 -07:00
6c9a6e1ffa
driver: all the user to configure the number of steps to go between stimulus application
2022-08-21 18:22:11 -07:00
a414bd77d4
diagnostics: break out a variable to make this code cleaner
2022-08-21 18:12:31 -07:00
850a7e773f
diagnostics: rename time_spent_{foo}
-> time_{foo}
2022-08-21 18:11:03 -07:00
a38734a1ed
diagnostics: instrument the stimulus and stimulus blocked time
2022-08-21 18:10:09 -07:00
18dd66530a
driver: evaluate stimulus in a background thread
...
this boosts fps from 920 to roughly 1150
2022-08-21 16:20:46 -07:00
7b848bcd16
driver: hide more behind the StimAccess type
2022-08-20 19:08:15 -07:00
c5cede6c6e
driver: hide the stimulus stuff behind a wrapper
...
this will making prefetch cleaner to implement
2022-08-20 18:58:31 -07:00
053943df01
add Stimulus::render()
and use it inside the driver and SpirvSim
2022-08-20 17:36:23 -07:00
d662ef24d3
SimMeta: implement PartialEq
2022-08-20 17:35:41 -07:00
4f229a51b1
rename RenderedVectorField
-> RenderedStimulus
2022-08-20 17:08:26 -07:00
cd2917c8a5
driver, sim: use RenderedVectorField to simplify/optimize sim-internal rendering
2022-08-20 17:07:25 -07:00
69a603920f
add a RenderedVectorField
. maybe more accurately called a rendered stimulus?
...
used to represent a stimulus which has been rendered for a specific time with specific simulation parameters.
2022-08-20 17:05:58 -07:00
69ee2070c8
DimSlice: impl Default
2022-08-20 17:04:56 -07:00
ff4209ce78
SpirvSim: remove a Vec copy from the stimulus evaluation
...
this boosts perf from 562 fps -> 900-ish for the multi-core-inverter
```
t=2.73e-9 frame 141700 fps: 901.93 (sim: 154.0s, stim: 30.6s, [render: 92.7s], blocked: 0.0s, render_prep: 0.7s, other: 2.5s)
```
we're now spending more CPU time rendering the measurements
than computing the stimulus
2022-08-19 04:55:50 -07:00
87c24c739c
spirv: call Stimulus::at
instead of Stimulus::eval_into
...
this *lowers* perf from 595 fps -> 562 fps
2022-08-19 04:49:18 -07:00
570917cae5
stim: Gated: no longer a Stimulus
2022-08-19 04:34:20 -07:00
8df001773f
eval_into: remove the scale
parameter
...
this actually seems to drop perf from 637 -> 595 ish?
i suppose the compiler was able to fold the time multiplier in with the
scale multipler? idk, somewhat surprised.
2022-08-19 04:26:58 -07:00
ad5f064584
stim: Simplify the Exp implementation. it's no longer a Stimulus
2022-08-19 04:14:33 -07:00
77124fcdaf
driver: implement an optimized stimulus adapter over ModulatedVectorField
...
this boosts perf from 520fps -> 632fps.
it does some uneccessary clones.
but it looks like the bulk of the inefficiency resides inside
the sim/spirv/ code though.
it might be that this is nearly memory-bottlenecked.
if so, backgrounding it might be sensible.
2022-08-19 03:54:43 -07:00
9f97f474d7
cross: DimSlice: allow the underlying data to be a Vec
2022-08-19 03:54:01 -07:00
35dbdffda7
driver: lay some scaffolding to allow us to optimize the stimulus in future
2022-08-18 22:19:50 -07:00
ffda00b796
stim: convert CurlStimulus to a CurlVectorField and use ModulatedVectorField
...
this opens the door to caching the vector field stuff.
2022-08-18 20:47:36 -07:00
478db86b75
multi-core-inverter: remove the List shenanigans
2022-08-18 20:02:09 -07:00
9461cc7781
stim: introduce a VectorField trait which we'll use to build a more structured approach to Stimulus
2022-08-18 17:08:44 -07:00
cf2d21f975
Stimulus: change at
method to accept feat_size: f32, loc: Index
2022-08-18 16:21:21 -07:00
0fa8cb0d20
cross: DimSlice: add into_inner
method
2022-08-18 16:04:15 -07:00
6750feef8d
stim: remove TimeVarying3
...
`TimeVarying`(1) is enough for what we want.
2022-08-18 15:51:54 -07:00
570f058ee1
rename AbstractStimulus
-> Stimulus
2022-08-18 15:27:18 -07:00