Skip to content

Commit

Permalink
tweaking CI so that experimental does not break the rest
Browse files Browse the repository at this point in the history
  • Loading branch information
blefaudeux committed Jan 24, 2022
1 parent b9e8906 commit ffb1d89
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ run_coverage: &run_coverage
- run:
name: Run Unit Tests With Coverage
command: |
pytest --junitxml=test-results/junit.xml --verbose --timeout 600 --cov-report=xml --cov=./
pytest --junitxml=test-results/junit.xml --verbose --timeout 600 --cov-report=xml --cov=./ tests
#Uploading test coverage for Python code
bash <(curl -s https://codecov.io/bash) -f coverage.xml -cF Python
run_unittests: &run_unittests
- run:
name: Run Unit Tests
command: |
pytest --junitxml=test-results/junit.xml --verbose --timeout 600
pytest --junitxml=test-results/junit.xml --verbose --timeout 600 tests
run_benchmarks: &run_benchmarks
- run:
Expand Down
4 changes: 4 additions & 0 deletions experimental/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ The kernels in this folder are experimental, and for now not tied to the rest of
- (Optional) install the kernels present here by running `pip install -e .` in this folder

- (Optional) Check that the installation is successful by running `pytest tests` in this folder

## If things go south, grab a backtrace as follows

`gdb -batch -ex run -ex bt --args python -m pytest [..]`
4 changes: 4 additions & 0 deletions experimental/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
4 changes: 4 additions & 0 deletions experimental/ragged_inference/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
6 changes: 6 additions & 0 deletions experimental/ragged_inference/triton_v2_matmul.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.


import torch
import triton
import triton.language as tl
Expand Down
6 changes: 6 additions & 0 deletions experimental/ragged_inference/triton_v2_qk_dotprod.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.


import torch
import triton
import triton.language as tl
Expand Down
8 changes: 8 additions & 0 deletions experimental/ragged_inference/triton_v2_ragged_qk_dotprod.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.

from dataclasses import dataclass
from typing import List, Optional

Expand All @@ -7,6 +12,9 @@
from ragged_inference.garbage_pad_ragged_acts import RaggedActivations
from triton.ops.matmul_perf_model import estimate_matmul_time, prune_num_stages

# This implements a ragged attention (batched attention mechanism natively handling different sequence sizes)
# Author: Tom B Brown


def init_to_zero(name):
return lambda nargs: nargs[name].zero_()
Expand Down
6 changes: 6 additions & 0 deletions experimental/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.


from setuptools import setup

setup(
Expand Down
2 changes: 2 additions & 0 deletions experimental/tests/test_triton_v2_matmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.


import pytest
import torch
from ragged_inference.test_utils import assert_eq
Expand Down
2 changes: 2 additions & 0 deletions experimental/tests/test_triton_v2_qk_dotprod.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.


import time

import pytest
Expand Down
2 changes: 2 additions & 0 deletions experimental/tests/test_triton_v2_ragged_qk_dotprod.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.


import time

import torch
Expand Down

0 comments on commit ffb1d89

Please sign in to comment.