hunk.code_window: from deepspeed.ops.op_builder import CPUAdagradBuilder
   if not deepspeed.ops.__compatible_ops__[CPUAdagradBuilder.NAME]:
       pytest.skip("cpu-adagrad is not compatible")
   def check_equal(first, second, atol=1e-2, verbose=False):
  
hunk.labels: keep keep keep replace keep keep keep
hunk.after_edit:     pytest.skip("cpu-adagrad is not compatible", allow_module_level=True)
  
hunk.file_path: tests/unit/ops/adagrad/test_cpu_adagrad.py
hunk.type: replace
file: name: amd
  
  on:
    push:
      branches:
        - 'master'
        - 'staging**'
      paths-ignore:
        - 'docs/**'
    pull_request:
      paths-ignore:
        - 'docs/**'
  
  concurrency:
    group: ${{ github.workflow }}-${{ github.ref }}
    cancel-in-progress: true
  
  jobs:
    unit-tests:
      # The type of runner that the job will run on
      runs-on: [self-hosted, amd]
  
      # Steps represent a sequence of tasks that will be executed as part of the job
      steps:
        # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
        - uses: actions/checkout@v2
  
        # Runs a single command using the runners shell
        - name: environment
          run: |
            rocm-smi --showhw
            which python
            python --version
            which hipcc
            hipcc --version
            python -c "import torch; print('torch:', torch.__version__, torch)"
            python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
            sudo apt-get update
            sudo apt-get install -y libaio-dev
  
        - name: Python environment
          run: |
            pip list
  
        - name: Install transformers
          run: |
            git clone https://github.com/huggingface/transformers
            cd transformers
            # if needed switch to the last known good SHA until transformers@master is fixed
            # git checkout 1cc453d33
            git rev-parse --short HEAD
            pip install .
  
        # Runs a set of commands using the runners shell
        - name: Install deepspeed
          run: |
            pip install .[dev,1bit,autotuning]
            #python -c "from deepspeed.env_report import cli_main; cli_main()"
            ds_report
  
        # Runs a set of commands using the runners shell
        - name: Unit tests
          run: |
            if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi
            cd tests
            TORCH_EXTENSIONS_DIR=./torch-extensions pytest --color=yes --durations=0 --forked --verbose -x -n 4 unit/
            TORCH_EXTENSIONS_DIR=./torch-extensions pytest --color=yes --durations=0 --forked --verbose -x -m 'sequential' unit/
  