class_docstr: Test case which handles TPU hard placement.
class_docstr_tok: ["Test","case","which","handles","TPU","hard","placement","."]
docstr: Returns a good tolerance for numerical closeness tests.
  
  Any TPU matmuls go via bfloat16, so an assertAllClose which passes under
  some constant small tolerance on CPU will generally fail on TPU. All test
  cases can call get_atol to get an appropriate number.
  
  TODO(mareynolds): assess these thresholds in detail.
  
  Returns:
    small float, eg 1e-4 on CPU/GPU, 5se-3 on TPU.
docstr_tok: ["Returns","a","good","tolerance","for","numerical","closeness","tests",".","Any","TPU","matmuls","go","via","bfloat16",",","so","an","assertAllClose","which","passes","under","some","constant","small","tolerance","on","CPU","will","generally","fail","on","TPU",".","All","test","cases","can","call","get_atol","to","get","an","appropriate","number",".","TODO","(","mareynolds",")",":","assess","these","thresholds","in","detail",".","Returns",":","small","float",",","eg","1e-4","on","CPU\/GPU",",","5se-3","on","TPU","."]
code: def get_atol(self):
      """Returns a good tolerance for numerical closeness tests.
  
      Any TPU matmuls go via bfloat16, so an assertAllClose which passes under
      some constant small tolerance on CPU will generally fail on TPU. All test
      cases can call get_atol to get an appropriate number.
  
      TODO(mareynolds): assess these thresholds in detail.
  
      Returns:
        small float, eg 1e-4 on CPU/GPU, 5se-3 on TPU.
      """
      if self._on_tpu:
          return 5e-3
      else:
          return 1e-4
  
imports: import functools
  import inspect
  import itertools
  import os
  import sys
  import threading
  import types
  from typing import Sequence, Tuple, Type, TypeVar
  from absl.testing import parameterized
  import tensorflow
label_desc: Use image node_id 5 for calling the TestCase obj's underlying member method code with example usage: obj.get_atol() and returns: int, int