Skip to content

Commit

Permalink
Add tripy L0 CI yml
Browse files Browse the repository at this point in the history
Signed-off-by: yizhuoz004 <[email protected]>
  • Loading branch information
yizhuoz004 committed Aug 15, 2024
1 parent cef7968 commit 8e10a29
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/tripy-l0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tripy CI

on:
pull_request:
branches:
- main
paths: ['tripy/**']

env:
DEFAULT_IMAGE: ghcr.io/nvidia/tensorrt-incubator/tripy
NEW_TEST_IMAGE: test-image:latest


jobs:
tripy-l0:
runs-on: tripy-self-hosted

steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
new_container:
- 'tripy/Dockerfile'
- 'tripy/pyproject.toml'
- if: steps.filter.outputs.new_container == 'true'
run: echo "l0_image=${{ env.NEW_TEST_IMAGE }}" >> "$GITHUB_ENV"
- if: steps.filter.outputs.new_container != 'true'
run: echo "l0_image=${{ env.DEFAULT_IMAGE }}" >> "$GITHUB_ENV"
- run: echo "Tests will run in $l0_image"

- name: build-new-container
if: steps.filter.outputs.new_container == 'true'
uses: docker/build-push-action@v6
with:
context: tripy/
tags: ${{ env.NEW_TEST_IMAGE }}
push: false

- name: run-test
uses: addnab/docker-run-action@v3
with:
image: ${{ env.l0_image }}
options: --gpus all -v ${{ github.workspace }}:/tripy
run: |
cd tripy
pytest -v -m "l0 or not l1"
1 change: 0 additions & 1 deletion tripy/tripy/frontend/trace/ops/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def infer_rank(self):
self.outputs[0].rank = len(self.shape)

def infer_devices(self):
# This is different from self.device
# Constants are always on device when executed by mlir
self.outputs[0].device = tripy.common.device("gpu")

Expand Down

0 comments on commit 8e10a29

Please sign in to comment.