Skip to content

Commit d09d996

Browse files
committed
Move kernels package to kernels directory
1 parent 13d73ef commit d09d996

51 files changed

Lines changed: 25 additions & 10 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build_documentation.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main
1313
with:
1414
commit_sha: ${{ github.sha }}
15+
package_path: kernels/
1516
package: kernels
1617
secrets:
1718
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}

.github/workflows/build_pr_documentation.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Build PR Documentation
22

3-
on: pull_request
3+
on:
4+
pull_request:
5+
paths:
6+
- "docs/**"
7+
- "kernels/**"
8+
- ".github/workflows/build_pr_documentation.yml"
49

510
concurrency:
611
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -12,4 +17,5 @@ jobs:
1217
with:
1318
commit_sha: ${{ github.event.pull_request.head.sha }}
1419
pr_number: ${{ github.event.number }}
20+
package_path: kernels/kernels/
1521
package: kernels

.github/workflows/lint.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ jobs:
99
- name: Run ruff
1010
uses: astral-sh/ruff-action@v3
1111
src: >-
12-
src
13-
tests
12+
kernels
1413
1514
black:
1615
name: Run black check
@@ -30,8 +29,7 @@ jobs:
3029

3130
- name: Check formatting
3231
run: |
33-
uv run black --check src
34-
uv run black --check tests
32+
uv run black --check kernels
3533
3634
validate-dependencies:
3735
name: Validate python_depends.json
@@ -46,7 +44,7 @@ jobs:
4644

4745
- name: Validate python_depends.json is up-to-date
4846
run: |
49-
python update_python_depends.py --validate || {
47+
python ( cd kernels && update_python_depends.py --validate ) || {
5048
echo "Error: python_depends.json is out of date."
5149
echo "Please run: python update_python_depends.py"
5250
exit 1
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
build
2323
--user
2424
- name: Build a binary wheel and a source tarball
25-
run: python3 -m build
25+
run: ( cd kernels && python3 -m build )
2626
- name: Store the distribution packages
2727
uses: actions/upload-artifact@v6
2828
with:
2929
name: python-package-distributions
30-
path: dist/
30+
path: kernels/dist/
3131

3232
publish-to-pypi:
3333
name: >-
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414

1515
jobs:
1616
build:
17-
name: Run tests
17+
name: Run kernels tests
1818
runs-on:
1919
group: aws-g6-24xlarge
2020
permissions:
@@ -39,44 +39,54 @@ jobs:
3939
python-version: ${{ matrix.python-version }}
4040

4141
- name: Lock Torch version
42+
working-directory: ./kernels
4243
run: uv lock --upgrade-package "torch==${{ matrix.torch-version }}"
4344

4445
- name: Install the project
46+
working-directory: ./kernels
4547
run: uv sync --all-extras --dev
4648

4749
- name: Install setuptools for Triton-based test
50+
working-directory: ./kernels
4851
run: uv pip install setuptools
4952

5053
- name: Check typing
54+
working-directory: ./kernels
5155
run: uv run mypy src/kernels
5256

5357
- name: Run tests
58+
working-directory: ./kernels
5459
run: |
5560
uv run pytest tests
5661
5762
- name: Re-run dependency test with dependencies installed
63+
working-directory: ./kernels
5864
run: |
5965
uv pip install einops nvidia-cutlass-dsl
6066
uv run pytest tests/test_deps.py
6167
6268
- name: Run staging tests
69+
working-directory: ./kernels
6370
env:
6471
HF_TOKEN: ${{ secrets.HF_STAGING_TOKEN }}
6572
run: |
6673
HUGGINGFACE_CO_STAGING=true uv run pytest --token -m "is_staging_test" tests/
6774
if: matrix.python_version == '3.10' && matrix.torch-version == '2.7.0'
6875

6976
- name: Check README generation
77+
working-directory: ./kernels
7078
# For now, just checks that generation doesn't fail.
7179
run: |
7280
uv run kernels generate-readme kernels-community/triton-layer-norm
7381
7482
- name: Check kernel check
83+
working-directory: ./kernels
7584
run: |
76-
uv pip install kernel-abi-check
85+
uv pip install ../kernel-abi-check/bindings/python
7786
kernels check kernels-community/activation
7887
7988
- name: Import check without torch
89+
working-directory: ./kernels
8090
run: |
8191
uv pip uninstall torch
8292
python -c "import kernels"
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)