cuda-unit-test.yml 988 Bytes
Newer Older
1
2
3
4
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

trigger:
5
  - main
6
  - release/*
7
8
9
10
11
12
13

pool:
  name: SuperBench CI
  vmImage: ubuntu-latest

container:
  image: nvcr.io/nvidia/pytorch:20.12-py3
14
  options: '-v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker'
15
16

steps:
17
18
19
  - script: |
      echo "##vso[task.prependpath]$HOME/.local/bin"
    displayName: Export path
20
  - script: |
21
      python3 -m pip install .[test,nvidia,torch,ort,mpi]
22
      make postinstall
23
24
25
26
    displayName: Install dependencies
  - script: |
      python3 setup.py lint
    displayName: Run code lint
27
28
29
  - script: |
      SB_MICRO_PATH=$PWD make cppbuild
    displayName: Build benchmarks
30
  - script: |
31
      SB_MICRO_PATH=$PWD python3 setup.py test
32
    displayName: Run unit tests
33
    timeoutInMinutes: 15
34
  - script: |
35
      bash <(curl -s https://codecov.io/bash) -cF cuda-unit-test
36
    displayName: Report coverage results
37
38
    env:
      CODECOV_TOKEN: $(codecovToken)