ninetoothed 0.10.0__tar.gz → 0.11.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ninetoothed-0.11.0/.github/workflows/publish-to-pypi.yml +92 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/PKG-INFO +1 -1
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/pyproject.toml +1 -1
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/src/ninetoothed/tensor.py +16 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/.github/workflows/pytest.yml +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/.github/workflows/ruff.yml +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/.gitignore +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/LICENSE +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/README.md +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/docs/README.zh.md +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/docs/source/_static/matmul-tiling.png +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/docs/source/_static/ninetoothed-logo.png +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/docs/source/_static/vecadd-tiling.png +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/requirements.txt +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/src/ninetoothed/__init__.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/src/ninetoothed/jit.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/src/ninetoothed/language.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/src/ninetoothed/naming.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/src/ninetoothed/symbol.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/src/ninetoothed/torchifier.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/tests/__init__.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/tests/skippers.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/tests/test_add.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/tests/test_addmm.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/tests/test_matmul.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/tests/test_naming.py +0 -0
- {ninetoothed-0.10.0 → ninetoothed-0.11.0}/tests/test_softmax.py +0 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
name: Publish Python 🐍 distribution 📦 to PyPI
|
2
|
+
|
3
|
+
on: push
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
name: Build distribution 📦
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v4
|
12
|
+
with:
|
13
|
+
persist-credentials: false
|
14
|
+
- name: Set up Python
|
15
|
+
uses: actions/setup-python@v5
|
16
|
+
with:
|
17
|
+
python-version: "3.x"
|
18
|
+
- name: Install pypa/build
|
19
|
+
run: >-
|
20
|
+
python3 -m
|
21
|
+
pip install
|
22
|
+
build
|
23
|
+
--user
|
24
|
+
- name: Build a binary wheel and a source tarball
|
25
|
+
run: python3 -m build
|
26
|
+
- name: Store the distribution packages
|
27
|
+
uses: actions/upload-artifact@v4
|
28
|
+
with:
|
29
|
+
name: python-package-distributions
|
30
|
+
path: dist/
|
31
|
+
|
32
|
+
publish-to-pypi:
|
33
|
+
name: >-
|
34
|
+
Publish Python 🐍 distribution 📦 to PyPI
|
35
|
+
if: startsWith(github.ref, 'refs/tags/')
|
36
|
+
needs:
|
37
|
+
- build
|
38
|
+
runs-on: ubuntu-latest
|
39
|
+
environment:
|
40
|
+
name: pypi
|
41
|
+
url: https://pypi.org/p/ninetoothed
|
42
|
+
permissions:
|
43
|
+
id-token: write
|
44
|
+
|
45
|
+
steps:
|
46
|
+
- name: Download all the dists
|
47
|
+
uses: actions/download-artifact@v4
|
48
|
+
with:
|
49
|
+
name: python-package-distributions
|
50
|
+
path: dist/
|
51
|
+
- name: Publish distribution 📦 to PyPI
|
52
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
53
|
+
|
54
|
+
github-release:
|
55
|
+
name: >-
|
56
|
+
Sign the Python 🐍 distribution 📦 with Sigstore
|
57
|
+
and upload them to GitHub Release
|
58
|
+
needs:
|
59
|
+
- publish-to-pypi
|
60
|
+
runs-on: ubuntu-latest
|
61
|
+
|
62
|
+
permissions:
|
63
|
+
contents: write
|
64
|
+
id-token: write
|
65
|
+
|
66
|
+
steps:
|
67
|
+
- name: Download all the dists
|
68
|
+
uses: actions/download-artifact@v4
|
69
|
+
with:
|
70
|
+
name: python-package-distributions
|
71
|
+
path: dist/
|
72
|
+
- name: Sign the dists with Sigstore
|
73
|
+
uses: sigstore/gh-action-sigstore-python@v3.0.0
|
74
|
+
with:
|
75
|
+
inputs: >-
|
76
|
+
./dist/*.tar.gz
|
77
|
+
./dist/*.whl
|
78
|
+
- name: Create GitHub Release
|
79
|
+
env:
|
80
|
+
GITHUB_TOKEN: ${{ github.token }}
|
81
|
+
run: >-
|
82
|
+
gh release create
|
83
|
+
"$GITHUB_REF_NAME"
|
84
|
+
--repo "$GITHUB_REPOSITORY"
|
85
|
+
--notes ""
|
86
|
+
- name: Upload artifact signatures to GitHub Release
|
87
|
+
env:
|
88
|
+
GITHUB_TOKEN: ${{ github.token }}
|
89
|
+
run: >-
|
90
|
+
gh release upload
|
91
|
+
"$GITHUB_REF_NAME" dist/**
|
92
|
+
--repo "$GITHUB_REPOSITORY"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ninetoothed
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.11.0
|
4
4
|
Summary: A domain-specific language based on Triton but providing higher-level abstraction.
|
5
5
|
Project-URL: Homepage, https://github.com/InfiniTensor/ninetoothed
|
6
6
|
Project-URL: Issues, https://github.com/InfiniTensor/ninetoothed/issues
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "ninetoothed"
|
7
|
-
version = "0.
|
7
|
+
version = "0.11.0"
|
8
8
|
authors = [{ name = "Jiacheng Huang", email = "huangjiacheng0709@outlook.com" }]
|
9
9
|
description = "A domain-specific language based on Triton but providing higher-level abstraction."
|
10
10
|
readme = "README.md"
|
@@ -132,6 +132,7 @@ class Tensor:
|
|
132
132
|
],
|
133
133
|
source=self.source,
|
134
134
|
source_dims=self.source_dims,
|
135
|
+
target_dims=self.target_dims,
|
135
136
|
)
|
136
137
|
|
137
138
|
def squeeze(self, dim):
|
@@ -149,6 +150,11 @@ class Tensor:
|
|
149
150
|
for i, source_dim in enumerate(self.source_dims)
|
150
151
|
if i not in dim
|
151
152
|
],
|
153
|
+
target_dims=[
|
154
|
+
target_dim
|
155
|
+
for i, target_dim in enumerate(self.target_dims)
|
156
|
+
if i not in dim
|
157
|
+
],
|
152
158
|
)
|
153
159
|
|
154
160
|
def permute(self, dims):
|
@@ -168,6 +174,7 @@ class Tensor:
|
|
168
174
|
strides=new_strides,
|
169
175
|
source=self.source,
|
170
176
|
source_dims=new_source_dims,
|
177
|
+
target_dims=self.target_dims,
|
171
178
|
)
|
172
179
|
|
173
180
|
def flatten(self, start_dim=None, end_dim=None):
|
@@ -197,12 +204,21 @@ class Tensor:
|
|
197
204
|
leading_source_dims + (flattening_source_dims,) + trailing_source_dims
|
198
205
|
)
|
199
206
|
|
207
|
+
leading_target_dims = self.target_dims[:start_dim]
|
208
|
+
flattening_target_dims = self.target_dims[start_dim:end_dim]
|
209
|
+
trailing_target_dims = self.target_dims[end_dim:]
|
210
|
+
|
211
|
+
new_target_dims = (
|
212
|
+
leading_target_dims + (flattening_target_dims[-1],) + trailing_target_dims
|
213
|
+
)
|
214
|
+
|
200
215
|
return type(self)(
|
201
216
|
shape=new_shape,
|
202
217
|
dtype=self.dtype,
|
203
218
|
strides=new_strides,
|
204
219
|
source=self.source,
|
205
220
|
source_dims=new_source_dims,
|
221
|
+
target_dims=new_target_dims,
|
206
222
|
)
|
207
223
|
|
208
224
|
def ravel(self):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|