File tree Expand file tree Collapse file tree 5 files changed +14
-9
lines changed Expand file tree Collapse file tree 5 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -69,15 +69,15 @@ jobs:
6969 image : ${{ env.l0_image }}
7070 options : --gpus all -v ${{ github.workspace }}/tripy:/tripy
7171 run : |
72- pytest --cov=tripy/ --cov-config=.coveragerc tests/ -v -m "not l1 and not manual" -n 4 --durations=15 --benchmark-skip
72+ pytest --cov=tripy/ --cov-config=.coveragerc tests/ -v -m "not l1 and not manual" -n 4 --durations=15 --ignore tests/performance
7373
7474 - name : Run performance benchmarks
7575 uses : addnab/docker-run-action@v3
7676 with :
7777 image : ${{ env.l0_image }}
7878 options : --gpus all -v ${{ github.workspace }}/tripy:/tripy
7979 run : |
80- pytest tests/ -v -m "not l1 and not manual" --benchmark-warmup=on --benchmark-only --benchmark-json benchmark.json
80+ pytest tests/performance -v -m "not l1 and not manual" --benchmark-warmup=on --benchmark-json benchmark.json
8181
8282 - name : Store benchmark result
8383 uses : benchmark-action/github-action-benchmark@v1
Original file line number Diff line number Diff line change 5353 - name : l1-test
5454 run : |
5555 cd /tripy/
56- pytest --cov=tripy/ --cov-config=.coveragerc tests/ -v -m "not manual" -n 4 --durations=15 --benchmark-skip
56+ pytest --cov=tripy/ --cov-config=.coveragerc tests/ -v -m "not manual" -n 4 --durations=15 --ignore tests/performance
Original file line number Diff line number Diff line change @@ -10,15 +10,20 @@ The `tests/integration` directory captures the latter group of tests.
1010
1111You can run all tests locally in the development container by running:
1212``` bash
13- pytest tests/ -v
13+ pytest tests/ -v -n 4 --dist worksteal --ignore tests/performance
14+ pytest tests/performance -v
1415```
1516
17+ Performance tests are run separately because they must run serially to ensure
18+ accurate measurements.
19+
1620You can also provide marker arguments to only run specific test cadences
1721(see [ the test cadence section] ( #test-cadence ) below). For example, to run only
1822L0 tests, use:
1923
2024``` bash
21- pytest tests/ -v -m " not l1 and not manual" -n 4
25+ pytest tests/ -v -m " not l1 and not manual" -n 4 --dist worksteal --ignore tests/performance
26+ pytest tests/performance -v -m " not l1 and not manual"
2227```
2328
2429
@@ -56,7 +61,7 @@ http://localhost:8080/snakeviz/%2Ftripy%2Fprof%2Fcombined.prof
5661You can generate code coverage reports locally by running:
5762
5863``` bash
59- pytest --cov=tripy/ --cov-report=html --cov-config=.coveragerc tests/ -n 4 - v
64+ pytest --cov=tripy/ --cov-report=html --cov-config=.coveragerc tests/ -v
6065```
6166
6267To view the report, open the ` htmlcov/index.html ` file from the root directory in a browser.
Original file line number Diff line number Diff line change 1919import tripy as tp
2020
2121
22- # TODO: File issue for FP32:
2322@perf_fixture (
2423 params = [
25- pytest . param ( PerfParam (tp .float32 ), marks = pytest . mark . skip ( "Bug in MLIR-TRT" ) ),
26- PerfParam (tp .float16 , 1.10 ),
24+ PerfParam (tp .float32 , 1.25 ),
25+ PerfParam (tp .float16 ),
2726 ]
2827)
2928def linear_block (tripy_dtype , torch_dtype ):
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ def func({arg_str}):
125125
126126 return (end - start ) / (iterations * 1000.0 )
127127
128+ # TODO: Finish this:
128129 print ()
129130 for i in range (1 , 10 ):
130131 print (f"{ i :2} : { measure_overhead (i , 10 , 1000 )} us" )
You can’t perform that action at this time.
0 commit comments