class_docstr: Benchmarks runtime and error of crypten functions against PyTorch
  
  Args:
      tensor_size (int or tuple): size of tensor for benchmarking runtimes
class_docstr_tok: ["Benchmarks","runtime","and","error","of","crypten","functions","against","PyTorch","Args",":","tensor_size","(","int","or","tuple",")",":","size","of","tensor","for","benchmarking","runtimes"]
docstr: Computes total absolute error
docstr_tok: ["Computes","total","absolute","error"]
code: def calc_abs_error(ref, out):
      """Computes total absolute error"""
      ref, out = ref.cpu(), out.cpu()
      if ref.dtype == torch.bool:
          errors = (out != ref).numpy().sum()
          return errors
      errors = torch.abs(out - ref).numpy()
      return errors.sum()
  
imports: import argparse
  import functools
  import os
  import timeit
  from collections import namedtuple
  import crypten
  import crypten.communicator
  import numpy
  import pandas
  import torch
  from examples import multiprocess_launcher
label_desc: Use image node_id 8 for calling the FuncBenchmarks obj's underlying member method code with example usage: obj.calc_abs_error(ref, out) and returns: errors, errors