parameters: ()
docstring: Check whether PaddlePaddle is installed correctly and running successfully
      on your system.
  
      Examples:
          .. code-block:: python
  
              import paddle
  
              paddle.utils.run_check()
              # Running verify PaddlePaddle program ...
              # W1010 07:21:14.972093  8321 device_context.cc:338] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 11.0, Runtime API Version: 10.1
              # W1010 07:21:14.979770  8321 device_context.cc:346] device: 0, cuDNN Version: 7.6.
              # PaddlePaddle works well on 1 GPU.
              # PaddlePaddle works well on 8 GPUs.
              # PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.
docstring_summary: Check whether PaddlePaddle is installed correctly and running successfully
      on your system.
docstring_tokens: Check whether PaddlePaddle is installed correctly and running successfully on your system .
function: def run_check():
      """
      Check whether PaddlePaddle is installed correctly and running successfully
      on your system.
  
      Examples:
          .. code-block:: python
  
              import paddle
  
              paddle.utils.run_check()
              # Running verify PaddlePaddle program ...
              # W1010 07:21:14.972093  8321 device_context.cc:338] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 11.0, Runtime API Version: 10.1
              # W1010 07:21:14.979770  8321 device_context.cc:346] device: 0, cuDNN Version: 7.6.
              # PaddlePaddle works well on 1 GPU.
              # PaddlePaddle works well on 8 GPUs.
              # PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.
      """
  
      print("Running verify PaddlePaddle program ... ")
  
      use_cuda = False
      use_xpu = False
      use_npu = False
  
      if paddle.is_compiled_with_cuda():
          use_cuda = _is_cuda_available()
      elif paddle.is_compiled_with_xpu():
          use_xpu = _is_xpu_available()
      elif paddle.is_compiled_with_npu():
          use_npu = _is_npu_available()
  
      if use_cuda:
          device_str = "GPU"
          device_list = paddle.static.cuda_places()
      elif use_xpu:
          device_str = "XPU"
          device_list = paddle.static.xpu_places()
      elif use_npu:
          device_str = "NPU"
          device_list = paddle.static.npu_places()
      else:
          device_str = "CPU"
          device_list = paddle.static.cpu_places(device_count=2)
      device_count = len(device_list)
  
      _run_static_single(use_cuda, use_xpu, use_npu)
      _run_dygraph_single(use_cuda, use_xpu, use_npu)
      print("PaddlePaddle works well on 1 {}.".format(device_str))
  
      try:
          _run_static_parallel(use_cuda, use_xpu, use_npu, device_list)
          print("PaddlePaddle works well on {} {}s.".format(device_count,
                                                            device_str))
          print(
              "PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now."
          )
      except Exception as e:
          logging.warning(
              "PaddlePaddle meets some problem with {} {}s. This may be caused by:"
              "\n 1. There is not enough GPUs visible on your system"
              "\n 2. Some GPUs are occupied by other process now"
              "\n 3. NVIDIA-NCCL2 is not installed correctly on your system. Please follow instruction on https://github.com/NVIDIA/nccl-tests "
              "\n to test your NCCL, or reinstall it following https://docs.nvidia.com/deeplearning/sdk/nccl-install-guide/index.html".
              format(device_count, device_str))
  
          logging.warning("\n Original Error is: {}".format(e))
          print("PaddlePaddle is installed successfully ONLY for single {}! "
                "Let's start deep learning with PaddlePaddle now.".format(
                    device_str))
function_tokens: def run_check ( ) : print ( "Running verify PaddlePaddle program ... " ) use_cuda = False use_xpu = False use_npu = False if paddle . is_compiled_with_cuda ( ) : use_cuda = _is_cuda_available ( ) elif paddle . is_compiled_with_xpu ( ) : use_xpu = _is_xpu_available ( ) elif paddle . is_compiled_with_npu ( ) : use_npu = _is_npu_available ( ) if use_cuda : device_str = "GPU" device_list = paddle . static . cuda_places ( ) elif use_xpu : device_str = "XPU" device_list = paddle . static . xpu_places ( ) elif use_npu : device_str = "NPU" device_list = paddle . static . npu_places ( ) else : device_str = "CPU" device_list = paddle . static . cpu_places ( device_count = 2 ) device_count = len ( device_list ) _run_static_single ( use_cuda , use_xpu , use_npu ) _run_dygraph_single ( use_cuda , use_xpu , use_npu ) print ( "PaddlePaddle works well on 1 {}." . format ( device_str ) ) try : _run_static_parallel ( use_cuda , use_xpu , use_npu , device_list ) print ( "PaddlePaddle works well on {} {}s." . format ( device_count , device_str ) ) print ( "PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now." ) except Exception as e : logging . warning ( "PaddlePaddle meets some problem with {} {}s. This may be caused by:" "\n 1. There is not enough GPUs visible on your system" "\n 2. Some GPUs are occupied by other process now" "\n 3. NVIDIA-NCCL2 is not installed correctly on your system. Please follow instruction on https://github.com/NVIDIA/nccl-tests " "\n to test your NCCL, or reinstall it following https://docs.nvidia.com/deeplearning/sdk/nccl-install-guide/index.html" . format ( device_count , device_str ) ) logging . warning ( "\n Original Error is: {}" . format ( e ) ) print ( "PaddlePaddle is installed successfully ONLY for single {}! " "Let's start deep learning with PaddlePaddle now." . format ( device_str ) )