Draft: Transpose matrices
should address #4
changelog
- transpose all random matrices when they are created, i.e. using
Matrix::random(n, k)
instead ofMatrix::random(k, n)
- transpose the Vandermonde matrix definition
- add a
Matrix::get_row
method - fix the linalg tests
- show the exact error in FEC tests
- do not transpose in
fec::encode
andfec::decode
- add test assertion to make sure
fec::encode
always generatesnshards - add some runtime assertions
tests
cargo t -- linalg fec
passes
Edited by STEVAN Antoine
Merge request reports
Activity
Filter activity
assigned to @a.stevan
added 3 commits
run the benchmarks before (f711147d) and after (307c8c93) the changes
let run = { |rev, name| git checkout $rev let sizes = seq 0 18 | each { 512 * 2 ** $in } let ks = [2, 4, 8, 16, 32, 64, 128, 256] let curves = [ bls12381 ] let out_fec = $sizes | benchmarks fec run --ks $ks --curves $curves cp $out_fec $"benchmarks/results/fec.($name).ndjson" } do $run f711147 "before" do $run 7b1141d "after"
plot the comparison, i.e. the ratio
\frac{\text{after}}{\text{before}}use benchmarks/nu-lib/utils plot [ into-axis-options, COMMON_OPTIONS ] let after = open benchmarks/results/fec.after.ndjson | update times { math avg | into float } let before = open benchmarks/results/fec.before.ndjson | update times { math avg | into float } let times = $before | join $after label | update label { from nuon } | flatten label | rename --column { times: before, times_: after } | reject name_ | insert cmp { $in.after / $in.before } def plot [ times: table<name: string, step: string, bytes: int, cmp: float, k: int>, step: string, --save: path, ] { let graphs = $times | where name == "BLS12-381" and step == $step | rename --column { bytes: "x", cmp: "y" } | select k x y | sort-by x | group-by k --to-table | reject items.k | rename --column { group: "name", items: "points" } | update name { $"$k = ($in)$" } let options = [ --title $step ...($graphs.points | flatten | into-axis-options -x "filesize" -y "plain") ...$COMMON_OPTIONS (if $save != null { [ --save $save ] }) ] gplt plot ($graphs | to json) ...($options | flatten | compact) } plot $times "encode" --save encode.png plot $times "decode" --save decode.png
the results
Edited by STEVAN Antoineadded optimization label
added 2 commits
added 3 commits
Please register or sign in to reply