class_docstr: Concat gradients together to optimize transfer.
docstr: Args:
      all_grads: K x N, K lists of gradients to be packed
docstr_tok: ["Args",":","all_grads",":","K","x","N",",","K","lists","of","gradients","to","be","packed"]
code: def pack_all(self, all_grads, devices):
      """
      Args:
          all_grads: K x N, K lists of gradients to be packed
      """
      ret = []  # #GPU x #split
      for dev, grads in zip(devices, all_grads):
          with tf.device(dev):
              ret.append(self.pack(grads))
      return ret
  
imports: import operator
  from contextlib import contextmanager
  import tensorflow
  import threading
  from ..compat import tfv1
  from ..tfutils.common import get_tf_version_tuple
  from ..tfutils.scope_utils import cached_name_scope, under_name_scope
  from ..tfutils.varreplace import custom_getter_scope
  from ..utils import logger
  from ..utils.argtools import call_only_once
label_desc: Use image node_id 5 for calling the GradientPacker obj's underlying member method code with example usage: obj.pack_all(all_grads, devices) and returns: ret