-
Notifications
You must be signed in to change notification settings - Fork 845
Expand file tree
/
Copy pathconfig.py
More file actions
36 lines (26 loc) · 1.09 KB
/
Copy pathconfig.py
File metadata and controls
36 lines (26 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from packages.ml.pytorch.version import PYTORCH_VERSION
from packaging.version import Version
def triton(version, branch=None, requires=None, default=False):
pkg = package.copy()
if not branch:
branch = f'v{version}'
if requires:
pkg['requires'] = requires
pkg['name'] = f'triton:{version}'
pkg['build_args'] = {
'TRITON_VERSION': version,
'TRITON_BRANCH': branch,
}
builder = pkg.copy()
builder['name'] += '-builder'
builder['build_args'] = {**pkg['build_args'], **{'FORCE_BUILD': 'on'}}
if default:
pkg['alias'] = 'triton'
builder['alias'] = 'triton:builder'
return pkg, builder
package = [
triton('3.8.0', branch='release/3.8.x', default=(PYTORCH_VERSION >= Version('2.13'))),
triton('3.7.0', branch='release/3.7.x', default=(PYTORCH_VERSION >= Version('2.10'))),
triton('3.5.1', branch='release/3.5.x', default=(PYTORCH_VERSION >= Version('2.9'))), # Newer Kernels for Thor
triton('3.4.0', branch='release/3.4.x', default=(PYTORCH_VERSION >= Version('2.8'))), # Newer Kernels and Spark Support
]