-
Notifications
You must be signed in to change notification settings - Fork 841
Expand file tree
/
Copy pathconfig.py
More file actions
31 lines (21 loc) · 822 Bytes
/
Copy pathconfig.py
File metadata and controls
31 lines (21 loc) · 822 Bytes
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
from jetson_containers import CUDA_VERSION, CUDA_ARCHITECTURES
from packaging.version import Version
def sage_attn(version, requires=None, default=False):
pkg = package.copy()
if requires:
pkg['requires'] = requires
pkg['name'] = f'sage-attention:{version}'
pkg['build_args'] = {
'SAGE_ATTENTION_VERSION': version,
'TORCH_CUDA_ARCH_LIST': ';'.join([f'{x / 10:.1f}' for x in CUDA_ARCHITECTURES])
}
builder = pkg.copy()
builder['name'] = f'sage-attention:{version}-builder'
builder['build_args'] = {**pkg['build_args'], **{'FORCE_BUILD': 'on'}}
if default:
pkg['alias'] = 'sage-attention'
builder['alias'] = 'sage-attention:builder'
return pkg, builder
package = [
sage_attn('3.0.0', default=(CUDA_VERSION >= Version('12.6'))),
]