Exemple #1
0
 def __init__(self, *args, **kwargs):
     super(NUQEstimatorSingleGPUParallel, self).__init__(*args, **kwargs)
     self.init_data_iter()
     nuq_kwargs = opt_to_nuq_kwargs(self.opt)
     self.ngpu = self.opt.nuq_ngpu
     self.acc_grad = None
     self.models = None
     self.qdq = QuantizeMultiBucket(**nuq_kwargs)
Exemple #2
0
 def __init__(self, *args, **kwargs):
     super(NUQEstimatorMultiGPUParallel, self).__init__(*args, **kwargs)
     self.init_data_iter()
     nuq_kwargs = opt_to_nuq_kwargs(self.opt)
     self.ngpu = self.opt.nuq_ngpu
     self.acc_grad = None
     self.models = None
     self.qdq = []
     for i in range(self.ngpu):
         with torch.cuda.device(i):
             self.qdq += [QuantizeMultiBucket(**nuq_kwargs)]
Exemple #3
0
 def __init__(self, *args, **kwargs):
     super(NUQEstimator, self).__init__(*args, **kwargs)
     self.init_data_iter()
     self.qdq = QuantizeMultiBucket(**opt_to_nuq_kwargs(self.opt))
     self.ngpu = self.opt.nuq_ngpu
     self.acc_grad = None