code: def check_kernel_output(self, func, gpu_args, instance, answer, atol, verify, verbose):
          
          logging.debug('check_kernel_output')
  
          #if not using custom verify function, check if the length is the same
          if not verify and len(instance.arguments) != len(answer):
              raise TypeError("The length of argument list and provided results do not match.")
  
          #zero GPU memory for output arguments
          for i, arg in enumerate(instance.arguments):
              if verify or answer[i] is not None:
                  if isinstance(arg, numpy.ndarray):
                      self.dev.memcpy_htod(gpu_args[i], arg)
  
          #run the kernel
          check = self.run_kernel(func, gpu_args, instance)
          if not check:
              return True #runtime failure occured that should be ignored, skip correctness check
  
          #retrieve gpu results to host memory
          result_host = []
          for i, arg in enumerate(instance.arguments):
              if verify or answer[i] is not None:
                  if isinstance(arg, numpy.ndarray):
                      result_host.append(numpy.zeros_like(arg))
                      self.dev.memcpy_dtoh(result_host[-1], gpu_args[i])
              else:
                  result_host.append(None)
  
          #if the user has specified a custom verify function, then call it, else use default based on numpy allclose
          if verify:
              try:
                  return verify(answer, result_host, atol=atol)
              except TypeError:
                  return verify(answer, result_host)
          else:
              return _default_verify_function(instance, answer, result_host, atol, verbose)
docs: runs the kernel once and checks the result against answer