MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / options_from_args

Method options_from_args

Compiler/program.py:823–849  ·  view source on GitHub ↗

Set a number of options from the command-line arguments.

(self)

Source from the content-addressed store, hash-verified

821 self._linear_rounds = change
822
823 def options_from_args(self):
824 """Set a number of options from the command-line arguments."""
825 if "trunc_pr" in self.args:
826 self.use_trunc_pr = True
827 if "signed_trunc_pr" in self.args:
828 self.use_trunc_pr = -1
829 if "trunc_pr20" in self.args:
830 self.use_trunc_pr = 20
831 if "split" in self.args or "split3" in self.args:
832 self.use_split(3)
833 for arg in self.args:
834 m = re.match("split([0-9]+)", arg)
835 if m:
836 self.use_split(int(m.group(1)))
837 m = re.match("unsplit([0-9]+)", arg)
838 if m:
839 self.use_unsplit = int(m.group(1))
840 if "raw" in self.args:
841 self.always_raw(True)
842 if "edabit" in self.args:
843 self.use_edabit(True)
844 if "invperm" in self.args:
845 self.use_invperm(True)
846 if "linear_rounds" in self.args:
847 self.linear_rounds(True)
848 if "back_mulm" in self.args:
849 self.use_mulm = -1
850
851 def disable_memory_warnings(self):
852 self.warn_about_mem.append(False)

Callers 8

torch_vgg.pyFile · 0.80
torch_resnet.pyFile · 0.80
torch_densenet.pyFile · 0.80
fmul-bench.pyFile · 0.80
torch_squeeze.pyFile · 0.80
trunc-bench.pyFile · 0.80
fdiv-bench.pyFile · 0.80
comp-bench.pyFile · 0.80

Calls 6

use_splitMethod · 0.95
always_rawMethod · 0.95
use_edabitMethod · 0.95
use_invpermMethod · 0.95
linear_roundsMethod · 0.95
matchMethod · 0.80

Tested by

no test coverage detected