Repository navigation
tile_stepper: every phase counted by vertex, so a cooperative step stays near the slice - #1411
Merged
Merged
Conversation
…ays near the slice In cooperative mode the first frames of a tile took 50-160 ms against §1.9's 4 ms slice (found in P4): step() ran on across a phase change, and a curating or augmenting unit was a whole slice or slice pair. - A step ends where the phase changes (budget 0 still runs to the end). - Curating, augmenting and tiling yield a contour, pair of contours or test at a time, and a call that cannot yield (Clipper2, a sweep, a simplicity test, a Delaunay) is charged by the vertices it takes (TILER_UNITS, tiler/stepping.h), about a microsecond a unit. - An untiled region's fill yields a point at a time (medial_axis_stable_steps, interpolate_steps); a slice pair's workspaces and the assembled triangles are freed a piece at a time. - The order of the work is unchanged: T7 still finds every budget's result bit for bit equal. Tests: tiler_test's T7 on P4's demo stack (3 components x 12 slices x 64 vertices), and tiler_bunny_test records the bunny's slowest step and cooperative frame (the harness's timed and frame runs now run alone too).
…fore its fill's points
… slowest steps measured after the fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cvc::tile_steppernow keeps each cooperative step near §1.9's 4 ms slice. P4 found the problem while measuring its demo (#1397): the first frames of a tile took 50 to 160 ms. This fixes the stepper only; thecontour_labnode needs no change.What was coarse
step(budget)ran on across a phase change, so a budget the scheduler had sized on "snapping" units (a vertex each) was spent on "curating" units.The change
TILER_UNITSwith its charges insrc/cvc/geometry/tiler/stepping.h, calibrated to about a microsecond a unit.medial_axis_stable_steps,interpolate_steps). The legacy functions run these to the end, as the other stages do.Measured
Native MSVC Release,
CVC_SLICED_THREADING=cooperative, 4 ms slice. These are three runs each on a shared machine.cvcgl_contour_lab(3 components × 40 slices × 64 vertices)tiler_bunny_test, 50 slices, 9,536 vertices)remove_intersections, off by default) is one unit per pair of components. It is about 2 ms natively, and it is why touching reaches 9 ms under wasm.Tests
tiler_test(21, including a new T7 case on P4's stack),tiler_legacy_test(58) andtiler_intrinsics_test(9) pass natively and under wasm-mt node.tiler_testembeds the committed inputs, because-sNODERAWFScannot read the working tree there.tiler_bunny_testpasses. It now also records the bunny's slowest step and cooperative frame, using the T7 harness's timed and frame runs, which now run alone too.cvcgl_contour_lab(57 checks) passes on contour_lab: the contour tiler in Ariadne, with a demo on a real Reconstruct series (P4) #1397's branch with this change applied.Roadmap
§3's "Resumable" paragraph now describes the units and records the measurements above. #1397 adds a "Found in P4" paragraph to §3's Ariadne bullet that describes this problem. Whichever of the two PRs merges second should replace that paragraph with a pointer to "Resumable".