medmekk HF Staff commited on
Commit
4237a0a
·
1 Parent(s): 937cfd9
Files changed (30) hide show
  1. .gitattributes +1 -0
  2. .venv/bin/pip +0 -0
  3. .venv/bin/pip3 +0 -0
  4. .venv/bin/pip3.13 +0 -0
  5. .venv/bin/python +0 -0
  6. .venv/bin/python +1 -0
  7. .venv/bin/python3 +0 -0
  8. .venv/bin/python3 +1 -0
  9. .venv/bin/python3.13 +0 -0
  10. .venv/bin/python3.13 +1 -0
  11. .venv/lib/python3.13/site-packages/hf_xet-1.1.10.dist-info/INSTALLER +0 -1
  12. .venv/lib/python3.13/site-packages/hf_xet-1.1.10.dist-info/METADATA +0 -83
  13. .venv/lib/python3.13/site-packages/hf_xet-1.1.10.dist-info/RECORD +0 -8
  14. .venv/lib/python3.13/site-packages/hf_xet-1.1.10.dist-info/WHEEL +0 -4
  15. .venv/lib/python3.13/site-packages/hf_xet-1.1.10.dist-info/licenses/LICENSE +0 -201
  16. .venv/lib/python3.13/site-packages/hf_xet/__init__.py +0 -5
  17. .venv/lib/python3.13/site-packages/hf_xet/__pycache__/__init__.cpython-313.pyc +0 -0
  18. CMakeLists.txt +72 -72
  19. cmake/utils.cmake +1 -1
  20. sage_attention/qattn/qk_int_sv_f8_cuda_sm90.cu +10 -1
  21. setup.py +1 -1
  22. torch-ext/sage_attention/__pycache__/__init__.cpython-313.pyc +0 -0
  23. torch-ext/sage_attention/__pycache__/__init__.cpython-39.pyc +0 -0
  24. torch-ext/sage_attention/__pycache__/_ops.cpython-313.pyc +0 -0
  25. torch-ext/sage_attention/__pycache__/quant.cpython-313.pyc +0 -0
  26. torch-ext/sage_attention/_ops.py +3 -3
  27. .venv/lib/python3.13/site-packages/hf_xet/hf_xet.abi3.so → torch-ext/sage_attention/_sage_attention_57cb7ec_dirty.abi3.so +2 -2
  28. torch-ext/sage_attention/_sage_attention_6bzaszjaujzoe.abi3.so +0 -3
  29. torch-ext/sage_attention/_sage_attention_ag736k23icjku.abi3.so +0 -3
  30. torch-ext/sage_attention/_sage_attention_akb65l7w7moi6.abi3.so +0 -3
.gitattributes CHANGED
@@ -45,3 +45,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
45
  torch-ext/sage_attention/_sage_attention_6bzaszjaujzoe.abi3.so filter=lfs diff=lfs merge=lfs -text
46
  torch-ext/sage_attention/_sage_attention_ag736k23icjku.abi3.so filter=lfs diff=lfs merge=lfs -text
47
  torch-ext/sage_attention/_sage_attention_akb65l7w7moi6.abi3.so filter=lfs diff=lfs merge=lfs -text
 
 
45
  torch-ext/sage_attention/_sage_attention_6bzaszjaujzoe.abi3.so filter=lfs diff=lfs merge=lfs -text
46
  torch-ext/sage_attention/_sage_attention_ag736k23icjku.abi3.so filter=lfs diff=lfs merge=lfs -text
47
  torch-ext/sage_attention/_sage_attention_akb65l7w7moi6.abi3.so filter=lfs diff=lfs merge=lfs -text
48
+ *.so filter=lfs diff=lfs merge=lfs -text
.venv/bin/pip CHANGED
File without changes
.venv/bin/pip3 CHANGED
File without changes
.venv/bin/pip3.13 CHANGED
File without changes
.venv/bin/python DELETED
Binary file (15.6 kB)
 
.venv/bin/python ADDED
@@ -0,0 +1 @@
 
 
1
+ python3.13
.venv/bin/python3 DELETED
Binary file (15.6 kB)
 
.venv/bin/python3 ADDED
@@ -0,0 +1 @@
 
 
1
+ python3.13
.venv/bin/python3.13 DELETED
Binary file (15.6 kB)
 
.venv/bin/python3.13 ADDED
@@ -0,0 +1 @@
 
 
1
+ /nix/store/iyff8129iampdw13nlfqalzhxy8y1hi9-python3-3.13.6/bin/python3.13
.venv/lib/python3.13/site-packages/hf_xet-1.1.10.dist-info/INSTALLER DELETED
@@ -1 +0,0 @@
1
- pip
 
 
.venv/lib/python3.13/site-packages/hf_xet-1.1.10.dist-info/METADATA DELETED
@@ -1,83 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: hf-xet
3
- Version: 1.1.10
4
- Classifier: License :: OSI Approved :: Apache Software License
5
- Classifier: Programming Language :: Rust
6
- Classifier: Programming Language :: Python :: Implementation :: CPython
7
- Classifier: Programming Language :: Python :: Implementation :: PyPy
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3 :: Only
10
- Classifier: Programming Language :: Python :: 3.8
11
- Classifier: Programming Language :: Python :: 3.9
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.13
16
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
- Requires-Dist: pytest ; extra == 'tests'
18
- Provides-Extra: tests
19
- License-File: LICENSE
20
- Summary: Fast transfer of large files with the Hugging Face Hub.
21
- Maintainer-email: Rajat Arya <[email protected]>, Jared Sulzdorf <[email protected]>, Di Xiao <[email protected]>, Assaf Vayner <[email protected]>, Hoyt Koepke <[email protected]>
22
- License-Expression: Apache-2.0
23
- Requires-Python: >=3.8
24
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
25
- Project-URL: Homepage, https://github.com/huggingface/xet-core
26
- Project-URL: Documentation, https://huggingface.co/docs/hub/en/storage-backends#using-xet-storage
27
- Project-URL: Issues, https://github.com/huggingface/xet-core/issues
28
- Project-URL: Repository, https://github.com/huggingface/xet-core.git
29
-
30
- <!---
31
- Copyright 2024 The HuggingFace Team. All rights reserved.
32
-
33
- Licensed under the Apache License, Version 2.0 (the "License");
34
- you may not use this file except in compliance with the License.
35
- You may obtain a copy of the License at
36
-
37
- http://www.apache.org/licenses/LICENSE-2.0
38
-
39
- Unless required by applicable law or agreed to in writing, software
40
- distributed under the License is distributed on an "AS IS" BASIS,
41
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42
- See the License for the specific language governing permissions and
43
- limitations under the License.
44
- -->
45
- <p align="center">
46
- <a href="https://github.com/huggingface/xet-core/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/huggingface/xet-core.svg?color=blue"></a>
47
- <a href="https://github.com/huggingface/xet-core/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/xet-core.svg"></a>
48
- <a href="https://github.com/huggingface/xet-core/blob/main/CODE_OF_CONDUCT.md"><img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg"></a>
49
- </p>
50
-
51
- <h3 align="center">
52
- <p>🤗 hf-xet - xet client tech, used in <a target="_blank" href="https://github.com/huggingface/huggingface_hub/">huggingface_hub</a></p>
53
- </h3>
54
-
55
- ## Welcome
56
-
57
- `hf-xet` enables `huggingface_hub` to utilize xet storage for uploading and downloading to HF Hub. Xet storage provides chunk-based deduplication, efficient storage/retrieval with local disk caching, and backwards compatibility with Git LFS. This library is not meant to be used directly, and is instead intended to be used from [huggingface_hub](https://pypi.org/project/huggingface-hub).
58
-
59
- ## Key features
60
-
61
- ♻ **chunk-based deduplication implementation**: avoid transferring and storing chunks that are shared across binary files (models, datasets, etc).
62
-
63
- 🤗 **Python bindings**: bindings for [huggingface_hub](https://github.com/huggingface/huggingface_hub/) package.
64
-
65
- ↔ **network communications**: concurrent communication to HF Hub Xet backend services (CAS).
66
-
67
- 🔖 **local disk caching**: chunk-based cache that sits alongside the existing [huggingface_hub disk cache](https://huggingface.co/docs/huggingface_hub/guides/manage-cache).
68
-
69
- ## Installation
70
-
71
- Install the `hf_xet` package with [pip](https://pypi.org/project/hf-xet/):
72
-
73
- ```bash
74
- pip install hf_xet
75
- ```
76
-
77
- ## Quick Start
78
-
79
- `hf_xet` is not intended to be run independently as it is expected to be used from `huggingface_hub`, so to get started with `huggingface_hub` check out the documentation [here]("https://hf.co/docs/huggingface_hub").
80
-
81
- ## Contributions (feature requests, bugs, etc.) are encouraged & appreciated 💙💚💛💜🧡❤️
82
-
83
- Please join us in making hf-xet better. We value everyone's contributions. Code is not the only way to help. Answering questions, helping each other, improving documentation, filing issues all help immensely. If you are interested in contributing (please do!), check out the [contribution guide](https://github.com/huggingface/xet-core/blob/main/CONTRIBUTING.md) for this repository.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.venv/lib/python3.13/site-packages/hf_xet-1.1.10.dist-info/RECORD DELETED
@@ -1,8 +0,0 @@
1
- hf_xet-1.1.10.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
- hf_xet-1.1.10.dist-info/METADATA,sha256=uFNyfUe0we3oHWG-SPUCBDAWYkHCT1JBVQaRZg4_D5Q,4670
3
- hf_xet-1.1.10.dist-info/RECORD,,
4
- hf_xet-1.1.10.dist-info/WHEEL,sha256=i6A8fOeKDbiLWJKJ4CSZ_oMsfL41B4i_w3i76Xh_k5M,127
5
- hf_xet-1.1.10.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
6
- hf_xet/__init__.py,sha256=E8UDdyQ8glZ_nve9hHEf22bPang8-RKx4VuApXYeQUo,107
7
- hf_xet/__pycache__/__init__.cpython-313.pyc,,
8
- hf_xet/hf_xet.abi3.so,sha256=WBX7yFb3btpsQ1Qx6U_PQU29USHaK8Vb7sRpYkW9BFs,7942656
 
 
 
 
 
 
 
 
 
.venv/lib/python3.13/site-packages/hf_xet-1.1.10.dist-info/WHEEL DELETED
@@ -1,4 +0,0 @@
1
- Wheel-Version: 1.0
2
- Generator: maturin (1.9.4)
3
- Root-Is-Purelib: false
4
- Tag: cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64
 
 
 
 
 
.venv/lib/python3.13/site-packages/hf_xet-1.1.10.dist-info/licenses/LICENSE DELETED
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright [yyyy] [name of copyright owner]
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.venv/lib/python3.13/site-packages/hf_xet/__init__.py DELETED
@@ -1,5 +0,0 @@
1
- from .hf_xet import *
2
-
3
- __doc__ = hf_xet.__doc__
4
- if hasattr(hf_xet, "__all__"):
5
- __all__ = hf_xet.__all__
 
 
 
 
 
 
.venv/lib/python3.13/site-packages/hf_xet/__pycache__/__init__.cpython-313.pyc DELETED
Binary file (358 Bytes)
 
CMakeLists.txt CHANGED
@@ -97,26 +97,25 @@ set(TORCH_sage_attention_SRC
97
  list(APPEND SRC "${TORCH_sage_attention_SRC}")
98
 
99
 
100
- set(_qattn_SRC
101
- "sage_attention/cp_async.cuh"
102
- "sage_attention/dispatch_utils.h"
103
- "sage_attention/math.cuh"
104
- "sage_attention/mma.cuh"
105
- "sage_attention/numeric_conversion.cuh"
106
- "sage_attention/permuted_smem.cuh"
107
- "sage_attention/reduction_utils.cuh"
108
- "sage_attention/wgmma.cuh"
109
- "sage_attention/utils.cuh"
110
  )
111
 
 
 
 
 
 
112
 
113
  if(GPU_LANG STREQUAL "CUDA")
114
- cuda_archs_loose_intersection(_qattn_ARCHS "9.0" "${CUDA_ARCHS}")
115
- message(STATUS "Capabilities for kernel _qattn: ${_qattn_ARCHS}")
116
- set_gencode_flags_for_srcs(SRCS "${_qattn_SRC}" CUDA_ARCHS "${_qattn_ARCHS}")
117
 
118
 
119
- foreach(_KERNEL_SRC ${_qattn_SRC})
120
  if(_KERNEL_SRC MATCHES ".*\\.cu$")
121
  set_property(
122
  SOURCE ${_KERNEL_SRC}
@@ -126,7 +125,7 @@ if(GPU_LANG STREQUAL "CUDA")
126
  endif()
127
  endforeach()
128
 
129
- foreach(_KERNEL_SRC ${_qattn_SRC})
130
  set_property(
131
  SOURCE ${_KERNEL_SRC}
132
  APPEND PROPERTY
@@ -134,37 +133,30 @@ if(GPU_LANG STREQUAL "CUDA")
134
  )
135
  endforeach()
136
 
137
- list(APPEND SRC "${_qattn_SRC}")
138
  endif()
139
 
140
 
141
 
142
- set(_qattn_sm89_SRC
143
- "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f32_attn_inst_buf.cu"
144
- "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f16_attn_inst_buf.cu"
145
- "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f32_attn.cu"
146
- "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f32_fuse_v_scale_fuse_v_mean_attn.cu"
147
- "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f32_fuse_v_scale_attn.cu"
148
- "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f32_fuse_v_scale_attn_inst_buf.cu"
149
- "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f16_fuse_v_scale_attn_inst_buf.cu"
150
- "sage_attention/qattn/attn_cuda_sm89.h"
151
- "sage_attention/qattn/qk_int_sv_f8_cuda_sm89.cuh"
152
  "sage_attention/qattn/attn_utils.cuh"
153
  )
154
 
155
  # TODO: check if CLion support this:
156
  # https://youtrack.jetbrains.com/issue/CPP-16510/CLion-does-not-handle-per-file-include-directories
157
  set_source_files_properties(
158
- ${_qattn_sm89_SRC}
159
  PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/.")
160
 
161
  if(GPU_LANG STREQUAL "CUDA")
162
- cuda_archs_loose_intersection(_qattn_sm89_ARCHS "8.9" "${CUDA_ARCHS}")
163
- message(STATUS "Capabilities for kernel _qattn_sm89: ${_qattn_sm89_ARCHS}")
164
- set_gencode_flags_for_srcs(SRCS "${_qattn_sm89_SRC}" CUDA_ARCHS "${_qattn_sm89_ARCHS}")
165
 
166
 
167
- foreach(_KERNEL_SRC ${_qattn_sm89_SRC})
168
  if(_KERNEL_SRC MATCHES ".*\\.cu$")
169
  set_property(
170
  SOURCE ${_KERNEL_SRC}
@@ -174,7 +166,7 @@ if(GPU_LANG STREQUAL "CUDA")
174
  endif()
175
  endforeach()
176
 
177
- foreach(_KERNEL_SRC ${_qattn_sm89_SRC})
178
  set_property(
179
  SOURCE ${_KERNEL_SRC}
180
  APPEND PROPERTY
@@ -182,29 +174,37 @@ if(GPU_LANG STREQUAL "CUDA")
182
  )
183
  endforeach()
184
 
185
- list(APPEND SRC "${_qattn_sm89_SRC}")
186
  endif()
187
 
188
 
189
 
190
- set(_fused_SRC
191
- "sage_attention/fused/fused.cu"
192
- "sage_attention/fused/fused.h"
 
 
 
 
 
 
 
 
193
  )
194
 
195
  # TODO: check if CLion support this:
196
  # https://youtrack.jetbrains.com/issue/CPP-16510/CLion-does-not-handle-per-file-include-directories
197
  set_source_files_properties(
198
- ${_fused_SRC}
199
  PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/.")
200
 
201
  if(GPU_LANG STREQUAL "CUDA")
202
- cuda_archs_loose_intersection(_fused_ARCHS "9.0" "${CUDA_ARCHS}")
203
- message(STATUS "Capabilities for kernel _fused: ${_fused_ARCHS}")
204
- set_gencode_flags_for_srcs(SRCS "${_fused_SRC}" CUDA_ARCHS "${_fused_ARCHS}")
205
 
206
 
207
- foreach(_KERNEL_SRC ${_fused_SRC})
208
  if(_KERNEL_SRC MATCHES ".*\\.cu$")
209
  set_property(
210
  SOURCE ${_KERNEL_SRC}
@@ -214,7 +214,7 @@ if(GPU_LANG STREQUAL "CUDA")
214
  endif()
215
  endforeach()
216
 
217
- foreach(_KERNEL_SRC ${_fused_SRC})
218
  set_property(
219
  SOURCE ${_KERNEL_SRC}
220
  APPEND PROPERTY
@@ -222,30 +222,29 @@ if(GPU_LANG STREQUAL "CUDA")
222
  )
223
  endforeach()
224
 
225
- list(APPEND SRC "${_fused_SRC}")
226
  endif()
227
 
228
 
229
 
230
- set(_qattn_sm80_SRC
231
- "sage_attention/qattn/qk_int_sv_f16_cuda_sm80.cu"
232
- "sage_attention/qattn/attn_cuda_sm80.h"
233
- "sage_attention/qattn/attn_utils.cuh"
234
  )
235
 
236
  # TODO: check if CLion support this:
237
  # https://youtrack.jetbrains.com/issue/CPP-16510/CLion-does-not-handle-per-file-include-directories
238
  set_source_files_properties(
239
- ${_qattn_sm80_SRC}
240
  PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/.")
241
 
242
  if(GPU_LANG STREQUAL "CUDA")
243
- cuda_archs_loose_intersection(_qattn_sm80_ARCHS "8.0" "${CUDA_ARCHS}")
244
- message(STATUS "Capabilities for kernel _qattn_sm80: ${_qattn_sm80_ARCHS}")
245
- set_gencode_flags_for_srcs(SRCS "${_qattn_sm80_SRC}" CUDA_ARCHS "${_qattn_sm80_ARCHS}")
246
 
247
 
248
- foreach(_KERNEL_SRC ${_qattn_sm80_SRC})
249
  if(_KERNEL_SRC MATCHES ".*\\.cu$")
250
  set_property(
251
  SOURCE ${_KERNEL_SRC}
@@ -255,7 +254,7 @@ if(GPU_LANG STREQUAL "CUDA")
255
  endif()
256
  endforeach()
257
 
258
- foreach(_KERNEL_SRC ${_qattn_sm80_SRC})
259
  set_property(
260
  SOURCE ${_KERNEL_SRC}
261
  APPEND PROPERTY
@@ -263,30 +262,31 @@ if(GPU_LANG STREQUAL "CUDA")
263
  )
264
  endforeach()
265
 
266
- list(APPEND SRC "${_qattn_sm80_SRC}")
267
  endif()
268
 
269
 
270
 
271
- set(_qattn_sm90_SRC
272
- "sage_attention/qattn/qk_int_sv_f8_cuda_sm90.cu"
273
- "sage_attention/qattn/attn_cuda_sm90.h"
274
- "sage_attention/qattn/attn_utils.cuh"
 
 
 
 
 
 
275
  )
276
 
277
- # TODO: check if CLion support this:
278
- # https://youtrack.jetbrains.com/issue/CPP-16510/CLion-does-not-handle-per-file-include-directories
279
- set_source_files_properties(
280
- ${_qattn_sm90_SRC}
281
- PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/.")
282
 
283
  if(GPU_LANG STREQUAL "CUDA")
284
- cuda_archs_loose_intersection(_qattn_sm90_ARCHS "9.0a" "${CUDA_ARCHS}")
285
- message(STATUS "Capabilities for kernel _qattn_sm90: ${_qattn_sm90_ARCHS}")
286
- set_gencode_flags_for_srcs(SRCS "${_qattn_sm90_SRC}" CUDA_ARCHS "${_qattn_sm90_ARCHS}")
287
 
288
 
289
- foreach(_KERNEL_SRC ${_qattn_sm90_SRC})
290
  if(_KERNEL_SRC MATCHES ".*\\.cu$")
291
  set_property(
292
  SOURCE ${_KERNEL_SRC}
@@ -296,7 +296,7 @@ if(GPU_LANG STREQUAL "CUDA")
296
  endif()
297
  endforeach()
298
 
299
- foreach(_KERNEL_SRC ${_qattn_sm90_SRC})
300
  set_property(
301
  SOURCE ${_KERNEL_SRC}
302
  APPEND PROPERTY
@@ -304,13 +304,13 @@ if(GPU_LANG STREQUAL "CUDA")
304
  )
305
  endforeach()
306
 
307
- list(APPEND SRC "${_qattn_sm90_SRC}")
308
  endif()
309
 
310
 
311
  define_gpu_extension_target(
312
- _sage_attention_ag736k23icjku
313
- DESTINATION _sage_attention_ag736k23icjku
314
  LANGUAGE ${GPU_LANG}
315
  SOURCES ${SRC}
316
  COMPILE_FLAGS ${GPU_FLAGS}
@@ -319,5 +319,5 @@ define_gpu_extension_target(
319
  USE_SABI 3
320
  WITH_SOABI)
321
 
322
- target_link_options(_sage_attention_ag736k23icjku PRIVATE -static-libstdc++)
323
 
 
97
  list(APPEND SRC "${TORCH_sage_attention_SRC}")
98
 
99
 
100
+ set(_qattn_sm80_SRC
101
+ "sage_attention/qattn/qk_int_sv_f16_cuda_sm80.cu"
102
+ "sage_attention/qattn/attn_cuda_sm80.h"
103
+ "sage_attention/qattn/attn_utils.cuh"
 
 
 
 
 
 
104
  )
105
 
106
+ # TODO: check if CLion support this:
107
+ # https://youtrack.jetbrains.com/issue/CPP-16510/CLion-does-not-handle-per-file-include-directories
108
+ set_source_files_properties(
109
+ ${_qattn_sm80_SRC}
110
+ PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/.")
111
 
112
  if(GPU_LANG STREQUAL "CUDA")
113
+ cuda_archs_loose_intersection(_qattn_sm80_ARCHS "8.0" "${CUDA_ARCHS}")
114
+ message(STATUS "Capabilities for kernel _qattn_sm80: ${_qattn_sm80_ARCHS}")
115
+ set_gencode_flags_for_srcs(SRCS "${_qattn_sm80_SRC}" CUDA_ARCHS "${_qattn_sm80_ARCHS}")
116
 
117
 
118
+ foreach(_KERNEL_SRC ${_qattn_sm80_SRC})
119
  if(_KERNEL_SRC MATCHES ".*\\.cu$")
120
  set_property(
121
  SOURCE ${_KERNEL_SRC}
 
125
  endif()
126
  endforeach()
127
 
128
+ foreach(_KERNEL_SRC ${_qattn_sm80_SRC})
129
  set_property(
130
  SOURCE ${_KERNEL_SRC}
131
  APPEND PROPERTY
 
133
  )
134
  endforeach()
135
 
136
+ list(APPEND SRC "${_qattn_sm80_SRC}")
137
  endif()
138
 
139
 
140
 
141
+ set(_qattn_sm90_SRC
142
+ "sage_attention/qattn/qk_int_sv_f8_cuda_sm90.cu"
143
+ "sage_attention/qattn/attn_cuda_sm90.h"
 
 
 
 
 
 
 
144
  "sage_attention/qattn/attn_utils.cuh"
145
  )
146
 
147
  # TODO: check if CLion support this:
148
  # https://youtrack.jetbrains.com/issue/CPP-16510/CLion-does-not-handle-per-file-include-directories
149
  set_source_files_properties(
150
+ ${_qattn_sm90_SRC}
151
  PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/.")
152
 
153
  if(GPU_LANG STREQUAL "CUDA")
154
+ cuda_archs_loose_intersection(_qattn_sm90_ARCHS "9.0a" "${CUDA_ARCHS}")
155
+ message(STATUS "Capabilities for kernel _qattn_sm90: ${_qattn_sm90_ARCHS}")
156
+ set_gencode_flags_for_srcs(SRCS "${_qattn_sm90_SRC}" CUDA_ARCHS "${_qattn_sm90_ARCHS}")
157
 
158
 
159
+ foreach(_KERNEL_SRC ${_qattn_sm90_SRC})
160
  if(_KERNEL_SRC MATCHES ".*\\.cu$")
161
  set_property(
162
  SOURCE ${_KERNEL_SRC}
 
166
  endif()
167
  endforeach()
168
 
169
+ foreach(_KERNEL_SRC ${_qattn_sm90_SRC})
170
  set_property(
171
  SOURCE ${_KERNEL_SRC}
172
  APPEND PROPERTY
 
174
  )
175
  endforeach()
176
 
177
+ list(APPEND SRC "${_qattn_sm90_SRC}")
178
  endif()
179
 
180
 
181
 
182
+ set(_qattn_sm89_SRC
183
+ "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f32_attn_inst_buf.cu"
184
+ "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f16_attn_inst_buf.cu"
185
+ "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f32_attn.cu"
186
+ "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f32_fuse_v_scale_fuse_v_mean_attn.cu"
187
+ "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f32_fuse_v_scale_attn.cu"
188
+ "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f32_fuse_v_scale_attn_inst_buf.cu"
189
+ "sage_attention/qattn/sm89_qk_int8_sv_f8_accum_f16_fuse_v_scale_attn_inst_buf.cu"
190
+ "sage_attention/qattn/attn_cuda_sm89.h"
191
+ "sage_attention/qattn/qk_int_sv_f8_cuda_sm89.cuh"
192
+ "sage_attention/qattn/attn_utils.cuh"
193
  )
194
 
195
  # TODO: check if CLion support this:
196
  # https://youtrack.jetbrains.com/issue/CPP-16510/CLion-does-not-handle-per-file-include-directories
197
  set_source_files_properties(
198
+ ${_qattn_sm89_SRC}
199
  PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/.")
200
 
201
  if(GPU_LANG STREQUAL "CUDA")
202
+ cuda_archs_loose_intersection(_qattn_sm89_ARCHS "8.9" "${CUDA_ARCHS}")
203
+ message(STATUS "Capabilities for kernel _qattn_sm89: ${_qattn_sm89_ARCHS}")
204
+ set_gencode_flags_for_srcs(SRCS "${_qattn_sm89_SRC}" CUDA_ARCHS "${_qattn_sm89_ARCHS}")
205
 
206
 
207
+ foreach(_KERNEL_SRC ${_qattn_sm89_SRC})
208
  if(_KERNEL_SRC MATCHES ".*\\.cu$")
209
  set_property(
210
  SOURCE ${_KERNEL_SRC}
 
214
  endif()
215
  endforeach()
216
 
217
+ foreach(_KERNEL_SRC ${_qattn_sm89_SRC})
218
  set_property(
219
  SOURCE ${_KERNEL_SRC}
220
  APPEND PROPERTY
 
222
  )
223
  endforeach()
224
 
225
+ list(APPEND SRC "${_qattn_sm89_SRC}")
226
  endif()
227
 
228
 
229
 
230
+ set(_fused_SRC
231
+ "sage_attention/fused/fused.cu"
232
+ "sage_attention/fused/fused.h"
 
233
  )
234
 
235
  # TODO: check if CLion support this:
236
  # https://youtrack.jetbrains.com/issue/CPP-16510/CLion-does-not-handle-per-file-include-directories
237
  set_source_files_properties(
238
+ ${_fused_SRC}
239
  PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/.")
240
 
241
  if(GPU_LANG STREQUAL "CUDA")
242
+ cuda_archs_loose_intersection(_fused_ARCHS "9.0" "${CUDA_ARCHS}")
243
+ message(STATUS "Capabilities for kernel _fused: ${_fused_ARCHS}")
244
+ set_gencode_flags_for_srcs(SRCS "${_fused_SRC}" CUDA_ARCHS "${_fused_ARCHS}")
245
 
246
 
247
+ foreach(_KERNEL_SRC ${_fused_SRC})
248
  if(_KERNEL_SRC MATCHES ".*\\.cu$")
249
  set_property(
250
  SOURCE ${_KERNEL_SRC}
 
254
  endif()
255
  endforeach()
256
 
257
+ foreach(_KERNEL_SRC ${_fused_SRC})
258
  set_property(
259
  SOURCE ${_KERNEL_SRC}
260
  APPEND PROPERTY
 
262
  )
263
  endforeach()
264
 
265
+ list(APPEND SRC "${_fused_SRC}")
266
  endif()
267
 
268
 
269
 
270
+ set(_qattn_SRC
271
+ "sage_attention/cp_async.cuh"
272
+ "sage_attention/dispatch_utils.h"
273
+ "sage_attention/math.cuh"
274
+ "sage_attention/mma.cuh"
275
+ "sage_attention/numeric_conversion.cuh"
276
+ "sage_attention/permuted_smem.cuh"
277
+ "sage_attention/reduction_utils.cuh"
278
+ "sage_attention/wgmma.cuh"
279
+ "sage_attention/utils.cuh"
280
  )
281
 
 
 
 
 
 
282
 
283
  if(GPU_LANG STREQUAL "CUDA")
284
+ cuda_archs_loose_intersection(_qattn_ARCHS "9.0" "${CUDA_ARCHS}")
285
+ message(STATUS "Capabilities for kernel _qattn: ${_qattn_ARCHS}")
286
+ set_gencode_flags_for_srcs(SRCS "${_qattn_SRC}" CUDA_ARCHS "${_qattn_ARCHS}")
287
 
288
 
289
+ foreach(_KERNEL_SRC ${_qattn_SRC})
290
  if(_KERNEL_SRC MATCHES ".*\\.cu$")
291
  set_property(
292
  SOURCE ${_KERNEL_SRC}
 
296
  endif()
297
  endforeach()
298
 
299
+ foreach(_KERNEL_SRC ${_qattn_SRC})
300
  set_property(
301
  SOURCE ${_KERNEL_SRC}
302
  APPEND PROPERTY
 
304
  )
305
  endforeach()
306
 
307
+ list(APPEND SRC "${_qattn_SRC}")
308
  endif()
309
 
310
 
311
  define_gpu_extension_target(
312
+ _sage_attention_57cb7ec_dirty
313
+ DESTINATION _sage_attention_57cb7ec_dirty
314
  LANGUAGE ${GPU_LANG}
315
  SOURCES ${SRC}
316
  COMPILE_FLAGS ${GPU_FLAGS}
 
319
  USE_SABI 3
320
  WITH_SOABI)
321
 
322
+ target_link_options(_sage_attention_57cb7ec_dirty PRIVATE -static-libstdc++)
323
 
cmake/utils.cmake CHANGED
@@ -536,7 +536,7 @@ function (define_gpu_extension_target GPU_MOD_NAME)
536
  # Don't use `TORCH_LIBRARIES` for CUDA since it pulls in a bunch of
537
  # dependencies that are not necessary and may not be installed.
538
  if (GPU_LANGUAGE STREQUAL "CUDA")
539
- target_link_libraries(${GPU_MOD_NAME} PRIVATE CUDA::cudart CUDA::cuda_driver)
540
  else()
541
  target_link_libraries(${GPU_MOD_NAME} PRIVATE ${TORCH_LIBRARIES})
542
  endif()
 
536
  # Don't use `TORCH_LIBRARIES` for CUDA since it pulls in a bunch of
537
  # dependencies that are not necessary and may not be installed.
538
  if (GPU_LANGUAGE STREQUAL "CUDA")
539
+ target_link_libraries(${GPU_MOD_NAME} PRIVATE CUDA::cudart)
540
  else()
541
  target_link_libraries(${GPU_MOD_NAME} PRIVATE ${TORCH_LIBRARIES})
542
  endif()
sage_attention/qattn/qk_int_sv_f8_cuda_sm90.cu CHANGED
@@ -19,6 +19,7 @@
19
  #include <cuda_bf16.h>
20
  #include <cuda_fp8.h>
21
  #include <torch/torch.h>
 
22
 
23
  #include "../wgmma.cuh"
24
  #include "../math.cuh"
@@ -26,6 +27,11 @@
26
 
27
  #include "attn_utils.cuh"
28
 
 
 
 
 
 
29
  template <int BlockMajorSize, int BlockMinorSize, bool swizzle=true, CUtensorMapL2promotion_enum promotion_mode=CU_TENSOR_MAP_L2_PROMOTION_NONE, typename T>
30
  CUtensorMap create_tensor_map_4D(T* gmem_ptr, int d1, int d2, int d3, int d4, int stride1, int stride2, int stride3) {
31
  constexpr int smem_stride = BlockMinorSize * sizeof(T);
@@ -39,7 +45,10 @@ CUtensorMap create_tensor_map_4D(T* gmem_ptr, int d1, int d2, int d3, int d4, in
39
  uint32_t smem_box_shape[5] = {uint32_t(BlockMinorSize), uint32_t(BlockMajorSize), 1, 1, 1};
40
  uint32_t smem_box_stride[5] = {1, 1, 1, 1, 1};
41
 
42
- CUresult result = cuTensorMapEncodeTiled(
 
 
 
43
  &tma_map, (sizeof(T) == 2) ? CU_TENSOR_MAP_DATA_TYPE_BFLOAT16 : CU_TENSOR_MAP_DATA_TYPE_UINT8, 4, gmem_address, gmem_prob_shape,
44
  gmem_prob_stride, smem_box_shape, smem_box_stride, CU_TENSOR_MAP_INTERLEAVE_NONE,
45
  (swizzle == false) ? CU_TENSOR_MAP_SWIZZLE_NONE : (smem_stride == 128) ? CU_TENSOR_MAP_SWIZZLE_128B : (smem_stride == 64) ? CU_TENSOR_MAP_SWIZZLE_64B : CU_TENSOR_MAP_SWIZZLE_32B,
 
19
  #include <cuda_bf16.h>
20
  #include <cuda_fp8.h>
21
  #include <torch/torch.h>
22
+ #include <ATen/DynamicLibrary.h>
23
 
24
  #include "../wgmma.cuh"
25
  #include "../math.cuh"
 
27
 
28
  #include "attn_utils.cuh"
29
 
30
+ at::DynamicLibrary& getCUDALibrary() {
31
+ static at::DynamicLibrary lib("libcuda.so.1");
32
+ return lib;
33
+ }
34
+
35
  template <int BlockMajorSize, int BlockMinorSize, bool swizzle=true, CUtensorMapL2promotion_enum promotion_mode=CU_TENSOR_MAP_L2_PROMOTION_NONE, typename T>
36
  CUtensorMap create_tensor_map_4D(T* gmem_ptr, int d1, int d2, int d3, int d4, int stride1, int stride2, int stride3) {
37
  constexpr int smem_stride = BlockMinorSize * sizeof(T);
 
45
  uint32_t smem_box_shape[5] = {uint32_t(BlockMinorSize), uint32_t(BlockMajorSize), 1, 1, 1};
46
  uint32_t smem_box_stride[5] = {1, 1, 1, 1, 1};
47
 
48
+ auto fn = reinterpret_cast<decltype(&cuTensorMapEncodeTiled)>(getCUDALibrary().sym(__func__));
49
+ if (!fn)
50
+ throw std::runtime_error("Can't get cuTensorMapEncodeTiled");
51
+ CUresult result = fn(
52
  &tma_map, (sizeof(T) == 2) ? CU_TENSOR_MAP_DATA_TYPE_BFLOAT16 : CU_TENSOR_MAP_DATA_TYPE_UINT8, 4, gmem_address, gmem_prob_shape,
53
  gmem_prob_stride, smem_box_shape, smem_box_stride, CU_TENSOR_MAP_INTERLEAVE_NONE,
54
  (swizzle == false) ? CU_TENSOR_MAP_SWIZZLE_NONE : (smem_stride == 128) ? CU_TENSOR_MAP_SWIZZLE_128B : (smem_stride == 64) ? CU_TENSOR_MAP_SWIZZLE_64B : CU_TENSOR_MAP_SWIZZLE_32B,
setup.py CHANGED
@@ -128,7 +128,7 @@ setup(
128
  name="sage_attention",
129
  # The version is just a stub, it's not used by the final build artefact.
130
  version="0.1.0",
131
- ext_modules=[CMakeExtension("sage_attention._sage_attention_ag736k23icjku")],
132
  cmdclass={"build_ext": CMakeBuild},
133
  packages=find_packages(where="torch-ext", include=["sage_attention*"]),
134
  package_dir={"": "torch-ext"},
 
128
  name="sage_attention",
129
  # The version is just a stub, it's not used by the final build artefact.
130
  version="0.1.0",
131
+ ext_modules=[CMakeExtension("sage_attention._sage_attention_57cb7ec_dirty")],
132
  cmdclass={"build_ext": CMakeBuild},
133
  packages=find_packages(where="torch-ext", include=["sage_attention*"]),
134
  package_dir={"": "torch-ext"},
torch-ext/sage_attention/__pycache__/__init__.cpython-313.pyc DELETED
Binary file (310 Bytes)
 
torch-ext/sage_attention/__pycache__/__init__.cpython-39.pyc DELETED
Binary file (298 Bytes)
 
torch-ext/sage_attention/__pycache__/_ops.cpython-313.pyc DELETED
Binary file (536 Bytes)
 
torch-ext/sage_attention/__pycache__/quant.cpython-313.pyc DELETED
Binary file (13.3 kB)
 
torch-ext/sage_attention/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _sage_attention_ag736k23icjku
3
- ops = torch.ops._sage_attention_ag736k23icjku
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_sage_attention_ag736k23icjku::{op_name}"
 
1
  import torch
2
+ from . import _sage_attention_57cb7ec_dirty
3
+ ops = torch.ops._sage_attention_57cb7ec_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_sage_attention_57cb7ec_dirty::{op_name}"
.venv/lib/python3.13/site-packages/hf_xet/hf_xet.abi3.so → torch-ext/sage_attention/_sage_attention_57cb7ec_dirty.abi3.so RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5815fbc856f76eda6c435431e94fcf414dbd5121da2bc55beec4696245bd045b
3
- size 7942656
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ed533e57758ba109f361945c736223026260e2f2155c1c2e1fc6e45c7fac3c8
3
+ size 25534800
torch-ext/sage_attention/_sage_attention_6bzaszjaujzoe.abi3.so DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:67d854647fc7eb60807562b946beceee8d6586f33c6db85cc35c43166b491964
3
- size 25534184
 
 
 
 
torch-ext/sage_attention/_sage_attention_ag736k23icjku.abi3.so DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:035d639a88423f3bc721c59ec70636c1c9a66757ad2d2a188444ed2cde3b4c73
3
- size 25534488
 
 
 
 
torch-ext/sage_attention/_sage_attention_akb65l7w7moi6.abi3.so DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:68727de7945a07b8bffa8178d5b16ed49125d287a9225b7ddfa327e52db24a45
3
- size 25533424