Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jakub Klemsa
TFHE Param Testing Suite
Commits
5af35176
Commit
5af35176
authored
May 03, 2022
by
Jakub Klemsa
Browse files
Batch complains if eta < 100% is missing. HOWTO.
parent
2ebd99b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
scripts/process-results/HOWTO
0 → 100644
View file @
5af35176
Batch Processing
----------------------------------------
That's indeed a bit tricky:
- setup.yaml .. normally
- run $ make run-numerical
- before adding results to git, run
$ cd results-noises_numerical
$ for i in `ls *-5.dat` ; do mv $i batch-$i ; done
$ for i in `ls *-5.yaml` ; do mv $i batch-$i ; done
- process with (modified accordingly, no parameters implemented)
$ ./batch-results.rb
- in case it complains about missing results, inspect manually
scripts/process-results/batch-results.rb
View file @
5af35176
...
...
@@ -20,9 +20,9 @@ PLOT_WIDTH_PER_PARAMS = 130
#~ LAMBDAs = [80, 128]
#~ PIs = [2, 3, 4, 5, 6, 7]
#~ QWs = [5]
LAMBDAs
=
[
80
]
PIs
=
[
2
,
3
,
4
]
QWs
=
[
2
,
3
]
LAMBDAs
=
[
80
,
128
]
PIs
=
[
2
,
3
,
4
,
5
,
6
]
QWs
=
[
5
]
# output dirs & files
OUT_DIR
=
"out_batch"
...
...
@@ -69,7 +69,14 @@ File.open(path_dat, 'w') do |file|
# calc eta_concrete
results
.
each
{
|
ri
|
ri
[
:bench
][
:noise
][
:eta_concrete
]
=
300
*
Math
::
sqrt
(
ri
[
:params
][
:_2Delta
]
*
ri
[
:bench
][
:noise
][
:calc_V_0_concrete
]
+
(
ri
[
:params
][
:n
]
+
1
).
to_f
/
(
48
*
ri
[
:params
][
:N
]
**
2
))
*
(
1
<<
(
ri
[
:params
][
:pi
]
+
1
))}
# find the best median time with eta_C under 100%
# restrict to eta_C under 100%
results
.
select!
{
|
ri
|
ri
[
:bench
][
:noise
][
:eta_concrete
]
<=
100.0
}
if
results
.
empty?
$stderr
.
puts
"(!)
\e
[31m
\e
[1mNo params with eta < 100% found
\e
[0m for λ =
#{
lambda
}
, π =
#{
pi
}
, 2^2Δ =
#{
qw
}
"
next
end
# take the best median time
bp
=
results
.
select
{
|
ri
|
ri
[
:bench
][
:noise
][
:eta_concrete
]
<=
100.0
}.
sort_by
{
|
ri
|
ri
[
:bench
][
:time
][
:time_median_ms
]
}.
first
params
=
bp
[
:params
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment