code: def check_installation():
      """
      This function will check the installation of colossalai, specifically, the version compatibility of
      colossalai, pytorch and cuda.
  
      Example:
      ```text
      ```
  
      Returns: A table of installation information.
      """
      found_aot_cuda_ext = _check_aot_built_cuda_extension_installed()
      cuda_version = _check_cuda_version()
      torch_version, torch_cuda_version = _check_torch_version()
      (
          colossalai_version,
          prebuilt_torch_version_required,
          prebuilt_cuda_version_required,
      ) = _parse_colossalai_version()
  
      # if cuda_version is None, that means either
      # CUDA_HOME is not found, thus cannot compare the version compatibility
      if not cuda_version:
          sys_torch_cuda_compatibility = None
      else:
          sys_torch_cuda_compatibility = _is_compatible(
              [cuda_version, torch_cuda_version]
          )
  
      # if cuda_version or cuda_version_required is None, that means either
      # CUDA_HOME is not found or AOT compilation is not enabled
      # thus, there is no need to compare the version compatibility at all
      if not cuda_version or not prebuilt_cuda_version_required:
          sys_colossalai_cuda_compatibility = None
      else:
          sys_colossalai_cuda_compatibility = _is_compatible(
              [cuda_version, prebuilt_cuda_version_required]
          )
  
      # if torch_version_required is None, that means AOT compilation is not enabled
      # thus there is no need to compare the versions
      if prebuilt_torch_version_required is None:
          torch_compatibility = None
      else:
          torch_compatibility = _is_compatible(
              [torch_version, prebuilt_torch_version_required]
          )
  
      click.echo(f"#### Installation Report ####")
      click.echo(f"\n------------ Environment ------------")
      click.echo(
          f"Colossal-AI version: {to_click_output(colossalai_version)}"
      )
      click.echo(f"PyTorch version: {to_click_output(torch_version)}")
      click.echo(
          f"System CUDA version: {to_click_output(cuda_version)}"
      )
      click.echo(
          f"CUDA version required by PyTorch: {to_click_output(torch_cuda_version)}"
      )
      click.echo("")
      click.echo(f"Note:")
      click.echo(
          f"1. The table above checks the versions of the libraries/tools in the current environment"
      )
      click.echo(
          f"2. If the System CUDA version is N/A, you can set the CUDA_HOME environment variable to locate it"
      )
      click.echo(
          f"3. If the CUDA version required by PyTorch is N/A, you probably did not install a CUDA-compatible PyTorch. This value is give by torch.version.cuda and you can go to https://pytorch.org/get-started/locally/ to download the correct version."
      )
  
      click.echo(
          f"\n------------ CUDA Extensions AOT Compilation ------------"
      )
      click.echo(
          f"Found AOT CUDA Extension: {to_click_output(found_aot_cuda_ext)}"
      )
      click.echo(
          f"PyTorch version used for AOT compilation: {to_click_output(prebuilt_torch_version_required)}"
      )
      click.echo(
          f"CUDA version used for AOT compilation: {to_click_output(prebuilt_cuda_version_required)}"
      )
      click.echo("")
      click.echo(f"Note:")
      click.echo(
          f"1. AOT (ahead-of-time) compilation of the CUDA kernels occurs during installation when the environment variable CUDA_EXT=1 is set"
      )
      click.echo(
          f"2. If AOT compilation is not enabled, stay calm as the CUDA kernels can still be built during runtime"
      )
  
      click.echo(f"\n------------ Compatibility ------------")
      click.echo(
          f"PyTorch version match: {to_click_output(torch_compatibility)}"
      )
      click.echo(
          f"System and PyTorch CUDA version match: {to_click_output(sys_torch_cuda_compatibility)}"
      )
      click.echo(
          f"System and Colossal-AI CUDA version match: {to_click_output(sys_colossalai_cuda_compatibility)}"
      )
      click.echo(f"")
      click.echo(f"Note:")
      click.echo(
          f"1. The table above checks the version compatibility of the libraries/tools in the current environment"
      )
      click.echo(
          f"   - PyTorch version mismatch: whether the PyTorch version in the current environment is compatible with the PyTorch version used for AOT compilation"
      )
      click.echo(
          f"   - System and PyTorch CUDA version match: whether the CUDA version in the current environment is compatible with the CUDA version required by PyTorch"
      )
      click.echo(
          f"   - System and Colossal-AI CUDA version match: whether the CUDA version in the current environment is compatible with the CUDA version used for AOT compilation"
      )
  
file_path: ColossalAI/colossalai/cli/check/check_installation.py
imports: import subprocess
  import click
  import torch
  from torch.utils.cpp_extension import CUDA_HOME
  import colossalai
label_desc: Use image node_id 2 for calling a global function with example usage: check_installation() without return types