Kernels:
Trusted publisher
Uploaded using `kernel-builder`.
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- build/torch210-cu126-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so} +1 -1
- build/torch210-cu126-x86_64-linux/_ops.py +3 -3
- build/torch210-cu126-x86_64-linux/metadata.json +8 -7
- build/torch210-cu126-x86_64-linux/metadata.json.sigstore +1 -1
- build/torch210-cu126-x86_64-linux/symbols.json +42 -42
- build/torch210-cu128-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so} +1 -1
- build/torch210-cu128-x86_64-linux/_ops.py +3 -3
- build/torch210-cu128-x86_64-linux/metadata.json +8 -7
- build/torch210-cu128-x86_64-linux/metadata.json.sigstore +1 -1
- build/torch210-cu128-x86_64-linux/symbols.json +42 -42
- build/torch210-cu130-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so} +1 -1
- build/torch210-cu130-x86_64-linux/_ops.py +3 -3
- build/torch210-cu130-x86_64-linux/metadata.json +8 -7
- build/torch210-cu130-x86_64-linux/metadata.json.sigstore +1 -1
- build/torch210-cu130-x86_64-linux/symbols.json +42 -42
- build/torch211-cu126-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so} +1 -1
- build/torch211-cu126-x86_64-linux/_ops.py +3 -3
- build/torch211-cu126-x86_64-linux/metadata.json +8 -7
- build/torch211-cu126-x86_64-linux/metadata.json.sigstore +1 -1
- build/torch211-cu126-x86_64-linux/symbols.json +42 -42
- build/torch211-cu128-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so} +1 -1
- build/torch211-cu128-x86_64-linux/_ops.py +3 -3
- build/torch211-cu128-x86_64-linux/metadata.json +8 -7
- build/torch211-cu128-x86_64-linux/metadata.json.sigstore +1 -1
- build/torch211-cu128-x86_64-linux/symbols.json +42 -42
- build/torch211-cu130-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so} +1 -1
- build/torch211-cu130-x86_64-linux/_ops.py +3 -3
- build/torch211-cu130-x86_64-linux/metadata.json +8 -7
- build/torch211-cu130-x86_64-linux/metadata.json.sigstore +1 -1
- build/torch211-cu130-x86_64-linux/symbols.json +42 -42
- build/torch212-cu126-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so} +1 -1
- build/torch212-cu126-x86_64-linux/_ops.py +3 -3
- build/torch212-cu126-x86_64-linux/metadata.json +8 -7
- build/torch212-cu126-x86_64-linux/metadata.json.sigstore +1 -1
- build/torch212-cu126-x86_64-linux/symbols.json +42 -42
- build/torch212-cu130-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so} +1 -1
- build/torch212-cu130-x86_64-linux/_ops.py +3 -3
- build/torch212-cu130-x86_64-linux/metadata.json +8 -7
- build/torch212-cu130-x86_64-linux/metadata.json.sigstore +1 -1
- build/torch212-cu130-x86_64-linux/symbols.json +42 -42
- build/torch212-cu132-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so} +1 -1
- build/torch212-cu132-x86_64-linux/_ops.py +3 -3
- build/torch212-cu132-x86_64-linux/metadata.json +8 -7
- build/torch212-cu132-x86_64-linux/metadata.json.sigstore +1 -1
- build/torch212-cu132-x86_64-linux/symbols.json +42 -42
- build/torch213-cu126-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so} +1 -1
- build/torch213-cu126-x86_64-linux/_ops.py +3 -3
- build/torch213-cu126-x86_64-linux/metadata.json +8 -7
- build/torch213-cu126-x86_64-linux/metadata.json.sigstore +1 -1
- build/torch213-cu126-x86_64-linux/symbols.json +42 -42
build/torch210-cu126-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 103621688
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c10d5a67bda152a5ee4c9b6aba97e678024ba8be9808ea761a0143684b06a05f
|
| 3 |
size 103621688
|
build/torch210-cu126-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _natten_cuda_31270f5
|
| 3 |
+
ops = torch.ops._natten_cuda_31270f5
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_natten_cuda_31270f5::{op_name}"
|
build/torch210-cu126-x86_64-linux/metadata.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
|
|
|
| 5 |
"kernels-minver": "0.14.0",
|
| 6 |
"license": "MIT",
|
| 7 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
@@ -22,8 +23,8 @@
|
|
| 22 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 23 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 24 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 25 |
-
"
|
| 26 |
-
"_ops.py": "
|
| 27 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 28 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 29 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
@@ -52,7 +53,7 @@
|
|
| 52 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 53 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 54 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 55 |
-
"symbols.json": "
|
| 56 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 57 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 58 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
@@ -72,12 +73,12 @@
|
|
| 72 |
},
|
| 73 |
"provenance": {
|
| 74 |
"kernel-builder": {
|
| 75 |
-
"version": "0.
|
| 76 |
-
"commit": "
|
| 77 |
"dirty": false
|
| 78 |
},
|
| 79 |
"kernel": {
|
| 80 |
-
"commit": "
|
| 81 |
"dirty": false
|
| 82 |
}
|
| 83 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
+
"id": "_natten_cuda_31270f5",
|
| 4 |
"version": 1,
|
| 5 |
+
"build-layout": "files",
|
| 6 |
"kernels-minver": "0.14.0",
|
| 7 |
"license": "MIT",
|
| 8 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
|
|
| 23 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 24 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 25 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 26 |
+
"_natten_cuda_31270f5.abi3.so": "wQ1aZ72hUqXuTJtqupfmeAJLqL6YCOp2GgFDaEsGoF8=",
|
| 27 |
+
"_ops.py": "vzk3ldaPIUjmPzynSJNT3eXescYWsbmxBENeACy8WcA=",
|
| 28 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 29 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 30 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
|
|
| 53 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 54 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 55 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 56 |
+
"symbols.json": "UrDOuMsK8IE+RnVWVt4KeQR2kJ9QH15RD6+gjxAO9Ug=",
|
| 57 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 58 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 59 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
|
|
| 73 |
},
|
| 74 |
"provenance": {
|
| 75 |
"kernel-builder": {
|
| 76 |
+
"version": "0.19.0-dev1",
|
| 77 |
+
"commit": "b0bf5a2418da965879146c93b453166fe6df42fe",
|
| 78 |
"dirty": false
|
| 79 |
},
|
| 80 |
"kernel": {
|
| 81 |
+
"commit": "31270f5004b648862db9e8e0e97ce020324b0478",
|
| 82 |
"dirty": false
|
| 83 |
}
|
| 84 |
}
|
build/torch210-cu126-x86_64-linux/metadata.json.sigstore
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial":{"certificate":{"rawBytes":"MIIHKjCCBrGgAwIBAgIUXgC9x5t1gXDGFQmbkhX10tSIT+4wCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMDMxMDUzNzI1WhcNMjYxMDMxMDU0NzI1WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEf9TkAHBw/K843oTsjPRP4nZ6G0OmtqtQq08Q32TJxJmojpWV3YEE/To6Zk/FazjUUAKQ6HbqZthiNASHXMDNBKOCBdAwggXMMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21tdW5pdHkvLmdpdGh1Yi93b3JrZmxvd3MvYnVpbGQueWFtbEByZWZzL2hlYWRzL21haW4wOQYKKwYBBAGDvzABAQQraHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbTAfBgorBgEEAYO/MAECBBF3b3JrZmxvd19kaXNwYXRjaDA2BgorBgEEAYO/MAEDBCg1ZmU5ZGJiM2Q0NWY2ZjI2NTI5NThjMWY3MGU1MzgxODkxZmE3YWEwMBMGCisGAQQBg78wAQQEBUJ1aWxkMCsGCisGAQQBg78wAQUEHWh1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5MB0GCisG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5lbHMtY29tbXVuaXR5L2FjdGlvbnMvcnVucy80MTA4MzU5MjA4MS9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGJBgorBgEEAdZ5AgQCBHsEeQB3AHUA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGhkHZ2cAAABAMARjBEAiBapwJMR5ugV1bb7t/uKpn+RtzGexYkCGMwY4bnYf+FuQIgR066TYpqVL4ekYoHnhlu6emXRjKGX5KJi+GqJGY/EYIwCgYIKoZIzj0EAwMDZwAwZAIwNUGNVfs7H/oYI+LeWZUyEsgln2HH317URHioBoCliPECsJOskFdwOF2Rp1/qhnZrAjBv+b+4u613+KbT13WN38qRTrpR8Er1k8sM865dNS/NUckj/z4xOQw8JW/O6h/AC0A="}, "tlogEntries":[{"logIndex":"3610607211", "logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion":{"kind":"hashedrekord", "version":"0.0.1"}, "integratedTime":"1793425045", "inclusionPromise":{"signedEntryTimestamp":"MEYCIQDbn9MQ1NtZh3sEI10WpJhjX4hK+ByswULqN0FmirBopAIhAKJ3LhuxvaH6CxJcCzCXoQftC+lyqsTk4OYbjDWYkkdY"}, "inclusionProof":{"logIndex":"3488702949", "rootHash":"1xB3QbstBytF0caaJ58lz7tgf4eepkHSpsEMDu5f4Dw=", "treeSize":"3488702957", "hashes":["FzzLlzGJ4i9xWpJsBPDbOvKHxxgsqROBZ7AtjYu2aSw=", "IzV3irdVubhx/SSQd+0ymie2Mx0p4k2mrLBcffxal18=", "qUiB7oTxEwZoFULV+ZkTWc7YQbUvT8mkbDaOWC5V3jE=", "VxF8xTt4TLJwVQBpwLKz2crg3CKO0fOTZzE78RH39WM=", "VEvo08d3inDx68tt/y0iDb+Rmx58cLkoosTbq+fJN7U=", "6oFVAQx0d9AKh1DbW6oXYc/RMQCwCn6BL3bzw6tczAg=", "UnA7Q/ycZv69nqC078usjoOqN0K1OTS76oA9+Iu0wf4=", "IS7BRxVHxq9gK5ijkANMWvxvAoFlqBHq9KAs0Gy7u/8=", "SBGYBxDW1vPrRfLVzkfAmHztV8hjryENrdOwzfl6ZyE=", "VBzotYQmLUVA5ePORWBybjfF8sU+JIUW7rZp/8qaNu0=", "fekca6POtULZgxL4E227LPRKxnnaSJ3Uh9jKswvvyus=", "aBdy9Mluw4miV25uIiM8ZDgXQ/Pm23TTNnKRoEbAiY4=", "Y+QmLOVFahp7HO4KPdNyWDRkNIAKEmTb7WzFzoAi58s=", "C1iNsNunwIhtOOJvTDxee6pgbCkOjryTGo1g+5SLxEs=", "2khvWt9d+ZdJVlsE9c5CUGSWz42nP08VUkB5e4aYzxI=", "e3OaWwzL1tEWYXiUzGpH+1v9CiFPwweyfRzIh3Z+uO4=", "b+938HIdfjdD/+LgIs3AVRE3Wc65/1NSSAL4OJ5FUXE=", "kQz/4ND7LdhfAQn+idNsO+ZFC32sfkYRlhjWF5W+sPc=", "zGfeoWKmrZlXMOvyi3R2GDbGpmI1skJW/wLTXCCgF0o=", "1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=", "xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="], "checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3488702957\n1xB3QbstBytF0caaJ58lz7tgf4eepkHSpsEMDu5f4Dw=\n\n— rekor.sigstore.dev wNI9ajBEAiAaJm6vkSmi+MWCBmXqmhf8Ay6V8heU/BUWIKI0KMb9ZAIgJv6TPltDdcVMGvc0kh6LOrynqa50N3RWZ7DPxmEDDew=\n"}}, "canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7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mUtdHNhLXNlbGZzaWduZWQCFDoTVC8MkGHuvMFDL8uKjosqI4sMMAsGCWCGSAFlAwQCAaCB/DAaBgkqhkiG9w0BCQMxDQYLKoZIhvcNAQkQAQQwHAYJKoZIhvcNAQkFMQ8XDTI2MTAzMTA1MzcyNVowLwYJKoZIhvcNAQkEMSIEIChLS/npsboF8B71ipDj2sabcdBEovQgbm8mQTzU2EVYMIGOBgsqhkiG9w0BCRACLzF/MH0wezB5BCCF+Se8B6tiysO0Q1bBDvyBssaIP9p6uebYcNnROs0FtzBVMD2kOzA5MRUwEwYDVQQKEwxzaWdzdG9yZS5kZXYxIDAeBgNVBAMTF3NpZ3N0b3JlLXRzYS1zZWxmc2lnbmVkAhQ6E1QvDJBh7rzBQy/Lio6LKiOLDDAKBggqhkjOPQQDAgRnMGUCMQCQz/nZcg9E3902CAI2C7e9+lXGHy3B0pe+J9ShRbIfYa1G8MK581F+jqAdRmAml84CMFONxkc0wYHX/TUaVsEbBzwjFXrIuoMUC5TdtQFp0foB/71so6lffNz9DATC82M2EQ=="}]}}, "messageSignature":{"messageDigest":{"algorithm":"SHA2_256", "digest":"kArUjP039HJ0f9jzmmsCNTsGC6o5gPJS0qzrf8Zrlug="}, "signature":"MEQCIF6YPVHWTm5FXFhv3Li+ciM3AJkd/fki9rXKqNaIfHJYAiAm1f26weEb2ElN8bFmOcrzkMkSEIUHbqZ3HvZ5PtB6fg=="}}
|
|
|
|
| 1 |
+
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUAO9snsFNV8Jr2AnhkB1IDiOBgUUwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMTIxMDIwODM0WhcNMjYxMTIxMDIxODM0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDyti1kg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RiTApAIxAOpCR2uW6HprkEK/Ye57yMOj0h155mpUeQfcKHn7OY27xGf2DdkGNpMnLP0UPZQCXQ=="},"tlogEntries":[{"logIndex":"4030899173","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1795226914","inclusionPromise":{"signedEntryTimestamp":"MEUCIQDDmCJC2XjBJtrJhDG/n96+ttKUWvt06PBP/BL0HG3fKwIgZE/78DCGEO7RgwBpz2fz8jgtNbyZTKY8AHxVNKkLwxM="},"inclusionProof":{"logIndex":"3908994911","rootHash":"2isjzZGWaNcfrkbt9ATUoOFbILGX/uZgWgebMZhrdTQ=","treeSize":"3908994917","hashes":["1xCNQ4zA9lzU5fAIFpycI3KLeyxhmNtwj+f7jUJwp/c=","90HT2BSKpRHHfaJF/bIJAAMWge6/2zniDg6MAyRIDdY=","eOHFhKMKhhc+Thjd+Z8CkfyMkn7nCYfjPi/WxgkQobg=","iiEpSrwacFOCV0YLxVO3oNxAa6H6cEaI1QFZurnBhHc=","6JmvzNf1pAHE4Vk+TvPNcb6kYTmds7Uc8cR0WXCUkK8=","pgXijBpJu87+iN7XGek/iTgoX0Rt5oxcXKcCHu3ExDk=","Sn+AYb1YmK/F8ECgo2559k4WGjzjfUn4ZJ5Uez+H9QM=","5oRByY8/02bxJIs1anwiqAupB2RQIY7TrW971Nmpp7U=","2Rt71WgMyU/zi7k9KFRPq73TsDJ1BAA/gysPhaaqHs0=","TnYSkn6gCmC0W5Q70zE/If/0imIiTSMfjYHSNR2/gjM=","CivKB4qQwJ/efmzlbMOtHzFomKxmPl8DgmrU1gXfJbc=","7QhOatgVp6PdYroLLtoCkd+z7p++GJEi0PhNT4miazY=","DR/+o4PSouaxmcHOoT8SiQ/FTcN40w8KhvkWSePwUJ8=","TPnMFjEJWAQvABxd6vVJvcXxcAgWGkz86YdUNbzNnFk=","0FJURNcUGshJHgD9JEae8FQR1/wcJoN4WGg13j5k0IA=","YeXlZ0RHqFK6gqq4hsyYMgKKSx51NRc7HQ7jbKFb4ys=","MgeocvNqIwqgvy0zDQHTAPpPoJl126Y9z+ySQHgYrk0=","bpivoC31PB5djfiSn6cC5GXF2dPZuOJdVxDafoiGndU=","XYkf+Vk9hVBebwq5KRpgAFIE2Jk4aAgO1jFr22tSd4k=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3908994917\n2isjzZGWaNcfrkbt9ATUoOFbILGX/uZgWgebMZhrdTQ=\n\n— rekor.sigstore.dev wNI9ajBGAiEAqqTQT7AqloaX/YyMKU5DJAklQXZ/Im+tJfZ/GbCDHfoCIQDjRj5Y1UGbklwdv3wcpOsNiDGGDmQvVue9WXZbqYd1sA==\n"}},"canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiIyNzNkNDcyYTg3OTVhOTA5NzRlNTQ2MTI4ZjE4MDFkYTJlNmE5MDlhYzBiMjYxNDE5MTBjZGFjMTE2OTZhN2U3In19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FWUNJUURZR3FFc1gxV2lIOWlraHQxMmdqamx5NUhXSXV6TXZvdlBqYjcwNkVqcVJ3SWhBS2JBSkFQeFVhYXk5OGZTVjNXajQ0bnh2cCtabndhdnQrNmR4Mm9lblBoNSIsInB1YmxpY0tleSI6eyJjb250ZW50IjoiTFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVaE1SRU5EUW5KTFowRjNTVUpCWjBsV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Znwavt+6dx2oenPh5"}}
|
build/torch210-cu126-x86_64-linux/symbols.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
-
"module": "
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
-
"module": "
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
-
"module": "
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
@@ -34,7 +34,7 @@
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
-
"module": "
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
-
"module": "
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
@@ -63,7 +63,7 @@
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
-
"module": "
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
@@ -81,18 +81,18 @@
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
-
"module": "
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
-
"return_annotation": "
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
-
"module": "
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
@@ -103,7 +103,7 @@
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
-
"module": "
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
@@ -114,7 +114,7 @@
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
-
"module": "
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
@@ -125,7 +125,7 @@
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
-
"module": "
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
@@ -136,7 +136,7 @@
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
-
"module": "
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
@@ -147,7 +147,7 @@
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
-
"module": "
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
-
"module": "
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
@@ -189,7 +189,7 @@
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
-
"module": "
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
@@ -200,7 +200,7 @@
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
-
"module": "
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
@@ -211,7 +211,7 @@
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
-
"module": "
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
@@ -241,7 +241,7 @@
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
-
"module": "
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
@@ -271,7 +271,7 @@
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
-
"module": "
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
@@ -301,7 +301,7 @@
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
-
"module": "
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
@@ -331,7 +331,7 @@
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
-
"module": "
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
@@ -355,13 +355,13 @@
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
-
"return_annotation": "List[Tuple[Tuple[int, int],
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
-
"module": "
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
@@ -391,7 +391,7 @@
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
-
"module": "
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
@@ -415,13 +415,13 @@
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
-
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]],
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
-
"module": "
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
@@ -451,7 +451,7 @@
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
-
"module": "
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
@@ -481,7 +481,7 @@
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
-
"module": "
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
@@ -511,7 +511,7 @@
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
-
"module": "
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
@@ -541,7 +541,7 @@
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
-
"module": "
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
@@ -571,7 +571,7 @@
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
-
"module": "
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
@@ -607,7 +607,7 @@
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
-
"module": "
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
@@ -643,7 +643,7 @@
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
-
"module": "
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
@@ -766,7 +766,7 @@
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
-
"annotation": "str |
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
@@ -787,7 +787,7 @@
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
-
"module": "
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
@@ -910,7 +910,7 @@
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
-
"annotation": "str |
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
@@ -931,7 +931,7 @@
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
-
"module": "
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
@@ -1054,7 +1054,7 @@
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
-
"annotation": "str |
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
@@ -1075,7 +1075,7 @@
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
-
"module": "
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
@@ -1198,7 +1198,7 @@
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
-
"annotation": "str |
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
@@ -1219,7 +1219,7 @@
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
-
"module": "
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
+
"module": "_natten_cuda_31270f5",
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
+
"module": "_natten_cuda_31270f5.context",
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
+
"module": "_natten_cuda_31270f5.context",
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
+
"module": "_natten_cuda_31270f5.context",
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
+
"module": "_natten_cuda_31270f5.context",
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
+
"module": "_natten_cuda_31270f5.context",
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
+
"module": "_natten_cuda_31270f5.context",
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
+
"return_annotation": "_natten_cuda_31270f5.context.MemoryUsagePreference"
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
+
"module": "_natten_cuda_31270f5.context",
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
+
"module": "_natten_cuda_31270f5.context",
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
+
"module": "_natten_cuda_31270f5.context",
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
+
"module": "_natten_cuda_31270f5.context",
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
+
"module": "_natten_cuda_31270f5.context",
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
+
"module": "_natten_cuda_31270f5.context",
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
+
"module": "_natten_cuda_31270f5.context",
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
+
"module": "_natten_cuda_31270f5.context",
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
+
"module": "_natten_cuda_31270f5.context",
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
+
"return_annotation": "List[Tuple[Tuple[int, int], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
+
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
+
"module": "_natten_cuda_31270f5.attn_merge",
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
build/torch210-cu128-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 336877896
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:66d53d5d0e6737908ca0ab6602dbdf7d9384a682886800dd7a4948af996418a9
|
| 3 |
size 336877896
|
build/torch210-cu128-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _natten_cuda_31270f5
|
| 3 |
+
ops = torch.ops._natten_cuda_31270f5
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_natten_cuda_31270f5::{op_name}"
|
build/torch210-cu128-x86_64-linux/metadata.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
|
|
|
| 5 |
"kernels-minver": "0.14.0",
|
| 6 |
"license": "MIT",
|
| 7 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
@@ -25,8 +26,8 @@
|
|
| 25 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 26 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 27 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 28 |
-
"
|
| 29 |
-
"_ops.py": "
|
| 30 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 31 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 32 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
@@ -55,7 +56,7 @@
|
|
| 55 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 56 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 57 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 58 |
-
"symbols.json": "
|
| 59 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 60 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 61 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
@@ -75,12 +76,12 @@
|
|
| 75 |
},
|
| 76 |
"provenance": {
|
| 77 |
"kernel-builder": {
|
| 78 |
-
"version": "0.
|
| 79 |
-
"commit": "
|
| 80 |
"dirty": false
|
| 81 |
},
|
| 82 |
"kernel": {
|
| 83 |
-
"commit": "
|
| 84 |
"dirty": false
|
| 85 |
}
|
| 86 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
+
"id": "_natten_cuda_31270f5",
|
| 4 |
"version": 1,
|
| 5 |
+
"build-layout": "files",
|
| 6 |
"kernels-minver": "0.14.0",
|
| 7 |
"license": "MIT",
|
| 8 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
|
|
| 26 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 27 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 28 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 29 |
+
"_natten_cuda_31270f5.abi3.so": "ZtU9XQ5nN5CMoKtmAtvffZOEpoKIaADdeklIr5lkGKk=",
|
| 30 |
+
"_ops.py": "vzk3ldaPIUjmPzynSJNT3eXescYWsbmxBENeACy8WcA=",
|
| 31 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 32 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 33 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
|
|
| 56 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 57 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 58 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 59 |
+
"symbols.json": "UrDOuMsK8IE+RnVWVt4KeQR2kJ9QH15RD6+gjxAO9Ug=",
|
| 60 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 61 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 62 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
|
|
| 76 |
},
|
| 77 |
"provenance": {
|
| 78 |
"kernel-builder": {
|
| 79 |
+
"version": "0.19.0-dev1",
|
| 80 |
+
"commit": "b0bf5a2418da965879146c93b453166fe6df42fe",
|
| 81 |
"dirty": false
|
| 82 |
},
|
| 83 |
"kernel": {
|
| 84 |
+
"commit": "31270f5004b648862db9e8e0e97ce020324b0478",
|
| 85 |
"dirty": false
|
| 86 |
}
|
| 87 |
}
|
build/torch210-cu128-x86_64-linux/metadata.json.sigstore
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial":{"certificate":{"rawBytes":"MIIHLTCCBrOgAwIBAgIUUxinH0hI4IufxGYtPn0JDC1WKUgwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMDMxMDUzNzE1WhcNMjYxMDMxMDU0NzE1WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgMF5Q6swoPQjZDTHYlzVRSSMclkMI5tDsf+26WMlVKE2FWW2CdFFHfNRnMb+EWLaSJZxNkqOyZeUkE5Ip8IpIKOCBdIwggXOMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHV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9odWdnaW5nZmFjZTAYBgorBgEEAYO/MAERBAoMCDI1NzIwNzQzMG0GCisGAQQBg78wARIEXwxdaHR0cHM6Ly9naXRodWIuY29tL2h1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5Ly5naXRodWIvd29ya2Zsb3dzL2J1aWxkLnlhbWxAcmVmcy9oZWFkcy9tYWluMDgGCisGAQQBg78wARMEKgwoNWZlOWRiYjNkNDVmNmYyNjUyOTU4YzFmNzBlNTM4MTg5MWZhN2FhMDAhBgorBgEEAYO/MAEUBBMMEXdvcmtmbG93X2Rpc3BhdGNoMGQGCisGAQQBg78wARUEVgxUaHR0cHM6Ly9naXRodWIuY29tL2h1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5L2FjdGlvbnMvcnVucy80MTA4MzU5MjA4MS9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGLBgorBgEEAdZ5AgQCBH0EewB5AHcA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGhkHZQRQAABAMASDBGAiEA2r6PpF/+YA08zVUTH37ol0Re7JwcqkJslsSqp0CSDFUCIQDXfu5W+p3Yb31Sz/TJlrGJzBfq81hm4G5CG6iesciuXzAKBggqhkjOPQQDAwNoADBlAjEAxZlwyHsOWU4A3lKJct/NVnopIg6S2VMShhqJ4m6q9J3owcqGvMXBvcXqsktz/TUMAjA9v9GP08tYPBzUV1awFuiQobdsHob+WkiYJ6B8muKkyDTVJydaTnYsf4AVFCgSl6k="}, "tlogEntries":[{"logIndex":"3610606958", "logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion":{"kind":"hashedrekord", "version":"0.0.1"}, "integratedTime":"1793425035", "inclusionPromise":{"signedEntryTimestamp":"MEUCIQDnn375N9hzyhqV+HfxTGXcAZtxjseIFeS6hLO4KqC5PAIgKQxiDvCjTKvdi77fLDdg6YXDQQ+YlrYKCPBRHXuPfDM="}, "inclusionProof":{"logIndex":"3488702696", "rootHash":"FxA1Lf2bwYpYVAi+rpuUFrWYJR53wufVlm7iOwygI18=", "treeSize":"3488702699", "hashes":["SdpiuTKBTwjmS2v2zrANqxQa1IprFsWVyp9d0FeaokU=", "zRCAHjA2JDrdpBn/hg67tXMOytT56WW/OilWi160174=", "3hr6XbJ39GQV+VUJG6dYH6N5/e1dLnO/eGRy49TSTZk=", "oQrIGB4ljk+BA6ag48sMMlDxDdVSnzNqWOh7A2jdcb8=", "VRKC9dYts2HpWyrNJtb3m29ddLo6kMV0HEpxxZq1ksw=", "6wRwEMHvy8TyI/PD4+bxG+dKULtzFoEJea2HJYgpyJ0=", "SBGYBxDW1vPrRfLVzkfAmHztV8hjryENrdOwzfl6ZyE=", "VBzotYQmLUVA5ePORWBybjfF8sU+JIUW7rZp/8qaNu0=", "fekca6POtULZgxL4E227LPRKxnnaSJ3Uh9jKswvvyus=", "aBdy9Mluw4miV25uIiM8ZDgXQ/Pm23TTNnKRoEbAiY4=", "Y+QmLOVFahp7HO4KPdNyWDRkNIAKEmTb7WzFzoAi58s=", "C1iNsNunwIhtOOJvTDxee6pgbCkOjryTGo1g+5SLxEs=", "2khvWt9d+ZdJVlsE9c5CUGSWz42nP08VUkB5e4aYzxI=", "e3OaWwzL1tEWYXiUzGpH+1v9CiFPwweyfRzIh3Z+uO4=", "b+938HIdfjdD/+LgIs3AVRE3Wc65/1NSSAL4OJ5FUXE=", "kQz/4ND7LdhfAQn+idNsO+ZFC32sfkYRlhjWF5W+sPc=", "zGfeoWKmrZlXMOvyi3R2GDbGpmI1skJW/wLTXCCgF0o=", "1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=", "xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="], "checkpoint":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WxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGh+9zNmAAABAMARzBFAiALafYysgxpYHaHO1om9E3yZXaNskAlBfanqXDhHXmt8AIhANG8xPoBD2fH8Xn6FVkTuEgjVaCSChsTvccnYxCnFRcgMAoGCCqGSM49BAMDA2gAMGUCMCe6/u3k6o7QIg7bFGi+j1xaWKkwJfzEh1fKm1otY68l7MD08/+9Yd9s0uK3RiTApAIxAOpCR2uW6HprkEK/Ye57yMOj0h155mpUeQfcKHn7OY27xGf2DdkGNpMnLP0UPZQCXQ=="},"tlogEntries":[{"logIndex":"4030899170","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1795226914","inclusionPromise":{"signedEntryTimestamp":"MEQCIA2hIoqAIW7ufJb7IhgUZ82nGC4rIpL3+92yh9gzKHjoAiADBNar4Kx8nQlmbuVk8YBqQo6iClk563YVpibbNeahlQ=="},"inclusionProof":{"logIndex":"3908994908","rootHash":"2isjzZGWaNcfrkbt9ATUoOFbILGX/uZgWgebMZhrdTQ=","treeSize":"3908994917","hashes":["sboccbvZsOi8n1kC6RuWX0dHlyfqliPDdHBAcLgLMv0=","qK6NlGEJ993shphIJ7ec7AOtNgGn1WPQ6NEbLyN5P0g=","eOHFhKMKhhc+Thjd+Z8CkfyMkn7nCYfjPi/WxgkQobg=","iiEpSrwacFOCV0YLxVO3oNxAa6H6cEaI1QFZurnBhHc=","6JmvzNf1pAHE4Vk+TvPNcb6kYTmds7Uc8cR0WXCUkK8=","pgXijBpJu87+iN7XGek/iTgoX0Rt5oxcXKcCHu3ExDk=","Sn+AYb1YmK/F8ECgo2559k4WGjzjfUn4ZJ5Uez+H9QM=","5oRByY8/02bxJIs1anwiqAupB2RQIY7TrW971Nmpp7U=","2Rt71WgMyU/zi7k9KFRPq73TsDJ1BAA/gysPhaaqHs0=","TnYSkn6gCmC0W5Q70zE/If/0imIiTSMfjYHSNR2/gjM=","CivKB4qQwJ/efmzlbMOtHzFomKxmPl8DgmrU1gXfJbc=","7QhOatgVp6PdYroLLtoCkd+z7p++GJEi0PhNT4miazY=","DR/+o4PSouaxmcHOoT8SiQ/FTcN40w8KhvkWSePwUJ8=","TPnMFjEJWAQvABxd6vVJvcXxcAgWGkz86YdUNbzNnFk=","0FJURNcUGshJHgD9JEae8FQR1/wcJoN4WGg13j5k0IA=","YeXlZ0RHqFK6gqq4hsyYMgKKSx51NRc7HQ7jbKFb4ys=","MgeocvNqIwqgvy0zDQHTAPpPoJl126Y9z+ySQHgYrk0=","bpivoC31PB5djfiSn6cC5GXF2dPZuOJdVxDafoiGndU=","XYkf+Vk9hVBebwq5KRpgAFIE2Jk4aAgO1jFr22tSd4k=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3908994917\n2isjzZGWaNcfrkbt9ATUoOFbILGX/uZgWgebMZhrdTQ=\n\n— rekor.sigstore.dev wNI9ajBEAiBOK7fvRIrCMXu9Qlri/1m32LYN1jYM/gs2fpl/nAd/ZAIgbiPZytNQBcZF/qyF8BlrGm1tt+K8KyK/VWz2GGbrW18=\n"}},"canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiIxMjY1OTI1ZjY1Y2M1YjdkZjg4NjczMDM2YzBlNzcyYTRkNTViOTk2NzUwNTRkMWNmZjNiZjZ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sBKJtI99jP+qvT3lTJu3P6Vmjh1inBH9fTK3Y+8FGzqrj112bMzvpgZYAjA50yH4Hu4wS0BnAMCd/IqubLdP2GnpKiGlzqAxpN5TmEB7Gr5S+mlnL0PNOJp6UdE="}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"EmWSX2XMW334hnMDbA53Kk1VuZZ1BU0c/zv2r3Q/5Ts="},"signature":"MEQCIHVNwwH74dn0NwwD0kOYPw5F5jaRV+4lWFSh943fkEltAiBJA/OYkW5sMAzZsvntdP6OOM9CsIuVAKQuToS989chmg=="}}
|
build/torch210-cu128-x86_64-linux/symbols.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
-
"module": "
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
-
"module": "
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
-
"module": "
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
@@ -34,7 +34,7 @@
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
-
"module": "
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
-
"module": "
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
@@ -63,7 +63,7 @@
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
-
"module": "
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
@@ -81,18 +81,18 @@
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
-
"module": "
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
-
"return_annotation": "
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
-
"module": "
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
@@ -103,7 +103,7 @@
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
-
"module": "
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
@@ -114,7 +114,7 @@
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
-
"module": "
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
@@ -125,7 +125,7 @@
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
-
"module": "
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
@@ -136,7 +136,7 @@
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
-
"module": "
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
@@ -147,7 +147,7 @@
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
-
"module": "
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
-
"module": "
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
@@ -189,7 +189,7 @@
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
-
"module": "
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
@@ -200,7 +200,7 @@
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
-
"module": "
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
@@ -211,7 +211,7 @@
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
-
"module": "
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
@@ -241,7 +241,7 @@
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
-
"module": "
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
@@ -271,7 +271,7 @@
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
-
"module": "
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
@@ -301,7 +301,7 @@
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
-
"module": "
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
@@ -331,7 +331,7 @@
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
-
"module": "
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
@@ -355,13 +355,13 @@
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
-
"return_annotation": "List[Tuple[Tuple[int, int],
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
-
"module": "
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
@@ -391,7 +391,7 @@
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
-
"module": "
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
@@ -415,13 +415,13 @@
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
-
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]],
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
-
"module": "
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
@@ -451,7 +451,7 @@
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
-
"module": "
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
@@ -481,7 +481,7 @@
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
-
"module": "
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
@@ -511,7 +511,7 @@
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
-
"module": "
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
@@ -541,7 +541,7 @@
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
-
"module": "
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
@@ -571,7 +571,7 @@
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
-
"module": "
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
@@ -607,7 +607,7 @@
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
-
"module": "
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
@@ -643,7 +643,7 @@
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
-
"module": "
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
@@ -766,7 +766,7 @@
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
-
"annotation": "str |
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
@@ -787,7 +787,7 @@
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
-
"module": "
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
@@ -910,7 +910,7 @@
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
-
"annotation": "str |
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
@@ -931,7 +931,7 @@
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
-
"module": "
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
@@ -1054,7 +1054,7 @@
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
-
"annotation": "str |
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
@@ -1075,7 +1075,7 @@
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
-
"module": "
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
@@ -1198,7 +1198,7 @@
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
-
"annotation": "str |
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
@@ -1219,7 +1219,7 @@
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
-
"module": "
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
+
"module": "_natten_cuda_31270f5",
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
+
"module": "_natten_cuda_31270f5.context",
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
+
"module": "_natten_cuda_31270f5.context",
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
+
"module": "_natten_cuda_31270f5.context",
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
+
"module": "_natten_cuda_31270f5.context",
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
+
"module": "_natten_cuda_31270f5.context",
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
+
"module": "_natten_cuda_31270f5.context",
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
+
"return_annotation": "_natten_cuda_31270f5.context.MemoryUsagePreference"
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
+
"module": "_natten_cuda_31270f5.context",
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
+
"module": "_natten_cuda_31270f5.context",
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
+
"module": "_natten_cuda_31270f5.context",
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
+
"module": "_natten_cuda_31270f5.context",
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
+
"module": "_natten_cuda_31270f5.context",
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
+
"module": "_natten_cuda_31270f5.context",
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
+
"module": "_natten_cuda_31270f5.context",
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
+
"module": "_natten_cuda_31270f5.context",
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
+
"module": "_natten_cuda_31270f5.context",
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
+
"return_annotation": "List[Tuple[Tuple[int, int], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
+
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
+
"module": "_natten_cuda_31270f5.attn_merge",
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
build/torch210-cu130-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 164416224
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bef0578a226a47ea01e0a46d9c0912a541a4f8d4dee405260e9dec19a095d4c1
|
| 3 |
size 164416224
|
build/torch210-cu130-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _natten_cuda_31270f5
|
| 3 |
+
ops = torch.ops._natten_cuda_31270f5
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_natten_cuda_31270f5::{op_name}"
|
build/torch210-cu130-x86_64-linux/metadata.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
|
|
|
| 5 |
"kernels-minver": "0.14.0",
|
| 6 |
"license": "MIT",
|
| 7 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
@@ -25,8 +26,8 @@
|
|
| 25 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 26 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 27 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 28 |
-
"
|
| 29 |
-
"_ops.py": "
|
| 30 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 31 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 32 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
@@ -55,7 +56,7 @@
|
|
| 55 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 56 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 57 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 58 |
-
"symbols.json": "
|
| 59 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 60 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 61 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
@@ -75,12 +76,12 @@
|
|
| 75 |
},
|
| 76 |
"provenance": {
|
| 77 |
"kernel-builder": {
|
| 78 |
-
"version": "0.
|
| 79 |
-
"commit": "
|
| 80 |
"dirty": false
|
| 81 |
},
|
| 82 |
"kernel": {
|
| 83 |
-
"commit": "
|
| 84 |
"dirty": false
|
| 85 |
}
|
| 86 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
+
"id": "_natten_cuda_31270f5",
|
| 4 |
"version": 1,
|
| 5 |
+
"build-layout": "files",
|
| 6 |
"kernels-minver": "0.14.0",
|
| 7 |
"license": "MIT",
|
| 8 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
|
|
| 26 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 27 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 28 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 29 |
+
"_natten_cuda_31270f5.abi3.so": "vvBXiiJqR+oB4KRtnAkSpUGk+NTe5AUmDp3sGaCV1ME=",
|
| 30 |
+
"_ops.py": "vzk3ldaPIUjmPzynSJNT3eXescYWsbmxBENeACy8WcA=",
|
| 31 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 32 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 33 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
|
|
| 56 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 57 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 58 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 59 |
+
"symbols.json": "UrDOuMsK8IE+RnVWVt4KeQR2kJ9QH15RD6+gjxAO9Ug=",
|
| 60 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 61 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 62 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
|
|
| 76 |
},
|
| 77 |
"provenance": {
|
| 78 |
"kernel-builder": {
|
| 79 |
+
"version": "0.19.0-dev1",
|
| 80 |
+
"commit": "b0bf5a2418da965879146c93b453166fe6df42fe",
|
| 81 |
"dirty": false
|
| 82 |
},
|
| 83 |
"kernel": {
|
| 84 |
+
"commit": "31270f5004b648862db9e8e0e97ce020324b0478",
|
| 85 |
"dirty": false
|
| 86 |
}
|
| 87 |
}
|
build/torch210-cu130-x86_64-linux/metadata.json.sigstore
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial":{"certificate":{"rawBytes":"MIIHLTCCBrKgAwIBAgIUXyzqeLnKSbksBv4WZTNrIE7ZvTUwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMDMxMDUzNzE5Whc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MDA2kAMGYCMQDIX3yKtzCFmY8SD7Mwy3oL81jyaUrA7Pl1jfEmaSGvH7oGHKWWX6i+oHTJ8fkMTVkCMQCHrbw2Y+t+c1eSl51f00bx8xMbin+d4bie5bO7kKBWtTIr0teADmIqJL1y+CJS9vA="}, "tlogEntries":[{"logIndex":"3610607067", "logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion":{"kind":"hashedrekord", "version":"0.0.1"}, "integratedTime":"1793425039", "inclusionPromise":{"signedEntryTimestamp":"MEQCIDQW3RSFPrc2Xzk+4e1OUUwdDrBg60uSfrNY8KupmMXNAiATndODjpaIjhioPIazrqSFVsaiKD5LGV2RZG3/mfmZjQ=="}, "inclusionProof":{"logIndex":"3488702805", "rootHash":"qi3T6fSlV/GqkwJSHzJGd2dakEDrisKVQD37rv4aVtk=", "treeSize":"3488702808", "hashes":["oH5QMnZqtjvGd0Cc6xacW9zHHv4F5E4XXXEh2Ucg/yY=", "fc62yxThKXk+6eeABchTpia4hS0Yq7C4ynIfKuiax5U=", "0kuN3+YqDJOtT05rk9J8MvWoekIUxLZ/HWr/x+DNLfM=", "CrtXUvRW/7DnnR/nG12xT0/v5kjSbmLL8gfqQlEre4w=", "3YeWsYGIL5vtwjG6U/vXeeDcKIX57SWMYIooUfWjtXk=", "IS7BRxVHxq9gK5ijkANMWvxvAoFlqBHq9KAs0Gy7u/8=", "SBGYBxDW1vPrRfLVzkfAmHztV8hjryENrdOwzfl6ZyE=", "VBzotYQmLUVA5ePORWBybjfF8sU+JIUW7rZp/8qaNu0=", "fekca6POtULZgxL4E227LPRKxnnaSJ3Uh9jKswvvyus=", "aBdy9Mluw4miV25uIiM8ZDgXQ/Pm23TTNnKRoEbAiY4=", "Y+QmLOVFahp7HO4KPdNyWDRkNIAKEmTb7WzFzoAi58s=", "C1iNsNunwIhtOOJvTDxee6pgbCkOjryTGo1g+5SLxEs=", "2khvWt9d+ZdJVlsE9c5CUGSWz42nP08VUkB5e4aYzxI=", "e3OaWwzL1tEWYXiUzGpH+1v9CiFPwweyfRzIh3Z+uO4=", "b+938HIdfjdD/+LgIs3AVRE3Wc65/1NSSAL4OJ5FUXE=", "kQz/4ND7LdhfAQn+idNsO+ZFC32sfkYRlhjWF5W+sPc=", "zGfeoWKmrZlXMOvyi3R2GDbGpmI1skJW/wLTXCCgF0o=", "1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=", "xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="], "checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3488702808\nqi3T6fSlV/GqkwJSHzJGd2dakEDrisKVQD37rv4aVtk=\n\n— rekor.sigstore.dev wNI9ajBFAiEA/zauf4M2fdlcBrGysSHOFAiCr3rk2RsT0cPWZoYgPCQCIEyqszRYe3TOcOMG/qCsm4AXa4Jsk17S1WAKMRmHjElo\n"}}, "canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiI3YzkwMTJhYmU0YzFiNGIwYjNlNzY2NjFhMDFiMTdjOGE0ZTc2MDY0NjgwYTBjOWU3NzVjMjI4OGRhZDg3ZTdlIn19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FWUNJUUM1c0FnMEtjUyt5TVorV243cUlVZnFqWHlqVEo3Qno0M1ptT3ozallwY2tnSWhBUHR5dG1SMVo1czJKQXFZMlgwR3hCT3Z1cmFZTzdiaWN2OUFRSWNNWGhXLyIsInB1YmxpY0tleSI6eyJjb250ZW50IjoiTFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVaE1WRU5EUW5KTFowRjNTVUpCWjBsVldIbDZjV1ZNYmt0VFltdHpRblkwVjFwVVRuSkpSVGR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5DT3RIprjTFBLWVr2+AjEAmouEH1XIOQX9YcRt1TF6Wl00TQAw8y3ZgSKe3Sm8B+56Dw7x61h40bSPAQpKfzY0"}]}}, "messageSignature":{"messageDigest":{"algorithm":"SHA2_256", "digest":"fJASq+TBtLCz52ZhoBsXyKTnYGRoCgyed1wiiNrYfn4="}, "signature":"MEYCIQC5sAg0KcS+yMZ+Wn7qIUfqjXyjTJ7Bz43ZmOz3jYpckgIhAPtytmR1Z5s2JAqY2X0GxBOvuraYO7bicv9AQIcMXhW/"}}
|
|
|
|
| 1 |
+
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUAO9snsFNV8Jr2AnhkB1IDiOBgUUwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMTIxMDIwODM0WhcNMjYxMTIxMDIxODM0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDyti1kgfmj6pqED9rQHMeUyh1wXf98IYYSXwHwrnKrfAPBi9+VyEO6g5gSv6QIahYv+QrKv3URPVFeLZ7m2mXaOCBdEwggXNMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21tdW5pdHkvLmdpdGh1Yi93b3JrZmxvd3MvYnVpbGQueWFtbEByZWZzL2hlYWRzL21haW4wOQYKKwYBBAGDvzABAQQraHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbTAfBgorBgEEAYO/MAECBBF3b3JrZmxvd19kaXNwYXRjaDA2BgorBgEEAYO/MAEDBCgzMTI3MG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GUwZTk3Y2UwMjAzMjRiMDQ3ODAhBgorBgEEAYO/MAEUBBMMEXdvcmtmbG93X2Rpc3BhdGNoMGQGCisGAQQBg78wARUEVgxUaHR0cHM6Ly9naXRodWIuY29tL2h1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5L2FjdGlvbnMvcnVucy80NDc2OTQzOTc2My9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGh+9zNmAAABAMARzBFAiALafYysgxpYHaHO1om9E3yZXaNskAlBfanqXDhHXmt8AIhANG8xPoBD2fH8Xn6FVkTuEgjVaCSChsTvccnYxCnFRcgMAoGCCqGSM49BAMDA2gAMGUCMCe6/u3k6o7QIg7bFGi+j1xaWKkwJfzEh1fKm1otY68l7MD08/+9Yd9s0uK3RiTApAIxAOpCR2uW6HprkEK/Ye57yMOj0h155mpUeQfcKHn7OY27xGf2DdkGNpMnLP0UPZQCXQ=="},"tlogEntries":[{"logIndex":"4030899171","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1795226914","inclusionPromise":{"signedEntryTimestamp":"MEUCIQDmGGlyPjA668eehfNvBsdxoQltBoncfmdZo4BQlff6GAIgGU2Y+5rADg29c4UO9nqPLO1LhcXjllAe/NUZAGIt25Y="},"inclusionProof":{"logIndex":"3908994909","rootHash":"2isjzZGWaNcfrkbt9ATUoOFbILGX/uZgWgebMZhrdTQ=","treeSize":"3908994917","hashes":["hgrGCoNTIa0zL10nbz47mHgys6MipOyB/Z7bKnBiZmo=","qK6NlGEJ993shphIJ7ec7AOtNgGn1WPQ6NEbLyN5P0g=","eOHFhKMKhhc+Thjd+Z8CkfyMkn7nCYfjPi/WxgkQobg=","iiEpSrwacFOCV0YLxVO3oNxAa6H6cEaI1QFZurnBhHc=","6JmvzNf1pAHE4Vk+TvPNcb6kYTmds7Uc8cR0WXCUkK8=","pgXijBpJu87+iN7XGek/iTgoX0Rt5oxcXKcCHu3ExDk=","Sn+AYb1YmK/F8ECgo2559k4WGjzjfUn4ZJ5Uez+H9QM=","5oRByY8/02bxJIs1anwiqAupB2RQIY7TrW971Nmpp7U=","2Rt71WgMyU/zi7k9KFRPq73TsDJ1BAA/gysPhaaqHs0=","TnYSkn6gCmC0W5Q70zE/If/0imIiTSMfjYHSNR2/gjM=","CivKB4qQwJ/efmzlbMOtHzFomKxmPl8DgmrU1gXfJbc=","7QhOatgVp6PdYroLLtoCkd+z7p++GJEi0PhNT4miazY=","DR/+o4PSouaxmcHOoT8SiQ/FTcN40w8KhvkWSePwUJ8=","TPnMFjEJWAQvABxd6vVJvcXxcAgWGkz86YdUNbzNnFk=","0FJURNcUGshJHgD9JEae8FQR1/wcJoN4WGg13j5k0IA=","YeXlZ0RHqFK6gqq4hsyYMgKKSx51NRc7HQ7jbKFb4ys=","MgeocvNqIwqgvy0zDQHTAPpPoJl126Y9z+ySQHgYrk0=","bpivoC31PB5djfiSn6cC5GXF2dPZuOJdVxDafoiGndU=","XYkf+Vk9hVBebwq5KRpgAFIE2Jk4aAgO1jFr22tSd4k=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3908994917\n2isjzZGWaNcfrkbt9ATUoOFbILGX/uZgWgebMZhrdTQ=\n\n— rekor.sigstore.dev wNI9ajBFAiBL0diaQcugScKfCheT8GBmZiFSVPfvPnj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aMC8GCSqGSIb3DQEJBDEiBCCCjxxSR3a98FdWRb95MTT79jUsNa5YfK02BthsSvTBlTCBjgYLKoZIhvcNAQkQAi8xfzB9MHsweQQghfknvAerYsrDtENWwQ78gbLGiD/aernm2HDZ0TrNBbcwVTA9pDswOTEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MSAwHgYDVQQDExdzaWdzdG9yZS10c2Etc2VsZnNpZ25lZAIUOhNULwyQYe68wUMvy4qOiyojiwwwCgYIKoZIzj0EAwIEZzBlAjBK+jkNNo0PJZaJNauLLNNV0/IijyqBu16NV/uWfATrcPHGPcrexPFEtmwn0LHbGhcCMQC0vYf5xIEsATK5rk4CwjPYaAviFCMyXPlohH9EnaFcuC9jLL7TmnM+BT7kCAmysPU="}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"/GGXizsafmJ6k25OfC8hDyPHRMglAG7zgAKAuGJ6aJM="},"signature":"MEUCIFjI7Rfei+hQ2iXJepH0ltZF9lgMqu9ouaq3IDIqOuTxAiEAwgiusr+mFzeBTJv50U2OhT9deQkcnjEKzwLVNOn4OTI="}}
|
build/torch210-cu130-x86_64-linux/symbols.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
-
"module": "
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
-
"module": "
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
-
"module": "
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
@@ -34,7 +34,7 @@
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
-
"module": "
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
-
"module": "
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
@@ -63,7 +63,7 @@
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
-
"module": "
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
@@ -81,18 +81,18 @@
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
-
"module": "
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
-
"return_annotation": "
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
-
"module": "
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
@@ -103,7 +103,7 @@
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
-
"module": "
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
@@ -114,7 +114,7 @@
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
-
"module": "
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
@@ -125,7 +125,7 @@
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
-
"module": "
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
@@ -136,7 +136,7 @@
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
-
"module": "
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
@@ -147,7 +147,7 @@
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
-
"module": "
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
-
"module": "
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
@@ -189,7 +189,7 @@
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
-
"module": "
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
@@ -200,7 +200,7 @@
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
-
"module": "
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
@@ -211,7 +211,7 @@
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
-
"module": "
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
@@ -241,7 +241,7 @@
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
-
"module": "
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
@@ -271,7 +271,7 @@
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
-
"module": "
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
@@ -301,7 +301,7 @@
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
-
"module": "
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
@@ -331,7 +331,7 @@
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
-
"module": "
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
@@ -355,13 +355,13 @@
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
-
"return_annotation": "List[Tuple[Tuple[int, int],
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
-
"module": "
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
@@ -391,7 +391,7 @@
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
-
"module": "
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
@@ -415,13 +415,13 @@
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
-
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]],
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
-
"module": "
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
@@ -451,7 +451,7 @@
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
-
"module": "
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
@@ -481,7 +481,7 @@
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
-
"module": "
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
@@ -511,7 +511,7 @@
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
-
"module": "
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
@@ -541,7 +541,7 @@
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
-
"module": "
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
@@ -571,7 +571,7 @@
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
-
"module": "
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
@@ -607,7 +607,7 @@
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
-
"module": "
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
@@ -643,7 +643,7 @@
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
-
"module": "
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
@@ -766,7 +766,7 @@
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
-
"annotation": "str |
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
@@ -787,7 +787,7 @@
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
-
"module": "
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
@@ -910,7 +910,7 @@
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
-
"annotation": "str |
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
@@ -931,7 +931,7 @@
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
-
"module": "
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
@@ -1054,7 +1054,7 @@
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
-
"annotation": "str |
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
@@ -1075,7 +1075,7 @@
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
-
"module": "
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
@@ -1198,7 +1198,7 @@
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
-
"annotation": "str |
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
@@ -1219,7 +1219,7 @@
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
-
"module": "
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
+
"module": "_natten_cuda_31270f5",
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
+
"module": "_natten_cuda_31270f5.context",
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
+
"module": "_natten_cuda_31270f5.context",
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
+
"module": "_natten_cuda_31270f5.context",
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
+
"module": "_natten_cuda_31270f5.context",
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
+
"module": "_natten_cuda_31270f5.context",
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
+
"module": "_natten_cuda_31270f5.context",
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
+
"return_annotation": "_natten_cuda_31270f5.context.MemoryUsagePreference"
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
+
"module": "_natten_cuda_31270f5.context",
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
+
"module": "_natten_cuda_31270f5.context",
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
+
"module": "_natten_cuda_31270f5.context",
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
+
"module": "_natten_cuda_31270f5.context",
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
+
"module": "_natten_cuda_31270f5.context",
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
+
"module": "_natten_cuda_31270f5.context",
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
+
"module": "_natten_cuda_31270f5.context",
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
+
"module": "_natten_cuda_31270f5.context",
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
+
"module": "_natten_cuda_31270f5.context",
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
+
"return_annotation": "List[Tuple[Tuple[int, int], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
+
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
+
"module": "_natten_cuda_31270f5.attn_merge",
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
build/torch211-cu126-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 103602296
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c819d99b84cda55290929512429674c931223193d7aec48a053b11a8733ca6e0
|
| 3 |
size 103602296
|
build/torch211-cu126-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _natten_cuda_31270f5
|
| 3 |
+
ops = torch.ops._natten_cuda_31270f5
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_natten_cuda_31270f5::{op_name}"
|
build/torch211-cu126-x86_64-linux/metadata.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
|
|
|
| 5 |
"kernels-minver": "0.14.0",
|
| 6 |
"license": "MIT",
|
| 7 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
@@ -22,8 +23,8 @@
|
|
| 22 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 23 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 24 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 25 |
-
"
|
| 26 |
-
"_ops.py": "
|
| 27 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 28 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 29 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
@@ -52,7 +53,7 @@
|
|
| 52 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 53 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 54 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 55 |
-
"symbols.json": "
|
| 56 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 57 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 58 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
@@ -72,12 +73,12 @@
|
|
| 72 |
},
|
| 73 |
"provenance": {
|
| 74 |
"kernel-builder": {
|
| 75 |
-
"version": "0.
|
| 76 |
-
"commit": "
|
| 77 |
"dirty": false
|
| 78 |
},
|
| 79 |
"kernel": {
|
| 80 |
-
"commit": "
|
| 81 |
"dirty": false
|
| 82 |
}
|
| 83 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
+
"id": "_natten_cuda_31270f5",
|
| 4 |
"version": 1,
|
| 5 |
+
"build-layout": "files",
|
| 6 |
"kernels-minver": "0.14.0",
|
| 7 |
"license": "MIT",
|
| 8 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
|
|
| 23 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 24 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 25 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 26 |
+
"_natten_cuda_31270f5.abi3.so": "yBnZm4TNpVKQkpUSQpZ0yTEiMZPXrsSKBTsRqHM8puA=",
|
| 27 |
+
"_ops.py": "vzk3ldaPIUjmPzynSJNT3eXescYWsbmxBENeACy8WcA=",
|
| 28 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 29 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 30 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
|
|
| 53 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 54 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 55 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 56 |
+
"symbols.json": "UrDOuMsK8IE+RnVWVt4KeQR2kJ9QH15RD6+gjxAO9Ug=",
|
| 57 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 58 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 59 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
|
|
| 73 |
},
|
| 74 |
"provenance": {
|
| 75 |
"kernel-builder": {
|
| 76 |
+
"version": "0.19.0-dev1",
|
| 77 |
+
"commit": "b0bf5a2418da965879146c93b453166fe6df42fe",
|
| 78 |
"dirty": false
|
| 79 |
},
|
| 80 |
"kernel": {
|
| 81 |
+
"commit": "31270f5004b648862db9e8e0e97ce020324b0478",
|
| 82 |
"dirty": false
|
| 83 |
}
|
| 84 |
}
|
build/torch211-cu126-x86_64-linux/metadata.json.sigstore
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial":{"certificate":{"rawBytes":"MIIHKzCCBrKgAwIBAgIUZGiM0gCmEnN4MuDgdphOTjXjJiswCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMDMxMDUzNzIzWhcNMjYxMDMxMDU0NzIzWjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEup0gMsJNmYO6BfazlDY85VD7rxLmkwX/PQMT+oHPlleJTpNxY7hF7Oq5fIdHsTPhYS+P+p8iMNdXSsE2A0GAHaOCBdEwggXNMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21tdW5pdHkvLmdpdGh1Yi93b3JrZmxvd3MvYnVpbGQueWFtbEByZWZzL2hlYWRzL21haW4wOQYKKwYBBAGDvzABAQQraHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbTAfBgorBgEEAYO/MAECBBF3b3JrZmxvd19kaXNwYXRjaDA2BgorBgEEAYO/MAEDBCg1ZmU5ZGJiM2Q0NWY2ZjI2NTI5NThjMWY3MGU1MzgxODkxZmE3YWEwMBMGCisGAQQBg78wAQQEBUJ1aWxkMCsGCisGAQQBg78wAQUEHWh1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5MB0GCisGAQQBg78wAQYED3JlZnMvaGVhZHMvbWFpbjA7BgorBgEEAYO/MAEIBC0MK2h0dHBzOi8vdG9rZW4uYWN0aW9ucy5naXRodWJ1c2VyY29udGVudC5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gEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGhkHZwTwAABAMARzBFAiBTCUutc7ktu70TxgtdeT4AvlwJeLzvYsa8HIk3xEknYwIhAMRPqmpt03WErro0/s6WtWRt4DTMrFhz/R/lC8EMJg8XMAoGCCqGSM49BAMDA2cAMGQCMBYW76CFk+0cKX2pmX4GJx0F03FL0GPgXaGQnxYKjY7E153HRA1pJcK+hBWOuggUWwIwNmhl2vYgIxkfZNB5OsXsn5rJjMm+7h4dCyYJv7jNzmiNs5IQxIDA18mW9Oi3hbmG"}, "tlogEntries":[{"logIndex":"3610607168", "logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion":{"kind":"hashedrekord", "version":"0.0.1"}, "integratedTime":"1793425043", "inclusionPromise":{"signedEntryTimestamp":"MEUCIDANM0Sy7D5feEUYkTsjYj110IH04aI6SEpb+/re7o1LAiEA8CEpYz3A8d3e5FEYyqokojnrr/IhKCqtJj/mSptGLak="}, "inclusionProof":{"logIndex":"3488702906", "rootHash":"Wx/RrF73ZwUsr4xFkEqWpqRv9XvSQOKqDFVwVOvkPrs=", "treeSize":"3488702910", "hashes":["7dv+qTaAhj9klwLnRKO3W2Cc3X9FeVhyGz7T3lJcxRo=", "YwrKoT7kd3pv719WF7kdmnaehKf4Etqsog1Vidip37k=", "WxGSrfrt0VeT8g0hSIY1o89LykzRiO4eaAn4F3oasWo=", "UzIlvvd1x1gLDVetqepuKmnf41OLd7dANKK2Eb76jRU=", "UQ5747kAyYtnOds5UV/6e/EixUS1czQ9Ot1Vcyycbec=", "nlymWdvdDJVGPl/3x6P5MJFVNZ8Wxn4sNbGwpsp5w9Q=", "UnA7Q/ycZv69nqC078usjoOqN0K1OTS76oA9+Iu0wf4=", "IS7BRxVHxq9gK5ijkANMWvxvAoFlqBHq9KAs0Gy7u/8=", "SBGYBxDW1vPrRfLVzkfAmHztV8hjryENrdOwzfl6ZyE=", "VBzotYQmLUVA5ePORWBybjfF8sU+JIUW7rZp/8qaNu0=", "fekca6POtULZgxL4E227LPRKxnnaSJ3Uh9jKswvvyus=", "aBdy9Mluw4miV25uIiM8ZDgXQ/Pm23TTNnKRoEbAiY4=", "Y+QmLOVFahp7HO4KPdNyWDRkNIAKEmTb7WzFzoAi58s=", "C1iNsNunwIhtOOJvTDxee6pgbCkOjryTGo1g+5SLxEs=", "2khvWt9d+ZdJVlsE9c5CUGSWz42nP08VUkB5e4aYzxI=", "e3OaWwzL1tEWYXiUzGpH+1v9CiFPwweyfRzIh3Z+uO4=", "b+938HIdfjdD/+LgIs3AVRE3Wc65/1NSSAL4OJ5FUXE=", "kQz/4ND7LdhfAQn+idNsO+ZFC32sfkYRlhjWF5W+sPc=", "zGfeoWKmrZlXMOvyi3R2GDbGpmI1skJW/wLTXCCgF0o=", "1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=", "xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="], "checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3488702910\nWx/RrF73ZwUsr4xFkEqWpqRv9XvSQOKqDFVwVOvkPrs=\n\n— rekor.sigstore.dev wNI9ajBGAiEAgqe4CdEgQ8nuqI//HonEnbvw6FT1kBEPLVwEPwVjznACIQCabsJTlitbcXOiSiHy127WIzunnr64TAgBUjYbyW2XBQ==\n"}}, "canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiI4MjBiYmY0MTY1ZmRkMmYwZWY0ZDVmMmM1YTBmZjk4ZjMxZTMyNWM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DxcNMjYxMDMxMDUzNzIzWjAvBgkqhkiG9w0BCQQxIgQgy031zPP97cWTF6mi3FGsDx7WSJ4tZftd6SNUH/q814EwgY4GCyqGSIb3DQEJEAIvMX8wfTB7MHkEIIX5J7wHq2LKw7RDVsEO/IGyxog/2nq55thw2dE6zQW3MFUwPaQ7MDkxFTATBgNVBAoTDHNpZ3N0b3JlLmRldjEgMB4GA1UEAxMXc2lnc3RvcmUtdHNhLXNlbGZzaWduZWQCFDoTVC8MkGHuvMFDL8uKjosqI4sMMAoGCCqGSM49BAMCBGcwZQIxAK7EtBHdPsuQcZUpnTNB46WEUiV54eucbnPbZiO/5huuTdUUHqYwWmei8yz3/++E3wIwAq419SFMJ93JCPuGlSw6F8guikVDMW9idHkb8AOcdw+rVUkbfaz5fFKsiIyuGnZJ"}]}}, "messageSignature":{"messageDigest":{"algorithm":"SHA2_256", "digest":"ggu/QWX90vDvTV8sWg/5jzHjJckSQxRxf07qci7wIQQ="}, "signature":"MEUCIQDqBKdb0SUbfF1KxaUgbLszVrnEp7VH1AhBhabfZCTEAwIgTRbKokFPjcnXnoXzGzVDhCYYgQ7fdh9U1Xarymq53p0="}}
|
|
|
|
| 1 |
+
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUAO9snsFNV8Jr2AnhkB1IDiOBgUUwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMTIxMDIwODM0WhcNMjYxMTIxMDIxODM0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDyti1kgfmj6pqED9rQHMeUyh1wXf98IYYSXwHwrnKrfAPBi9+VyEO6g5gSv6QIahYv+QrKv3URPVFeLZ7m2mXaOCBdEwggXNMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcD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W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1795226914","inclusionPromise":{"signedEntryTimestamp":"MEYCIQCXv+B/gmXlZB6LvDq3IuGM7skC+JF+FAJ6Mf88pF38NAIhAL5VnD98qzkid+q4eaWrGkg1LOrCR4kqFCgn1ntXz2z/"},"inclusionProof":{"logIndex":"3908994906","rootHash":"2isjzZGWaNcfrkbt9ATUoOFbILGX/uZgWgebMZhrdTQ=","treeSize":"3908994917","hashes":["UuftQks0DuUM1eDRCI/AXPZZ19g02mbhuluEaUaTDpw=","ZZgjq3vWpeilSW7iV7DFX3hMjgKZ7fRXhWCsBQUYJMw=","UXqud9QBYHdAIfBOd2RYNk5tcYXv1B0v7ExFhb2lkeU=","iiEpSrwacFOCV0YLxVO3oNxAa6H6cEaI1QFZurnBhHc=","6JmvzNf1pAHE4Vk+TvPNcb6kYTmds7Uc8cR0WXCUkK8=","pgXijBpJu87+iN7XGek/iTgoX0Rt5oxcXKcCHu3ExDk=","Sn+AYb1YmK/F8ECgo2559k4WGjzjfUn4ZJ5Uez+H9QM=","5oRByY8/02bxJIs1anwiqAupB2RQIY7TrW971Nmpp7U=","2Rt71WgMyU/zi7k9KFRPq73TsDJ1BAA/gysPhaaqHs0=","TnYSkn6gCmC0W5Q70zE/If/0imIiTSMfjYHSNR2/gjM=","CivKB4qQwJ/efmzlbMOtHzFomKxmPl8DgmrU1gXfJbc=","7QhOatgVp6PdYroLLtoCkd+z7p++GJEi0PhNT4miazY=","DR/+o4PSouaxmcHOoT8SiQ/FTcN40w8KhvkWSePwUJ8=","TPnMFjEJWAQvABxd6vVJvcXxcAgWGkz86YdUNbzNnFk=","0FJURNcUGshJHgD9JEae8FQR1/wcJoN4WGg13j5k0IA=","YeXlZ0RHqFK6gqq4hsyYMgKKSx51NRc7HQ7jbKFb4ys=","MgeocvNqIwqgvy0zDQHTAPpPoJl126Y9z+ySQHgYrk0=","bpivoC31PB5djfiSn6cC5GXF2dPZ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nNH7atXLLpRzxhunbJsjDXdyQfhtxECMQDmo7wXI6SZim+Db/tk2qI/FHOfm+ooehVwgiq2kqrqXtO86rMDHFyU3tXBMbx775cxggHbMIIB1wIBATBRMDkxFTATBgNVBAoTDHNpZ3N0b3JlLmRldjEgMB4GA1UEAxMXc2lnc3RvcmUtdHNhLXNlbGZzaWduZWQCFDoTVC8MkGHuvMFDL8uKjosqI4sMMAsGCWCGSAFlAwQCAaCB/DAaBgkqhkiG9w0BCQMxDQYLKoZIhvcNAQkQAQQwHAYJKoZIhvcNAQkFMQ8XDTI2MTEyMTAyMDgzNFowLwYJKoZIhvcNAQkEMSIEIE6E37HD3mQW5ZwIQ6RA8lsP3Kzc1TWmgDsZCX5+AebrMIGOBgsqhkiG9w0BCRACLzF/MH0wezB5BCCF+Se8B6tiysO0Q1bBDvyBssaIP9p6uebYcNnROs0FtzBVMD2kOzA5MRUwEwYDVQQKEwxzaWdzdG9yZS5kZXYxIDAeBgNVBAMTF3NpZ3N0b3JlLXRzYS1zZWxmc2lnbmVkAhQ6E1QvDJBh7rzBQy/Lio6LKiOLDDAKBggqhkjOPQQDAgRnMGUCMQCLvEgTzS1qvnxADOUEAtsRRhxgJZRBnO53XN2hnTn/0XmkC1yehUgVyBfshDSgYw8CMArWKH7ROeFRRy1jOOVM2l+LHVIwGLXpSlx8cGoJUk3nvJUHly4xAeqPE/JYF2Nsaw=="}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"Pc6VYYWK5H3qKJdBskELkb0J4P2RowXZ/+fcIi1nFnk="},"signature":"MEQCIEHRNL6mmlNye7ZRqL+qAMYLI1y6MT5wnE0rHtIKxadoAiA4cdWYFG/HS/X3o3q25Pqz0aUKi34OWCexmmGaC+fbWQ=="}}
|
build/torch211-cu126-x86_64-linux/symbols.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
-
"module": "
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
-
"module": "
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
-
"module": "
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
@@ -34,7 +34,7 @@
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
-
"module": "
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
-
"module": "
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
@@ -63,7 +63,7 @@
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
-
"module": "
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
@@ -81,18 +81,18 @@
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
-
"module": "
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
-
"return_annotation": "
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
-
"module": "
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
@@ -103,7 +103,7 @@
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
-
"module": "
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
@@ -114,7 +114,7 @@
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
-
"module": "
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
@@ -125,7 +125,7 @@
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
-
"module": "
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
@@ -136,7 +136,7 @@
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
-
"module": "
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
@@ -147,7 +147,7 @@
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
-
"module": "
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
-
"module": "
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
@@ -189,7 +189,7 @@
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
-
"module": "
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
@@ -200,7 +200,7 @@
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
-
"module": "
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
@@ -211,7 +211,7 @@
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
-
"module": "
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
@@ -241,7 +241,7 @@
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
-
"module": "
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
@@ -271,7 +271,7 @@
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
-
"module": "
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
@@ -301,7 +301,7 @@
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
-
"module": "
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
@@ -331,7 +331,7 @@
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
-
"module": "
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
@@ -355,13 +355,13 @@
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
-
"return_annotation": "List[Tuple[Tuple[int, int],
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
-
"module": "
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
@@ -391,7 +391,7 @@
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
-
"module": "
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
@@ -415,13 +415,13 @@
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
-
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]],
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
-
"module": "
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
@@ -451,7 +451,7 @@
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
-
"module": "
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
@@ -481,7 +481,7 @@
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
-
"module": "
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
@@ -511,7 +511,7 @@
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
-
"module": "
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
@@ -541,7 +541,7 @@
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
-
"module": "
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
@@ -571,7 +571,7 @@
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
-
"module": "
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
@@ -607,7 +607,7 @@
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
-
"module": "
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
@@ -643,7 +643,7 @@
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
-
"module": "
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
@@ -766,7 +766,7 @@
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
-
"annotation": "str |
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
@@ -787,7 +787,7 @@
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
-
"module": "
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
@@ -910,7 +910,7 @@
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
-
"annotation": "str |
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
@@ -931,7 +931,7 @@
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
-
"module": "
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
@@ -1054,7 +1054,7 @@
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
-
"annotation": "str |
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
@@ -1075,7 +1075,7 @@
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
-
"module": "
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
@@ -1198,7 +1198,7 @@
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
-
"annotation": "str |
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
@@ -1219,7 +1219,7 @@
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
-
"module": "
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
+
"module": "_natten_cuda_31270f5",
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
+
"module": "_natten_cuda_31270f5.context",
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
+
"module": "_natten_cuda_31270f5.context",
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
+
"module": "_natten_cuda_31270f5.context",
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
+
"module": "_natten_cuda_31270f5.context",
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
+
"module": "_natten_cuda_31270f5.context",
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
+
"module": "_natten_cuda_31270f5.context",
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
+
"return_annotation": "_natten_cuda_31270f5.context.MemoryUsagePreference"
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
+
"module": "_natten_cuda_31270f5.context",
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
+
"module": "_natten_cuda_31270f5.context",
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
+
"module": "_natten_cuda_31270f5.context",
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
+
"module": "_natten_cuda_31270f5.context",
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
+
"module": "_natten_cuda_31270f5.context",
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
+
"module": "_natten_cuda_31270f5.context",
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
+
"module": "_natten_cuda_31270f5.context",
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
+
"module": "_natten_cuda_31270f5.context",
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
+
"module": "_natten_cuda_31270f5.context",
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
+
"return_annotation": "List[Tuple[Tuple[int, int], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
+
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
+
"module": "_natten_cuda_31270f5.attn_merge",
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
build/torch211-cu128-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 336844600
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad6d69880657f18c89c9bc932ed2072f0ad4babe320873a75c2593eee0346356
|
| 3 |
size 336844600
|
build/torch211-cu128-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _natten_cuda_31270f5
|
| 3 |
+
ops = torch.ops._natten_cuda_31270f5
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_natten_cuda_31270f5::{op_name}"
|
build/torch211-cu128-x86_64-linux/metadata.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
|
|
|
| 5 |
"kernels-minver": "0.14.0",
|
| 6 |
"license": "MIT",
|
| 7 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
@@ -25,8 +26,8 @@
|
|
| 25 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 26 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 27 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 28 |
-
"
|
| 29 |
-
"_ops.py": "
|
| 30 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 31 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 32 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
@@ -55,7 +56,7 @@
|
|
| 55 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 56 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 57 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 58 |
-
"symbols.json": "
|
| 59 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 60 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 61 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
@@ -75,12 +76,12 @@
|
|
| 75 |
},
|
| 76 |
"provenance": {
|
| 77 |
"kernel-builder": {
|
| 78 |
-
"version": "0.
|
| 79 |
-
"commit": "
|
| 80 |
"dirty": false
|
| 81 |
},
|
| 82 |
"kernel": {
|
| 83 |
-
"commit": "
|
| 84 |
"dirty": false
|
| 85 |
}
|
| 86 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
+
"id": "_natten_cuda_31270f5",
|
| 4 |
"version": 1,
|
| 5 |
+
"build-layout": "files",
|
| 6 |
"kernels-minver": "0.14.0",
|
| 7 |
"license": "MIT",
|
| 8 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
|
|
| 26 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 27 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 28 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 29 |
+
"_natten_cuda_31270f5.abi3.so": "rW1piAZX8YyJybyTLtIHLwrUur4yCHOnXCWT7uA0Y1Y=",
|
| 30 |
+
"_ops.py": "vzk3ldaPIUjmPzynSJNT3eXescYWsbmxBENeACy8WcA=",
|
| 31 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 32 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 33 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
|
|
| 56 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 57 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 58 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 59 |
+
"symbols.json": "UrDOuMsK8IE+RnVWVt4KeQR2kJ9QH15RD6+gjxAO9Ug=",
|
| 60 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 61 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 62 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
|
|
| 76 |
},
|
| 77 |
"provenance": {
|
| 78 |
"kernel-builder": {
|
| 79 |
+
"version": "0.19.0-dev1",
|
| 80 |
+
"commit": "b0bf5a2418da965879146c93b453166fe6df42fe",
|
| 81 |
"dirty": false
|
| 82 |
},
|
| 83 |
"kernel": {
|
| 84 |
+
"commit": "31270f5004b648862db9e8e0e97ce020324b0478",
|
| 85 |
"dirty": false
|
| 86 |
}
|
| 87 |
}
|
build/torch211-cu128-x86_64-linux/metadata.json.sigstore
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial":{"certificate":{"rawBytes":"MIIHKzCCBrKgAwIBAgIUbt6Xn8XTUDYrYHwI/iofrrEaDmswCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMDMxMDUzNzE0WhcNMjYxMDMxMDU0NzE0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEbovLoY+VMMnYXI4apdZLOvaf9spcD1CYJAL+zYATN1CLe2PtlcGaRa+6xZ08ldfV+6HswEuzODUczwfhmfKKRaOCBdEwggXNMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21tdW5pdHkvLmdpdGh1Yi93b3JrZmxvd3MvYnVpbGQueWFtbEByZWZzL2hlYWRzL21haW4wOQYKKwYBBAGDvzABAQQraHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1Yn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sb3dzL2J1aWxkLnlhbWxAcmVmcy9oZWFkcy9tYWluMDgGCisGAQQBg78wARMEKgwoNWZlOWRiYjNkNDVmNmYyNjUyOTU4YzFmNzBlNTM4MTg5MWZhN2FhMDAhBgorBgEEAYO/MAEUBBMMEXdvcmtmbG93X2Rpc3BhdGNoMGQGCisGAQQBg78wARUEVgxUaHR0cHM6Ly9naXRodWIuY29tL2h1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5L2FjdGlvbnMvcnVucy80MTA4MzU5MjA4MS9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGhkHZMegAABAMARzBFAiAqdDIJ7lLikYcGpZuzjrxhm+7IPFlrbfHofk5YqwIfQgIhAOj4R3wnfSCaIS5Hxl89FY2U00hJcpgWQJi26p3GW5kMMAoGCCqGSM49BAMDA2cAMGQCMCvr/Ls97OwoAf9wT+HRSJviFuhpjH1/8j/cPXhsGvmtjIK58ybaExyBOQB3AdlfFwIwdDJaAyZ6fZAj15qFWgJqb9k/bg+tuV7zsmMPzLI21UDDlItMnoR49/EKNoa57r1U"}, "tlogEntries":[{"logIndex":"3610606911", "logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion":{"kind":"hashedrekord", "version":"0.0.1"}, "integratedTime":"1793425034", "inclusionPromise":{"signedEntryTimestamp":"MEQCIAon/OUKKt3E/uLrAdVXnPpfGlritzOWPsr1vWOiHEAvAiBoKUWCrur1NtRY+zuefyzd4MzBouLAuYxiV4XctgHHIA=="}, "inclusionProof":{"logIndex":"3488702649", "rootHash":"+b1ULonT2uFFkMpx37OIVApOhaQAZnIaCNJqX7Z7hWI=", "treeSize":"3488702657", "hashes":["IVNqaXY7IRj9TsSgvRJy2XEW9VcRVIDi3TDnkkK+1JU=", "MS5gKLgnj329X+UELCaivXu111J1XjqA5Iu0RkUgAnw=", "3mAM3BADo7FBka88S/y03Naayeu89QoRWJsd2g/YVjM=", "b/EKBZY7HqgTqLkvN4nzE5XQGCtCkjm4+k6lbMEcnWs=", "7TJ211YflfjIN59sYBQTvkAD9TUgELPPMSnalca6KHM=", "qISwUz5LpTzUHNpsrcbuvQN4wd2n3kXtAm47e64etLI=", "MenakJec/BBRRDTR/IVXr4vA5UDkAt8zr3T1Zu+Xpcc=", "6wRwEMHvy8TyI/PD4+bxG+dKULtzFoEJea2HJYgpyJ0=", "SBGYBxDW1vPrRfLVzkfAmHztV8hjryENrdOwzfl6ZyE=", "VBzotYQmLUVA5ePORWBybjfF8sU+JIUW7rZp/8qaNu0=", "fekca6POtULZgxL4E227LPRKxnnaSJ3Uh9jKswvvyus=", "aBdy9Mluw4miV25uIiM8ZDgXQ/Pm23TTNnKRoEbAiY4=", "Y+QmLOVFahp7HO4KPdNyWDRkNIAKEmTb7WzFzoAi58s=", "C1iNsNunwIhtOOJvTDxee6pgbCkOjryTGo1g+5SLxEs=", "2khvWt9d+ZdJVlsE9c5CUGSWz42nP08VUkB5e4aYzxI=", "e3OaWwzL1tEWYXiUzGpH+1v9CiFPwweyfRzIh3Z+uO4=", "b+938HIdfjdD/+LgIs3AVRE3Wc65/1NSSAL4OJ5FUXE=", "kQz/4ND7LdhfAQn+idNsO+ZFC32sfkYRlhjWF5W+sPc=", "zGfeoWKmrZlXMOvyi3R2GDbGpmI1skJW/wLTXCCgF0o=", "1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=", "xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="], "checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3488702657\n+b1ULonT2uFFkMpx37OIVApOhaQAZnIaC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OYsIzmSDQ0CFGMSa6aRgEZCYWTVDsmTRFdO80WNGA8yMDI2MTAzMTA1MzcxNFowAwIBAaAypDAwLjEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MRUwEwYDVQQDEwxzaWdzdG9yZS10c2GgADGCAdswggHXAgEBMFEwOTEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MSAwHgYDVQQDExdzaWdzdG9yZS10c2Etc2VsZnNpZ25lZAIUOhNULwyQYe68wUMvy4qOiyojiwwwCwYJYIZIAWUDBAIBoIH8MBoGCSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAcBgkqhkiG9w0BCQUxDxcNMjYxMDMxMDUzNzE0WjAvBgkqhkiG9w0BCQQxIgQguJRjVQLItZoxvb2LeCXiHclRdzssagUHp6thqgapnrkwgY4GCyqGSIb3DQEJEAIvMX8wfTB7MHkEIIX5J7wHq2LKw7RDVsEO/IGyxog/2nq55thw2dE6zQW3MFUwPaQ7MDkxFTATBgNVBAoTDHNpZ3N0b3JlLmRldjEgMB4GA1UEAxMXc2lnc3RvcmUtdHNhLXNlbGZzaWduZWQCFDoTVC8MkGHuvMFDL8uKjosqI4sMMAoGCCqGSM49BAMCBGcwZQIxALyL/QAZC+rGrg2LI48d4KFOElUoURBMygS7I84g0I0Vt5dlUrPYSi7Xc+kGplSergIwJpa2TJuS3vVJLgGrs3Tf3hbM69U5t+LGHsKhlHe/kB5gv3M4VHDKayGgUx8YPg6/"}]}}, "messageSignature":{"messageDigest":{"algorithm":"SHA2_256", "digest":"D/fkteujfAoZzTp4ebhroQqT+swEkHa4qN1wWYjrB9k="}, "signature":"MEUCIQDbtr+r8W8QQgJDghWNFJ+hxB4f+dQqf98h9x+iTutUJgIgSKwLtJMujuxUW3eZhsjBIIAMqd2DoDv84wp8TyGKBtU="}}
|
|
|
|
| 1 |
+
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUAO9snsF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3/h4pygC8p7o4AAAGh+9zNmAAABAMARzBFAiALafYysgxpYHaHO1om9E3yZXaNskAlBfanqXDhHXmt8AIhANG8xPoBD2fH8Xn6FVkTuEgjVaCSChsTvccnYxCnFRcgMAoGCCqGSM49BAMDA2gAMGUCMCe6/u3k6o7QIg7bFGi+j1xaWKkwJfzEh1fKm1otY68l7MD08/+9Yd9s0uK3RiTApAIxAOpCR2uW6HprkEK/Ye57yMOj0h155mpUeQfcKHn7OY27xGf2DdkGNpMnLP0UPZQCXQ=="},"tlogEntries":[{"logIndex":"4030899184","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1795226914","inclusionPromise":{"signedEntryTimestamp":"MEYCIQCiriEGTmiERTihNNF1fWG9wrrTYlzGXn63qz+VB6nEhQIhAJPoD/uz+gx/jnQ4IFcO/cu4CyYt7ZAKjOowcmd0utAS"},"inclusionProof":{"logIndex":"3908994922","rootHash":"ZARv8ss9UZdx9hjtsnCqtc8PvmM/QfLKOEDCuRd5dms=","treeSize":"3908994927","hashes":["0P2tOsy2dPc4tuFe3LbdqRwUiFxRlMcHo0r3QaYq1fY=","hrMemTINhtCK57gV3mfonXnizjyRM2PZl0fm6IT+yII=","TNOSokTDZyy9sx/r1tTVCfPFY3mYT7YBq2SggnB9m4M=","K6DTiyC9gH8DJh6KcH0nOUa9OsuHbQomVzbYVYdwedU=","DxKkaRTS1ffWfcGr0PcKCdbUxpJcP7HRYnoWeDReqmw=","Sn+AYb1YmK/F8ECgo2559k4WGjzjfUn4ZJ5Uez+H9QM=","5oRByY8/02bxJIs1anwiqAupB2RQIY7TrW971Nmpp7U=","2Rt71WgMyU/zi7k9KFRPq73TsDJ1BAA/gysPhaaqHs0=","TnYSkn6gCmC0W5Q70zE/If/0imIiTSMfjYHSNR2/gjM=","CivKB4qQwJ/efmzlbMOtHzFomKxmPl8DgmrU1gXfJbc=","7QhOatgVp6PdYroLLtoCkd+z7p++GJEi0PhNT4miazY=","DR/+o4PSouaxmcHOoT8SiQ/FTcN40w8KhvkWSePwUJ8=","TPnMFjEJWAQvABxd6vVJvcXxcAgWGkz86YdUNbzNnFk=","0FJURNcUGshJHgD9JEae8FQR1/wcJoN4WGg13j5k0IA=","YeXlZ0RHqFK6gqq4hsyYMgKKSx51NRc7HQ7jbKFb4ys=","MgeocvNqIwqgvy0zDQHTAPpPoJl126Y9z+ySQHgYrk0=","bpivoC31PB5djfiSn6cC5GXF2dPZuOJdVxDafoiGndU=","XYkf+Vk9hVBebwq5KRpgAFIE2Jk4aAgO1jFr22tSd4k=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3908994927\nZARv8ss9UZdx9hjtsnCqtc8PvmM/QfLKOEDCuRd5dms=\n\n— rekor.sigstore.dev wNI9ajBFAiARxUzMFa4rV7WkncEATTXG3Iz4dvc0AD69mQCpdHBaCgIhANjeMIW9n3KSEYZD49KHHRMyFIaRmYmxNMflSaPtzTao\n"}},"canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiI4MDk3ZTdlNThiMzcyNGViOWE3ZDE1YmVhZTViZTg3MDBkOWE1NDgyNzk2NGFkNDYwYzNiMDJhMzk0NDcwZDI3In19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FVUNJUURtZzdZd3hrNG0xN1M0anBMMzdlVDdxZExBOTNneXJCRzZqT0R5NzFvc2pnSWdGSmU3ZXZGQ293MmlHemhyWitFSU44d2pYR2ZRdmJ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_256","digest":"gJfn5Ys3JOuafRW+rlvocA2aVIJ5ZK1GDDsCo5RHDSc="},"signature":"MEUCIQDmg7Ywxk4m17S4jpL37eT7qdLA93gyrBG6jODy71osjgIgFJe7evFCow2iGzhrZ+EIN8wjXGfQvbEzB2FRrp02PYw="}}
|
build/torch211-cu128-x86_64-linux/symbols.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
-
"module": "
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
-
"module": "
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
-
"module": "
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
@@ -34,7 +34,7 @@
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
-
"module": "
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
-
"module": "
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
@@ -63,7 +63,7 @@
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
-
"module": "
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
@@ -81,18 +81,18 @@
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
-
"module": "
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
-
"return_annotation": "
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
-
"module": "
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
@@ -103,7 +103,7 @@
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
-
"module": "
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
@@ -114,7 +114,7 @@
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
-
"module": "
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
@@ -125,7 +125,7 @@
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
-
"module": "
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
@@ -136,7 +136,7 @@
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
-
"module": "
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
@@ -147,7 +147,7 @@
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
-
"module": "
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
-
"module": "
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
@@ -189,7 +189,7 @@
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
-
"module": "
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
@@ -200,7 +200,7 @@
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
-
"module": "
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
@@ -211,7 +211,7 @@
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
-
"module": "
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
@@ -241,7 +241,7 @@
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
-
"module": "
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
@@ -271,7 +271,7 @@
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
-
"module": "
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
@@ -301,7 +301,7 @@
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
-
"module": "
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
@@ -331,7 +331,7 @@
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
-
"module": "
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
@@ -355,13 +355,13 @@
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
-
"return_annotation": "List[Tuple[Tuple[int, int],
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
-
"module": "
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
@@ -391,7 +391,7 @@
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
-
"module": "
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
@@ -415,13 +415,13 @@
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
-
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]],
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
-
"module": "
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
@@ -451,7 +451,7 @@
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
-
"module": "
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
@@ -481,7 +481,7 @@
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
-
"module": "
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
@@ -511,7 +511,7 @@
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
-
"module": "
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
@@ -541,7 +541,7 @@
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
-
"module": "
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
@@ -571,7 +571,7 @@
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
-
"module": "
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
@@ -607,7 +607,7 @@
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
-
"module": "
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
@@ -643,7 +643,7 @@
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
-
"module": "
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
@@ -766,7 +766,7 @@
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
-
"annotation": "str |
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
@@ -787,7 +787,7 @@
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
-
"module": "
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
@@ -910,7 +910,7 @@
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
-
"annotation": "str |
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
@@ -931,7 +931,7 @@
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
-
"module": "
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
@@ -1054,7 +1054,7 @@
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
-
"annotation": "str |
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
@@ -1075,7 +1075,7 @@
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
-
"module": "
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
@@ -1198,7 +1198,7 @@
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
-
"annotation": "str |
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
@@ -1219,7 +1219,7 @@
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
-
"module": "
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
+
"module": "_natten_cuda_31270f5",
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
+
"module": "_natten_cuda_31270f5.context",
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
+
"module": "_natten_cuda_31270f5.context",
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
+
"module": "_natten_cuda_31270f5.context",
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
+
"module": "_natten_cuda_31270f5.context",
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
+
"module": "_natten_cuda_31270f5.context",
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
+
"module": "_natten_cuda_31270f5.context",
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
+
"return_annotation": "_natten_cuda_31270f5.context.MemoryUsagePreference"
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
+
"module": "_natten_cuda_31270f5.context",
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
+
"module": "_natten_cuda_31270f5.context",
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
+
"module": "_natten_cuda_31270f5.context",
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
+
"module": "_natten_cuda_31270f5.context",
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
+
"module": "_natten_cuda_31270f5.context",
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
+
"module": "_natten_cuda_31270f5.context",
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
+
"module": "_natten_cuda_31270f5.context",
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
+
"module": "_natten_cuda_31270f5.context",
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
+
"module": "_natten_cuda_31270f5.context",
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
+
"return_annotation": "List[Tuple[Tuple[int, int], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
+
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
+
"module": "_natten_cuda_31270f5.attn_merge",
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
build/torch211-cu130-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 164385840
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c67549fe53fdc37b46e6aee9602518177d2113f1004969b41786c4304c92a170
|
| 3 |
size 164385840
|
build/torch211-cu130-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _natten_cuda_31270f5
|
| 3 |
+
ops = torch.ops._natten_cuda_31270f5
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_natten_cuda_31270f5::{op_name}"
|
build/torch211-cu130-x86_64-linux/metadata.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
|
|
|
| 5 |
"kernels-minver": "0.14.0",
|
| 6 |
"license": "MIT",
|
| 7 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
@@ -25,8 +26,8 @@
|
|
| 25 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 26 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 27 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 28 |
-
"
|
| 29 |
-
"_ops.py": "
|
| 30 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 31 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 32 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
@@ -55,7 +56,7 @@
|
|
| 55 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 56 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 57 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 58 |
-
"symbols.json": "
|
| 59 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 60 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 61 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
@@ -75,12 +76,12 @@
|
|
| 75 |
},
|
| 76 |
"provenance": {
|
| 77 |
"kernel-builder": {
|
| 78 |
-
"version": "0.
|
| 79 |
-
"commit": "
|
| 80 |
"dirty": false
|
| 81 |
},
|
| 82 |
"kernel": {
|
| 83 |
-
"commit": "
|
| 84 |
"dirty": false
|
| 85 |
}
|
| 86 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
+
"id": "_natten_cuda_31270f5",
|
| 4 |
"version": 1,
|
| 5 |
+
"build-layout": "files",
|
| 6 |
"kernels-minver": "0.14.0",
|
| 7 |
"license": "MIT",
|
| 8 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
|
|
| 26 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 27 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 28 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 29 |
+
"_natten_cuda_31270f5.abi3.so": "xnVJ/lP9w3tG5q7pYCUYF30hE/EASWm0F4bEMEySoXA=",
|
| 30 |
+
"_ops.py": "vzk3ldaPIUjmPzynSJNT3eXescYWsbmxBENeACy8WcA=",
|
| 31 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 32 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 33 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
|
|
| 56 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 57 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 58 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 59 |
+
"symbols.json": "UrDOuMsK8IE+RnVWVt4KeQR2kJ9QH15RD6+gjxAO9Ug=",
|
| 60 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 61 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 62 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
|
|
| 76 |
},
|
| 77 |
"provenance": {
|
| 78 |
"kernel-builder": {
|
| 79 |
+
"version": "0.19.0-dev1",
|
| 80 |
+
"commit": "b0bf5a2418da965879146c93b453166fe6df42fe",
|
| 81 |
"dirty": false
|
| 82 |
},
|
| 83 |
"kernel": {
|
| 84 |
+
"commit": "31270f5004b648862db9e8e0e97ce020324b0478",
|
| 85 |
"dirty": false
|
| 86 |
}
|
| 87 |
}
|
build/torch211-cu130-x86_64-linux/metadata.json.sigstore
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial":{"certificate":{"rawBytes":"MIIHLTCCBrKgAwIBAgIUSuvvAMZh4G/rS1AQdaVphsVY51UwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMDMxMDUzNzE4WhcNMjYxMDMxMDU0NzE4WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAELNZRAbc3LfyblOwqmKRzbvyzKM1xh6GRS2rum/ULVpWHs64QqWtqxCa/zkWKYagWvabJfHVDmTUgEpWazpnffqOCBdEwggXNMA4GA1UdDwEB/wQEA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Id":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion":{"kind":"hashedrekord", "version":"0.0.1"}, "integratedTime":"1793425038", "inclusionPromise":{"signedEntryTimestamp":"MEUCIQCy0qhpboO51+wLEn2Gadps8KkOcgnxP4f8cFpqGmbzKgIgSH05QXhV716ggZSM3F34yaMaMvs0Y768t30Vmq0eMnw="}, "inclusionProof":{"logIndex":"3488702773", "rootHash":"72t801a3cM32xIEBB5MQYKBKmXs/+SxglXV/WDpRIgk=", "treeSize":"3488702777", "hashes":["CPNf0uPeHR/2Y0IybMLxyZGHtdHZcln1MggL61IHoTY=", "K3B4HVcMKwLtzosQVOxqbo1AJxsb90BOhASozlSYxBQ=", "I7ylLMwt/26aRML3g/dzjStA666DAH4p8qie6iKKSps=", "K1hBzwL5kBIA/ZBp2dAPWW0fXVUD9eMoloNE4OjVN7s=", "rec01pHJLmf8051dA0fJ3Fq5DYjsQEIJvZh7cY1FRBI=", "okzSXbrUwCDyH90OQq8OoFF0cFmk/6TZMNs24hRR68c=", "IS7BRxVHxq9gK5ijkANMWvxvAoFlqBHq9KAs0Gy7u/8=", "SBGYBxDW1vPrRfLVzkfAmHztV8hjryENrdOwzfl6ZyE=", "VBzotYQmLUVA5ePORWBybjfF8sU+JIUW7rZp/8qaNu0=", "fekca6POtULZgxL4E227LPRKxnnaSJ3Uh9jKswvvyus=", "aBdy9Mluw4miV25uIiM8ZDgXQ/Pm23TTNnKRoEbAiY4=", "Y+QmLOVFahp7HO4KPdNyWDRkNIAKEmTb7WzFzoAi58s=", "C1iNsNunwIhtOOJvTDxee6pgbCkOjryTGo1g+5SLxEs=", "2khvWt9d+ZdJVlsE9c5CUGSWz42nP08VUkB5e4aYzxI=", "e3OaWwzL1tEWYXiUzGpH+1v9CiFPwweyfRzIh3Z+uO4=", "b+938HIdfjdD/+LgIs3AVRE3Wc65/1NSSAL4OJ5FUXE=", "kQz/4ND7LdhfAQn+idNsO+ZFC32sf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wVlNWRWxHU1VOQlZFVXRMUzB0TFFvPSJ9fX19"}], "timestampVerificationData":{"rfc3161Timestamps":[{"signedTimestamp":"MIICyDADAgEAMIICvwYJKoZIhvcNAQcCoIICsDCCAqwCAQMxDTALBglghkgBZQMEAgEwgbcGCyqGSIb3DQEJEAEEoIGnBIGkMIGhAgEBBgkrBgEEAYO/MAIwMTANBglghkgBZQMEAgEFAAQgP5bCze/U/Wq23Bc2sG/YZoy6lidsRztvZJJMhb0B0fYCFHu3ZKP7VlXGUp0ZgiaIv29kBDmiGA8yMDI2MTAzMTA1MzcxOFowAwIBAaAypDAwLjEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MRUwEwYDVQQDEwxzaWdzdG9yZS10c2GgADGCAdowggHWAgEBMFEwOTEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MSAwHgYDVQQDExdzaWdzdG9yZS10c2Etc2VsZnNpZ25lZAIUOhNULwyQYe68wUMvy4qOiyojiwwwCwYJYIZIAWUDBAIBoIH8MBoGCSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAcBgkqhkiG9w0BCQUxDxcNMjYxMDMxMDUzNzE4WjAvBgkqhkiG9w0BCQQxIgQgyVjmWTqZUnEk92dZXETJHKXNdzrqyA8GCCUGGjZJF0wwgY4GCyqGSIb3DQEJEAIvMX8wfTB7MHkEIIX5J7wHq2LKw7RDVsEO/IGyxog/2nq55thw2dE6zQW3MFUwPaQ7MDkxFTATBgNVBAoTDHNpZ3N0b3JlLmRldjEgMB4GA1UEAxMXc2lnc3RvcmUtdHNhLXNlbGZzaWduZWQCFDoTVC8MkGHuvMFDL8uKjosqI4sMMAoGCCqGSM49BAMCBGYwZAIwMGzhDOAa979g3ullLfiaoduNhorT0APncRpPjHUCzkU2X2LgoyHiaNVpJ0XhnG7wAjAj1TmulZkg7FDidGUiMcui4QK4efepqYlnMvA4ZPO3d9Oc3QW76g/iucpXmw5w3Ho="}]}}, "messageSignature":{"messageDigest":{"algorithm":"SHA2_256", "digest":"EzP392KGKmAOckNsehZBn4/i4mtOTl3GhTBFUNnE9rQ="}, "signature":"MEYCIQDBZCXU9v5SndS5qNsIYsuHCPl9cpiog6b8lf69zVsuEQIhAOP0HxUSxf14rTT10QTj2CNX7foENp/PWe++0wZ89Uce"}}
|
|
|
|
| 1 |
+
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUAO9snsFNV8Jr2AnhkB1IDiOBgUUwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMTIxMDIwODM0WhcNMjYxMTIxMDIxODM0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDyti1kgfmj6pqED9rQHMeUyh1wXf98IYYSXwHwrnKrfAPBi9+VyEO6g5gSv6QIahYv+QrKv3URPVFeLZ7m2mXaOCBdEwggXNMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21tdW5pdHkvLmdpdGh1Yi93b3JrZmxvd3MvYnVpbGQueWFtbEByZWZzL2hlYWRzL21haW4wOQYKKwYBBAGDvzABAQQraHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbTAfBgorBgEEAYO/MAECBBF3b3JrZmxvd19kaXNwYXRjaDA2BgorBgEEAYO/MAEDBCgzMTI3MGY1MDA0YjY0ODg2MmRiOWU4ZTBlOTdjZTAyMDMyNGIwNDc4MBMGCisGAQQBg78wAQQEBUJ1aWxkMCsGCisGAQQBg78wAQUEHWh1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5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L2tlcm5lbHMtY29tbXVuaXR5L2FjdGlvbnMvcnVucy80NDc2OTQzOTc2My9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGh+9zNmAAABAMARzBFAiALafYysgxpYHaHO1om9E3yZXaNskAlBfanqXDhHXmt8AIhANG8xPoBD2fH8Xn6FVkTuEgjVaCSChsTvccnYxCnFRcgMAoGCCqGSM49BAMDA2gAMGUCMCe6/u3k6o7QIg7bFGi+j1xaWKkwJfzEh1fKm1otY68l7MD08/+9Yd9s0uK3RiTApAIxAOpCR2uW6HprkEK/Ye57yMOj0h155mpUeQfcKHn7OY27xGf2DdkGNpMnLP0UPZQCXQ=="},"tlogEntries":[{"logIndex":"4030899177","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1795226914","inclusionPromise":{"signedEntryTimestamp":"MEUCIQCTCqCoFM8DF6rvvaO26JJLmUhn3tJ692tsx9dt7RRy0AIgDC808U7au1OY9USvxt8bxZS6QAkOJlR/lGKMFPesTxg="},"inclusionProof":{"logIndex":"3908994915","rootHash":"ZARv8ss9UZdx9hjtsnCqtc8PvmM/QfLKOEDCuRd5dms=","treeSize":"3908994927","hashes":["lnon+/YY7+SVpW6mn4HY3JSKyED7KGFDng8mLzFLqLU=","kx+TBHJUGYE5D5t5irYs9PYkicATPlYqf5Gk3KnTCd0=","KdLN7UMhP89WXZ8sTZJ+Gk58TSzxx1zrfSg49/1do2Q=","NvW3TeUrN/SnSHJoWhIycTauPfTLHQp7sj7JzaUT2O4=","DxKkaRTS1ffWfcGr0PcKCdbUxpJcP7HRYnoWeDReqmw=","Sn+AYb1YmK/F8ECgo2559k4WGjzjfUn4ZJ5Uez+H9QM=","5oRByY8/02bxJIs1anwiqAupB2RQIY7TrW971Nmpp7U=","2Rt71WgMyU/zi7k9KFRPq73TsDJ1BAA/gysPhaaqHs0=","TnYSkn6gCmC0W5Q70zE/If/0imIiTSMfjYHSNR2/gjM=","CivKB4qQwJ/efmzlbMOtHzFomKxmPl8DgmrU1gXfJbc=","7QhOatgVp6PdYroLLtoCkd+z7p++GJEi0PhNT4miazY=","DR/+o4PSouaxmcHOoT8SiQ/FTcN40w8KhvkWSePwUJ8=","TPnMFjEJWAQvABxd6vVJvcXxcAgWGkz86YdUNbzNnFk=","0FJURNcUGshJHgD9JEae8FQR1/wcJoN4WGg13j5k0IA=","YeXlZ0RHqFK6gqq4hsyYMgKKSx51NRc7HQ7jbKFb4ys=","MgeocvNqIwqgvy0zDQHTAPpPoJl126Y9z+ySQHgYrk0=","bpivoC31PB5djfiSn6cC5GXF2dPZuOJdVxDafoiGndU=","XYkf+Vk9hVBebwq5KRpgAFIE2Jk4aAgO1jFr22tSd4k=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3908994927\nZARv8ss9UZdx9hjtsnCqtc8PvmM/QfLKOEDCuRd5dms=\n\n— rekor.sigstore.dev wNI9ajBFAiB1ghVhrfx4NO+slQMo8j5xKREeK6K6Jg6bewIR4qi34QIhAMDrDjSV9j60JpO6id+PvOjrxugV+ZErlpJ3U0ggLtzD\n"}},"canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjo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YDVQQDExdzaWdzdG9yZS10c2Etc2VsZnNpZ25lZAIUOhNULwyQYe68wUMvy4qOiyojiwwwCgYIKoZIzj0EAwIEaDBmAjEAxSWo270Qc4szfB/MIGp8ikDjyfkboeZXSFEC6EeuNdSk47ftFM2gLrQBgBopZVfeAjEAm0BQIIOOlUliT2BX7mnTGBa0pH/4YOE5rhZiR6C3j2vpefQsMMyd8KCSNCAVwHfq"}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"BIAbSW/sYBXT6ga3OmUaNFw1aEIUoDk3/RmSLFFgVRY="},"signature":"MEUCIQCnX5x2kWDAMkD6I+K3expTLVdKuRhG2hptly0DeU7cvAIgGYVZrzV5HMMiqIInKTMYG3SP9le4hhUZwcdTkeRvjMk="}}
|
build/torch211-cu130-x86_64-linux/symbols.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
-
"module": "
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
-
"module": "
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
-
"module": "
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
@@ -34,7 +34,7 @@
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
-
"module": "
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
-
"module": "
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
@@ -63,7 +63,7 @@
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
-
"module": "
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
@@ -81,18 +81,18 @@
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
-
"module": "
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
-
"return_annotation": "
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
-
"module": "
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
@@ -103,7 +103,7 @@
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
-
"module": "
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
@@ -114,7 +114,7 @@
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
-
"module": "
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
@@ -125,7 +125,7 @@
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
-
"module": "
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
@@ -136,7 +136,7 @@
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
-
"module": "
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
@@ -147,7 +147,7 @@
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
-
"module": "
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
-
"module": "
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
@@ -189,7 +189,7 @@
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
-
"module": "
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
@@ -200,7 +200,7 @@
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
-
"module": "
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
@@ -211,7 +211,7 @@
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
-
"module": "
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
@@ -241,7 +241,7 @@
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
-
"module": "
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
@@ -271,7 +271,7 @@
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
-
"module": "
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
@@ -301,7 +301,7 @@
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
-
"module": "
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
@@ -331,7 +331,7 @@
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
-
"module": "
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
@@ -355,13 +355,13 @@
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
-
"return_annotation": "List[Tuple[Tuple[int, int],
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
-
"module": "
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
@@ -391,7 +391,7 @@
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
-
"module": "
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
@@ -415,13 +415,13 @@
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
-
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]],
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
-
"module": "
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
@@ -451,7 +451,7 @@
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
-
"module": "
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
@@ -481,7 +481,7 @@
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
-
"module": "
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
@@ -511,7 +511,7 @@
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
-
"module": "
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
@@ -541,7 +541,7 @@
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
-
"module": "
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
@@ -571,7 +571,7 @@
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
-
"module": "
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
@@ -607,7 +607,7 @@
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
-
"module": "
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
@@ -643,7 +643,7 @@
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
-
"module": "
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
@@ -766,7 +766,7 @@
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
-
"annotation": "str |
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
@@ -787,7 +787,7 @@
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
-
"module": "
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
@@ -910,7 +910,7 @@
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
-
"annotation": "str |
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
@@ -931,7 +931,7 @@
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
-
"module": "
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
@@ -1054,7 +1054,7 @@
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
-
"annotation": "str |
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
@@ -1075,7 +1075,7 @@
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
-
"module": "
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
@@ -1198,7 +1198,7 @@
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
-
"annotation": "str |
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
@@ -1219,7 +1219,7 @@
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
-
"module": "
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
+
"module": "_natten_cuda_31270f5",
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
+
"module": "_natten_cuda_31270f5.context",
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
+
"module": "_natten_cuda_31270f5.context",
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
+
"module": "_natten_cuda_31270f5.context",
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
+
"module": "_natten_cuda_31270f5.context",
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
+
"module": "_natten_cuda_31270f5.context",
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
+
"module": "_natten_cuda_31270f5.context",
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
+
"return_annotation": "_natten_cuda_31270f5.context.MemoryUsagePreference"
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
+
"module": "_natten_cuda_31270f5.context",
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
+
"module": "_natten_cuda_31270f5.context",
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
+
"module": "_natten_cuda_31270f5.context",
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
+
"module": "_natten_cuda_31270f5.context",
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
+
"module": "_natten_cuda_31270f5.context",
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
+
"module": "_natten_cuda_31270f5.context",
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
+
"module": "_natten_cuda_31270f5.context",
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
+
"module": "_natten_cuda_31270f5.context",
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
+
"module": "_natten_cuda_31270f5.context",
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
+
"return_annotation": "List[Tuple[Tuple[int, int], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
+
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
+
"module": "_natten_cuda_31270f5.attn_merge",
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
build/torch212-cu126-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 103590384
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2ec18cdfcbf4689ca8d17aa70b78fe2b672c044770031f43e394cc8bb6b762f0
|
| 3 |
size 103590384
|
build/torch212-cu126-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _natten_cuda_31270f5
|
| 3 |
+
ops = torch.ops._natten_cuda_31270f5
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_natten_cuda_31270f5::{op_name}"
|
build/torch212-cu126-x86_64-linux/metadata.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
|
|
|
| 5 |
"kernels-minver": "0.14.0",
|
| 6 |
"license": "MIT",
|
| 7 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
@@ -22,8 +23,8 @@
|
|
| 22 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 23 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 24 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 25 |
-
"
|
| 26 |
-
"_ops.py": "
|
| 27 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 28 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 29 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
@@ -52,7 +53,7 @@
|
|
| 52 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 53 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 54 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 55 |
-
"symbols.json": "
|
| 56 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 57 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 58 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
@@ -72,12 +73,12 @@
|
|
| 72 |
},
|
| 73 |
"provenance": {
|
| 74 |
"kernel-builder": {
|
| 75 |
-
"version": "0.
|
| 76 |
-
"commit": "
|
| 77 |
"dirty": false
|
| 78 |
},
|
| 79 |
"kernel": {
|
| 80 |
-
"commit": "
|
| 81 |
"dirty": false
|
| 82 |
}
|
| 83 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
+
"id": "_natten_cuda_31270f5",
|
| 4 |
"version": 1,
|
| 5 |
+
"build-layout": "files",
|
| 6 |
"kernels-minver": "0.14.0",
|
| 7 |
"license": "MIT",
|
| 8 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
|
|
| 23 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 24 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 25 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 26 |
+
"_natten_cuda_31270f5.abi3.so": "LsGM38v0aJyo0XqnC3j+K2csBEdwAx9D45TMi7a3YvA=",
|
| 27 |
+
"_ops.py": "vzk3ldaPIUjmPzynSJNT3eXescYWsbmxBENeACy8WcA=",
|
| 28 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 29 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 30 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
|
|
| 53 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 54 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 55 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 56 |
+
"symbols.json": "UrDOuMsK8IE+RnVWVt4KeQR2kJ9QH15RD6+gjxAO9Ug=",
|
| 57 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 58 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 59 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
|
|
| 73 |
},
|
| 74 |
"provenance": {
|
| 75 |
"kernel-builder": {
|
| 76 |
+
"version": "0.19.0-dev1",
|
| 77 |
+
"commit": "b0bf5a2418da965879146c93b453166fe6df42fe",
|
| 78 |
"dirty": false
|
| 79 |
},
|
| 80 |
"kernel": {
|
| 81 |
+
"commit": "31270f5004b648862db9e8e0e97ce020324b0478",
|
| 82 |
"dirty": false
|
| 83 |
}
|
| 84 |
}
|
build/torch212-cu126-x86_64-linux/metadata.json.sigstore
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUIFyTkrRUmYThLzXOqw1Cmj/FZdgwCgYIKoZIzj0EAwMwNzE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3AGMNvPDFBjarOEIOaS7/g8qBv2pIfhCMTMzQHy3pwIhAMFrXldnBYbS8TDSAK9lYZyWwuPrjGbEAbALodwygeV2MAoGCCqGSM49BAMDA2gAMGUCMQDg0k/SnJwU9GQlZ7VvTl0mrr0sq+zw3upHEWwwaPzyaS9uFgwnpQT4CWG9NEgtLrYCME4mDtWzCtfzelQUUtz17NVSJkVyys9ve3OOA7StUqKw1NEtcB01Py8v46txf08ZNA=="}, "tlogEntries":[{"logIndex":"3610607155", "logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion":{"kind":"hashedrekord", "version":"0.0.1"}, "integratedTime":"1793425042", "inclusionPromise":{"signedEntryTimestamp":"MEUCIG7ERzNlGlJ8EGG+N25pbw4H6iPI6V36vq03uVFCvWYrAiEAqpaDwM2q8wnA5PJiaxHvE9PuVmr0Hru11k15BLxRFtw="}, "inclusionProof":{"logIndex":"3488702893", "rootHash":"oFCWoCEaqrA/XeK4I92I6bTk0V6SYB72mN2PzJhnSvU=", "treeSize":"3488702894", "hashes":["wZRVDgzqHkrHEHQ/lijGyaMvET5Y/D23L3Qlxa+YKvM=", "HiTVeNJl/V4WlZNAxOMGH9WzBe86ja3yL9g0t66sdAU=", "GTHI3X/ZeFIJR1egxvxWZbAlWvjJhdE9ml75jBVu5Zc=", "nlymWdvdDJVGPl/3x6P5MJFVNZ8Wxn4sNbGwpsp5w9Q=", "UnA7Q/ycZv69nqC078usjoOqN0K1OTS76oA9+Iu0wf4=", "IS7BRxVHxq9gK5ijkANMWvxvAoFlqBHq9KAs0Gy7u/8=", "SBGYBxDW1vPrRfLVzkfAmHztV8hjryENrdOwzfl6ZyE=", "VBzotYQmLUVA5ePORWBybjfF8sU+JIUW7rZp/8qaNu0=", "fekca6POtULZgxL4E227LPRKxnnaSJ3Uh9jKswvvyus=", "aBdy9Mluw4miV25uIiM8ZDgXQ/Pm23TTNnKRoEbAiY4=", "Y+QmLOVFahp7HO4KPdNyWDRkNIAKEmTb7WzFzoAi58s=", "C1iNsNunwIhtOOJvTDxee6pgbCkOjryTGo1g+5SLxEs=", "2khvWt9d+ZdJVlsE9c5CUGSWz42nP08VUkB5e4aYzxI=", "e3OaWwzL1tEWYXiUzGpH+1v9CiFPwweyfRzIh3Z+uO4=", "b+938HIdfjdD/+LgIs3AVRE3Wc65/1NSSAL4OJ5FUXE=", "kQz/4ND7LdhfAQn+idNsO+ZFC32sfkYRlhjWF5W+sPc=", "zGfeoWKmrZlXMOvyi3R2GDbGpmI1skJW/wLTXCCgF0o=", "1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=", "xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="], "checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3488702894\noFCWoCEaqrA/XeK4I92I6bTk0V6SYB72mN2PzJhnSvU=\n\n— rekor.sigstore.dev wNI9ajBEAiAnHdDzuvzfwmKNZq2NH2gmUTbI9WirGlPTTtYzwvQg/AIgTbP3F3kSrYJuThtkdc6vV0VqOgbz200glcZMGPsv+JQ=\n"}}, "canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiJkODZjNTkzYTU0Zjg1YWIyYmUyZWU0NjJlMDdhNzU4ZGY5ODM2YTcxOTFiYTkxYTU3YzMxOWFlMzU1MGJjMDQyIn19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FWUNJUURKSW9tdjhmZThGaEYvZE8wR2pYaGpBL2hJNUJyUkV6d29ITXVaaXBsemRBSWhBTWdrWkowZGh3NEkyM0dkWDFoUFVpNjRZU1YxZnl5NHBHVXJ1eXZGL2FESyIsInB1YmxpY0tleSI6eyJjb250ZW50IjoiTFMwdExTMUNSVWRKVGlCRFJWSlV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vcmUtdHNhLXNlbGZzaWduZWQCFDoTVC8MkGHuvMFDL8uKjosqI4sMMAoGCCqGSM49BAMCBGcwZQIxALcsaq7bKPaWsYT0YuzVid7PlJBN8wac7p2cwgirgQjYD7Sqpe8PLy1ygT5qWd5FRQIwYsVYi4oA6xYfBrZUR2JqOxK1jO8YKAh5KVwto0wE7gfqaD6hsxWTRF2Rkbm/o+Q1"}]}}, "messageSignature":{"messageDigest":{"algorithm":"SHA2_256", "digest":"2GxZOlT4WrK+LuRi4Hp1jfmDanGRupGlfDGa41ULwEI="}, "signature":"MEYCIQDJIomv8fe8FhF/dO0GjXhjA/hI5BrREzwoHMuZiplzdAIhAMgkZJ0dhw4I23GdX1hPUi64YSV1fyy4pGUruyvF/aDK"}}
|
|
|
|
| 1 |
+
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUAO9snsFNV8Jr2AnhkB1IDiOBgUUwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMTIxMDIwODM0WhcNMjYxMTIxMDIxODM0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDyti1kgfmj6pqED9rQHMeUyh1wXf98IYYSXwHwrnKrfAPBi9+VyEO6g5gSv6QIahYv+QrKv3URPVFeLZ7m2mXaOCBdEwggXNMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21tdW5pdHkvLmdpdGh1Yi93b3JrZmxvd3MvYnVpbGQueWFtbEByZWZzL2hlYWRzL21haW4wOQYKKwYBBAGDvzABAQQraHR0cHM6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XVuaXR5Ly5naXRodWIvd29ya2Zsb3dzL2J1aWxkLnlhbWxAcmVmcy9oZWFkcy9tYWluMDgGCisGAQQBg78wARMEKgwoMzEyNzBmNTAwNGI2NDg4NjJkYjllOGUwZTk3Y2UwMjAzMjRiMDQ3ODAhBgorBgEEAYO/MAEUBBMMEXdvcmtmbG93X2Rpc3BhdGNoMGQGCisGAQQBg78wARUEVgxUaHR0cHM6Ly9naXRodWIuY29tL2h1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5L2FjdGlvbnMvcnVucy80NDc2OTQzOTc2My9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGh+9zNmAAABAMARzBFAiALafYysgxpYHaHO1om9E3yZXaNskAlBfanqXDhHXmt8AIhANG8xPoBD2fH8Xn6FVkTuEgjVaCSChsTvccnYxCnFRcgMAoGCCqGSM49BAMDA2gAMGUCMCe6/u3k6o7QIg7bFGi+j1xaWKkwJfzEh1fKm1otY68l7MD08/+9Yd9s0uK3RiTApAIxAOpCR2uW6HprkEK/Ye57yMOj0h155mpUeQfcKHn7OY27xGf2DdkGNpMnLP0UPZQCXQ=="},"tlogEntries":[{"logIndex":"4030899167","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1795226914","inclusionPromise":{"signedEntryTimestamp":"MEQCIDeSuEMtCGsyRISnCgwP2jNSFSTfMVE5udDuwGF4zl2uAiB8EOE02kp9pSdMxrgI0d9EQlgH0KhEA1M+qDyBoTmAjg=="},"inclusionProof":{"logIndex":"3908994905","rootHash":"2isjzZGWaNcfrkbt9ATUoOFbILGX/uZgWgebMZhrdTQ=","treeSize":"3908994917","hashes":["UklJxlwHN8dz3zyHYTdTLLHWZW9bIpuS+95Fk1OCzl4=","VKsS3O3S992vpzd+B0LxWrLeeNNX3yDjmPzZwYl3/Ec=","UXqud9QBYHdAIfBOd2RYNk5tcYXv1B0v7ExFhb2lkeU=","iiEpSrwacFOCV0YLxVO3oNxAa6H6cEaI1QFZurnBhHc=","6JmvzNf1pAHE4Vk+TvPNcb6kYTmds7Uc8cR0WXCUkK8=","pgXijBpJu87+iN7XGek/iTgoX0Rt5oxcXKcCHu3ExDk=","Sn+AYb1YmK/F8ECgo2559k4WGjzjfUn4ZJ5Uez+H9QM=","5oRByY8/02bxJIs1anwiqAupB2RQIY7TrW971Nmpp7U=","2Rt71WgMyU/zi7k9KFRPq73TsDJ1BAA/gysPhaaqHs0=","TnYSkn6gCmC0W5Q70zE/If/0imIiTSMfjYHSNR2/gjM=","CivKB4qQwJ/efmzlbMOtHzFomKxmPl8DgmrU1gXfJbc=","7QhOatgVp6PdYroLLtoCkd+z7p++GJEi0PhNT4miazY=","DR/+o4PSouaxmcHOoT8SiQ/FTcN40w8KhvkWSePwUJ8=","TPnMFjEJWAQvABxd6vVJvcXxcAgWGkz86YdUNbzNnFk=","0FJURNcUGshJHgD9JEae8FQR1/wcJoN4WGg13j5k0IA=","YeXlZ0RHqFK6gqq4hsyYMgKKSx51NRc7HQ7jbKFb4ys=","MgeocvNqIwqgvy0zDQHTAPpPoJl126Y9z+ySQHgYrk0=","bpivoC31PB5djfiSn6cC5GXF2dPZuOJdVxDafoiGndU=","XYkf+Vk9hVBebwq5KRpgAFIE2Jk4aAgO1jFr22tSd4k=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.s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6E1QvDJBh7rzBQy/Lio6LKiOLDDALBglghkgBZQMEAgGggfwwGgYJKoZIhvcNAQkDMQ0GCyqGSIb3DQEJEAEEMBwGCSqGSIb3DQEJBTEPFw0yNjExMjEwMjA4MzRaMC8GCSqGSIb3DQEJBDEiBCDXvsgxt2txMT3G0224/fg8RB56PFBuXSt9gNWEJW0NETCBjgYLKoZIhvcNAQkQAi8xfzB9MHsweQQghfknvAerYsrDtENWwQ78gbLGiD/aernm2HDZ0TrNBbcwVTA9pDswOTEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MSAwHgYDVQQDExdzaWdzdG9yZS10c2Etc2VsZnNpZ25lZAIUOhNULwyQYe68wUMvy4qOiyojiwwwCgYIKoZIzj0EAwIEZjBkAjAYaArHbTmW+pXVrlCxPYbt7rYb1vUhz36vZJIU0V3b44l3LxAMlkh8DRi5WgT4bEUCMCYLG6vnKI7pjE5cgTZ3TLObfEawNpeGZiwEth8bCKH8a0alDJqFYmIjJURmjZ1AzQ=="}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"trlXINAMZluhhhsrhRkToCZAAutjHduObVrnxvKxh/8="},"signature":"MEQCIC+ql4Ba9Jz3Dhd3fMi8SN7zE67R/ZHUmIGyoeR1Cmc5AiBkh10KZnnSD9IZnt2JEOdTKAkiXAYuA9NmKqaPzx0KAg=="}}
|
build/torch212-cu126-x86_64-linux/symbols.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
-
"module": "
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
-
"module": "
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
-
"module": "
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
@@ -34,7 +34,7 @@
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
-
"module": "
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
-
"module": "
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
@@ -63,7 +63,7 @@
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
-
"module": "
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
@@ -81,18 +81,18 @@
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
-
"module": "
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
-
"return_annotation": "
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
-
"module": "
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
@@ -103,7 +103,7 @@
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
-
"module": "
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
@@ -114,7 +114,7 @@
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
-
"module": "
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
@@ -125,7 +125,7 @@
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
-
"module": "
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
@@ -136,7 +136,7 @@
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
-
"module": "
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
@@ -147,7 +147,7 @@
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
-
"module": "
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
-
"module": "
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
@@ -189,7 +189,7 @@
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
-
"module": "
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
@@ -200,7 +200,7 @@
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
-
"module": "
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
@@ -211,7 +211,7 @@
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
-
"module": "
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
@@ -241,7 +241,7 @@
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
-
"module": "
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
@@ -271,7 +271,7 @@
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
-
"module": "
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
@@ -301,7 +301,7 @@
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
-
"module": "
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
@@ -331,7 +331,7 @@
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
-
"module": "
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
@@ -355,13 +355,13 @@
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
-
"return_annotation": "List[Tuple[Tuple[int, int],
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
-
"module": "
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
@@ -391,7 +391,7 @@
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
-
"module": "
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
@@ -415,13 +415,13 @@
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
-
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]],
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
-
"module": "
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
@@ -451,7 +451,7 @@
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
-
"module": "
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
@@ -481,7 +481,7 @@
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
-
"module": "
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
@@ -511,7 +511,7 @@
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
-
"module": "
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
@@ -541,7 +541,7 @@
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
-
"module": "
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
@@ -571,7 +571,7 @@
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
-
"module": "
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
@@ -607,7 +607,7 @@
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
-
"module": "
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
@@ -643,7 +643,7 @@
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
-
"module": "
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
@@ -766,7 +766,7 @@
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
-
"annotation": "str |
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
@@ -787,7 +787,7 @@
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
-
"module": "
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
@@ -910,7 +910,7 @@
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
-
"annotation": "str |
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
@@ -931,7 +931,7 @@
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
-
"module": "
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
@@ -1054,7 +1054,7 @@
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
-
"annotation": "str |
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
@@ -1075,7 +1075,7 @@
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
-
"module": "
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
@@ -1198,7 +1198,7 @@
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
-
"annotation": "str |
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
@@ -1219,7 +1219,7 @@
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
-
"module": "
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
+
"module": "_natten_cuda_31270f5",
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
+
"module": "_natten_cuda_31270f5.context",
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
+
"module": "_natten_cuda_31270f5.context",
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
+
"module": "_natten_cuda_31270f5.context",
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
+
"module": "_natten_cuda_31270f5.context",
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
+
"module": "_natten_cuda_31270f5.context",
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
+
"module": "_natten_cuda_31270f5.context",
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
+
"return_annotation": "_natten_cuda_31270f5.context.MemoryUsagePreference"
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
+
"module": "_natten_cuda_31270f5.context",
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
+
"module": "_natten_cuda_31270f5.context",
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
+
"module": "_natten_cuda_31270f5.context",
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
+
"module": "_natten_cuda_31270f5.context",
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
+
"module": "_natten_cuda_31270f5.context",
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
+
"module": "_natten_cuda_31270f5.context",
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
+
"module": "_natten_cuda_31270f5.context",
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
+
"module": "_natten_cuda_31270f5.context",
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
+
"module": "_natten_cuda_31270f5.context",
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
+
"return_annotation": "List[Tuple[Tuple[int, int], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
+
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
+
"module": "_natten_cuda_31270f5.attn_merge",
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
build/torch212-cu130-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 164173536
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:830d1f6525e4b0896d9c845558f70e4e2a35dfa9c2f8e43a1a8f4849f1b3c955
|
| 3 |
size 164173536
|
build/torch212-cu130-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _natten_cuda_31270f5
|
| 3 |
+
ops = torch.ops._natten_cuda_31270f5
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_natten_cuda_31270f5::{op_name}"
|
build/torch212-cu130-x86_64-linux/metadata.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
|
|
|
| 5 |
"kernels-minver": "0.14.0",
|
| 6 |
"license": "MIT",
|
| 7 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
@@ -25,8 +26,8 @@
|
|
| 25 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 26 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 27 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 28 |
-
"
|
| 29 |
-
"_ops.py": "
|
| 30 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 31 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 32 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
@@ -55,7 +56,7 @@
|
|
| 55 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 56 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 57 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 58 |
-
"symbols.json": "
|
| 59 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 60 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 61 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
@@ -75,12 +76,12 @@
|
|
| 75 |
},
|
| 76 |
"provenance": {
|
| 77 |
"kernel-builder": {
|
| 78 |
-
"version": "0.
|
| 79 |
-
"commit": "
|
| 80 |
"dirty": false
|
| 81 |
},
|
| 82 |
"kernel": {
|
| 83 |
-
"commit": "
|
| 84 |
"dirty": false
|
| 85 |
}
|
| 86 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
+
"id": "_natten_cuda_31270f5",
|
| 4 |
"version": 1,
|
| 5 |
+
"build-layout": "files",
|
| 6 |
"kernels-minver": "0.14.0",
|
| 7 |
"license": "MIT",
|
| 8 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
|
|
| 26 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 27 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 28 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 29 |
+
"_natten_cuda_31270f5.abi3.so": "gw0fZSXksIltnIRVWPcOTio136nC+OQ6Go9ISfGzyVU=",
|
| 30 |
+
"_ops.py": "vzk3ldaPIUjmPzynSJNT3eXescYWsbmxBENeACy8WcA=",
|
| 31 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 32 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 33 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
|
|
| 56 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 57 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 58 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 59 |
+
"symbols.json": "UrDOuMsK8IE+RnVWVt4KeQR2kJ9QH15RD6+gjxAO9Ug=",
|
| 60 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 61 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 62 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
|
|
| 76 |
},
|
| 77 |
"provenance": {
|
| 78 |
"kernel-builder": {
|
| 79 |
+
"version": "0.19.0-dev1",
|
| 80 |
+
"commit": "b0bf5a2418da965879146c93b453166fe6df42fe",
|
| 81 |
"dirty": false
|
| 82 |
},
|
| 83 |
"kernel": {
|
| 84 |
+
"commit": "31270f5004b648862db9e8e0e97ce020324b0478",
|
| 85 |
"dirty": false
|
| 86 |
}
|
| 87 |
}
|
build/torch212-cu130-x86_64-linux/metadata.json.sigstore
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial":{"certificate":{"rawBytes":"MIIHKzCCBrGgAwIBAgIUcTbj9oCgTEUJVWaTIPvEhmf4RxQwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMDMxMDUzNzI3WhcNMjYxMDMxMDU0NzI3WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExBoqbYZD1DR3lenPeTMLWJos+AmsV3BxtIOFjTmvRQNERjWucfwvcsSqmQjonPI6T861G2D4Ac0JWzvz8kjw9qOCBdAwggXMMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21tdW5pdHkvLmdpdGh1Yi93b3JrZmxvd3MvYnVpbGQueWFtbEByZWZzL2hlYWRzL21haW4wOQYKKwYBBAGDvzABAQQraHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbTAfBgorBgEEAYO/MAECBBF3b3JrZmxvd19kaXNwYXRjaDA2BgorBgEEAYO/MAEDBCg1ZmU5ZGJiM2Q0NWY2ZjI2NTI5NThjMWY3MGU1MzgxODkxZmE3YWEwMBMGCisGAQQBg78wAQQEBUJ1aWxkMCsGCisGAQQBg78wAQUEHWh1Z2dpbmdmYWNlL2t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uY29tL2h1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5L2FjdGlvbnMvcnVucy80MTA4MzU5MjA4MS9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGJBgorBgEEAdZ5AgQCBHsEeQB3AHUA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGhkHZ/WQAABAMARjBEAiAtJJxtetfIpc+H5aEOZ/f0iGtP4+SbSFHtji93cg2oGwIgWol8M+xaRul370W1WfvDi/jIDuukf4A7ZzSlnTO5/YswCgYIKoZIzj0EAwMDaAAwZQIwf7IzJ0nuwXI/tu/4dyQu5F0T7M9h1cZgINTBqJ2+ZbqXCrPXv6Lif+OD7FhrFY4pAjEAycALYzXe6dnfLMdHUWQ2TT972EHu7NEsid4k0qvgZvHd1wNlxy4xZJ6H/CW357Yc"}, "tlogEntries":[{"logIndex":"3610607309", "logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion":{"kind":"hashedrekord", "version":"0.0.1"}, "integratedTime":"1793425047", "inclusionPromise":{"signedEntryTimestamp":"MEUCIQCcnc4j3ZdlRjkYv0OEsGCRThmQ6isT8IgRXX15J3X9GQIgC421Hv4Csa4nF7JyF64k+I1bPC/qDX5E/4OBkeYgEZU="}, "inclusionProof":{"logIndex":"3488703047", "rootHash":"A5CCohnTrjC+qwYOMUojPFinqnM2E8L+xQ2mz+SiC30=", "treeSize":"3488703054", "hashes":["PoptacK7YdMBQWEb4iiIdnwP9wLyJGRxwHWu4S4lhlw=", "tpfcEtwXFFWYdJYg1vcLrFmKPGRIOI0TNfp8EtExUGg=", "ig/ibfGiifJN0LZuZYIK1SNCiYEiJoiD1KHpYzPGA+8=", "uO/1bEYAnVxNhbc5rjN0Nnig6/Q0cEFRierD8+gNDvo=", "t00QIZTzu+ncefb3e6MZ2jJOD3B7AIBcZC1SHLa6CbU=", "HLokzHuwj8p1oMDI8r5qP+xSkTYwjlxO4Z07xUJXoyA=", "SBGYBxDW1vPrRfLVzkfAmHztV8hjryENrdOwzfl6ZyE=", "VBzotYQmLUVA5ePORWBybjfF8sU+JIUW7rZp/8qaNu0=", "fekca6POtULZgxL4E227LPRKxnnaSJ3Uh9jKswvvyus=", "aBdy9Mluw4miV25uIiM8ZDgXQ/Pm23TTNnKRoEbAiY4=", "Y+QmLOVFahp7HO4KPdNyWDRkNIAKEmTb7WzFzoAi58s=", "C1iNsNunwIhtOOJvTDxee6pgbCkOjryTGo1g+5SLxEs=", "2khvWt9d+ZdJVlsE9c5CUGSWz42nP08VUkB5e4aYzxI=", "e3OaWwzL1tEWYXiUzGpH+1v9CiFPwweyfRzIh3Z+uO4=", "b+938HIdfjdD/+LgIs3AVRE3Wc65/1NSSAL4OJ5FUXE=", "kQz/4ND7LdhfAQn+idNsO+ZFC32sfkYRlhjWF5W+sPc=", "zGfeoWKmrZlXMOvyi3R2GDbGpmI1skJW/wLTXCCgF0o=", "1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=", "xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="], "checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3488703054\nA5CCohnTrjC+qwYOMUojPFinqnM2E8L+xQ2mz+SiC30=\n\n— rekor.sigstore.dev wNI9ajBEAiBRuo4JHe53ca7tDe5fJmV+G1Bd36GrVu25jIf+enAMhAIgbUSgYDkIGMuJKHEVyZOMIRKtu9h0/kke4vv6RRozOEE=\n"}}, "canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiI3Y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aCB/DAaBgkqhkiG9w0BCQMxDQYLKoZIhvcNAQkQAQQwHAYJKoZIhvcNAQkFMQ8XDTI2MTAzMTA1MzcyN1owLwYJKoZIhvcNAQkEMSIEIFG9raoZs/F/FjuLPV5VajSI5fdjs1hQiNlI0I4/X8tPMIGOBgsqhkiG9w0BCRACLzF/MH0wezB5BCCF+Se8B6tiysO0Q1bBDvyBssaIP9p6uebYcNnROs0FtzBVMD2kOzA5MRUwEwYDVQQKEwxzaWdzdG9yZS5kZXYxIDAeBgNVBAMTF3NpZ3N0b3JlLXRzYS1zZWxmc2lnbmVkAhQ6E1QvDJBh7rzBQy/Lio6LKiOLDDAKBggqhkjOPQQDAgRnMGUCME4L22lOGzTqQCRtieQu7oFYaVPwn1Gp5GIYKVd0WpYo5oKw0lDM6DEo9oZgl+Xk9wIxAOFRnPzoPOVcYwSVpWGBvphpylga2m9xZpoEGd6xY8OzQxeSPz03czKtRZ/0wowBrA=="}]}}, "messageSignature":{"messageDigest":{"algorithm":"SHA2_256", "digest":"e12zJ7bVD0O+lSPyY1hL2PhTGfK/SVK14Kj141EPW14="}, "signature":"MEQCIF+WI5BnApakHJxEnwauKEHy3ZVcaCVkwtXqImiU8KLlAiBTnzKf31KdEWJfxtbRB4D5tj8YsKu1CNKsyxUKHFAPDA=="}}
|
|
|
|
| 1 |
+
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUAO9snsFNV8Jr2AnhkB1IDiOBgUUwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMTIxMDIwODM0WhcNMjYxMTIxMDIxODM0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDyti1kgfmj6pqED9rQHMeUyh1wXf98IYYSXwHwrnKrfAPBi9+VyEO6g5gSv6QIahYv+QrK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P0UPZQCXQ=="},"tlogEntries":[{"logIndex":"4030899178","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1795226914","inclusionPromise":{"signedEntryTimestamp":"MEUCIQDcWkcWuh9yJ5bxTsK8Bzp+SwFNwxEg+sw3pqI5lg+KUQIgH85CRnP3+VXtr9CxJMY/+fMQ58FmLvEW5TVqtHri8AM="},"inclusionProof":{"logIndex":"3908994916","rootHash":"ZARv8ss9UZdx9hjtsnCqtc8PvmM/QfLKOEDCuRd5dms=","treeSize":"3908994927","hashes":["EWnSps8BnNhtA9veQwFQ54gnTKUZUo4Jsdc7ewCdArU=","CoyPQEspuGgO8ISGkMmrGRme2WLNOCHu4+hoW9FSiSI=","BAW9oP55mbHGJdbqZcXElYs0udZjgCiNJIITewf0ZZM=","NvW3TeUrN/SnSHJoWhIycTauPfTLHQp7sj7JzaUT2O4=","DxKkaRTS1ffWfcGr0PcKCdbUxpJcP7HRYnoWeDReqmw=","Sn+AYb1YmK/F8ECgo2559k4WGjzjfUn4ZJ5Uez+H9QM=","5oRByY8/02bxJIs1anwiqAupB2RQIY7TrW971Nmpp7U=","2Rt71WgMyU/zi7k9KFRPq73TsDJ1BAA/gysPhaaqHs0=","TnYSkn6gCmC0W5Q70zE/If/0imIiTSMfjYHSNR2/gjM=","CivKB4qQwJ/efmzlbMOtHzFomKxmPl8DgmrU1gXfJbc=","7QhOatgVp6PdYroLLtoCkd+z7p++GJEi0PhNT4miazY=","DR/+o4PSouaxmcHOoT8SiQ/FTcN40w8KhvkWSePwUJ8=","TPnMFjEJWAQvABxd6vVJvcXxcAgWGkz86YdUNbzNnFk=","0FJURNcUGshJHgD9JEae8FQR1/wcJoN4WGg13j5k0IA=","YeXlZ0RHqFK6gqq4hsyYMgKKSx51NRc7HQ7jbKFb4ys=","MgeocvNqIwqgvy0zDQHTAPpPoJl126Y9z+ySQHgYrk0=","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BlAjA7abFf+imjtKshf1DLF9mklFykBXaBk6bUBnNH7atXLLpRzxhunbJsjDXdyQfhtxECMQDmo7wXI6SZim+Db/tk2qI/FHOfm+ooehVwgiq2kqrqXtO86rMDHFyU3tXBMbx775cxggHbMIIB1wIBATBRMDkxFTATBgNVBAoTDHNpZ3N0b3JlLmRldjEgMB4GA1UEAxMXc2lnc3RvcmUtdHNhLXNlbGZzaWduZWQCFDoTVC8MkGHuvMFDL8uKjosqI4sMMAsGCWCGSAFlAwQCAaCB/DAaBgkqhkiG9w0BCQMxDQYLKoZIhvcNAQkQAQQwHAYJKoZIhvcNAQkFMQ8XDTI2MTEyMTAyMDgzNFowLwYJKoZIhvcNAQkEMSIEIALbSSjchlQfkgTAiiXrM5lCyiqdNYvsk/vvO0nLAC5+MIGOBgsqhkiG9w0BCRACLzF/MH0wezB5BCCF+Se8B6tiysO0Q1bBDvyBssaIP9p6uebYcNnROs0FtzBVMD2kOzA5MRUwEwYDVQQKEwxzaWdzdG9yZS5kZXYxIDAeBgNVBAMTF3NpZ3N0b3JlLXRzYS1zZWxmc2lnbmVkAhQ6E1QvDJBh7rzBQy/Lio6LKiOLDDAKBggqhkjOPQQDAgRnMGUCMBgbptVqq2O06je4vueo7rJyV7Z1hEHrlEcYaf0wgP1pPgtCUbmXX/5/NdOg9HkZHQIxAO1TBNBHsJDqag7Wy1XiJL7t2LLELULXY9VFODeZoDAKL6PG2dTNkdTOx7W2tPWOxw=="}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"82PMVjZy6WpzBx1ooJZO6xbsuQRuHzfneYL/gxkbVJk="},"signature":"MEUCIBEz9ZcOrw54fVcXg1fKC6nHbiuKSXBAeFa9ZRJmTAJUAiEA2iVT9AYQAPEjMp2p5WWdC4LUD3/kIUXQqp/q2Md46Kk="}}
|
build/torch212-cu130-x86_64-linux/symbols.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
-
"module": "
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
-
"module": "
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
-
"module": "
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
@@ -34,7 +34,7 @@
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
-
"module": "
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
-
"module": "
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
@@ -63,7 +63,7 @@
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
-
"module": "
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
@@ -81,18 +81,18 @@
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
-
"module": "
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
-
"return_annotation": "
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
-
"module": "
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
@@ -103,7 +103,7 @@
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
-
"module": "
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
@@ -114,7 +114,7 @@
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
-
"module": "
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
@@ -125,7 +125,7 @@
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
-
"module": "
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
@@ -136,7 +136,7 @@
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
-
"module": "
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
@@ -147,7 +147,7 @@
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
-
"module": "
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
-
"module": "
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
@@ -189,7 +189,7 @@
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
-
"module": "
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
@@ -200,7 +200,7 @@
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
-
"module": "
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
@@ -211,7 +211,7 @@
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
-
"module": "
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
@@ -241,7 +241,7 @@
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
-
"module": "
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
@@ -271,7 +271,7 @@
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
-
"module": "
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
@@ -301,7 +301,7 @@
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
-
"module": "
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
@@ -331,7 +331,7 @@
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
-
"module": "
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
@@ -355,13 +355,13 @@
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
-
"return_annotation": "List[Tuple[Tuple[int, int],
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
-
"module": "
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
@@ -391,7 +391,7 @@
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
-
"module": "
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
@@ -415,13 +415,13 @@
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
-
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]],
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
-
"module": "
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
@@ -451,7 +451,7 @@
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
-
"module": "
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
@@ -481,7 +481,7 @@
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
-
"module": "
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
@@ -511,7 +511,7 @@
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
-
"module": "
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
@@ -541,7 +541,7 @@
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
-
"module": "
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
@@ -571,7 +571,7 @@
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
-
"module": "
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
@@ -607,7 +607,7 @@
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
-
"module": "
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
@@ -643,7 +643,7 @@
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
-
"module": "
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
@@ -766,7 +766,7 @@
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
-
"annotation": "str |
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
@@ -787,7 +787,7 @@
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
-
"module": "
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
@@ -910,7 +910,7 @@
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
-
"annotation": "str |
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
@@ -931,7 +931,7 @@
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
-
"module": "
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
@@ -1054,7 +1054,7 @@
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
-
"annotation": "str |
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
@@ -1075,7 +1075,7 @@
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
-
"module": "
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
@@ -1198,7 +1198,7 @@
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
-
"annotation": "str |
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
@@ -1219,7 +1219,7 @@
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
-
"module": "
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
+
"module": "_natten_cuda_31270f5",
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
+
"module": "_natten_cuda_31270f5.context",
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
+
"module": "_natten_cuda_31270f5.context",
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
+
"module": "_natten_cuda_31270f5.context",
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
+
"module": "_natten_cuda_31270f5.context",
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
+
"module": "_natten_cuda_31270f5.context",
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
+
"module": "_natten_cuda_31270f5.context",
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
+
"return_annotation": "_natten_cuda_31270f5.context.MemoryUsagePreference"
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
+
"module": "_natten_cuda_31270f5.context",
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
+
"module": "_natten_cuda_31270f5.context",
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
+
"module": "_natten_cuda_31270f5.context",
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
+
"module": "_natten_cuda_31270f5.context",
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
+
"module": "_natten_cuda_31270f5.context",
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
+
"module": "_natten_cuda_31270f5.context",
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
+
"module": "_natten_cuda_31270f5.context",
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
+
"module": "_natten_cuda_31270f5.context",
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
+
"module": "_natten_cuda_31270f5.context",
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
+
"return_annotation": "List[Tuple[Tuple[int, int], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
+
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
+
"module": "_natten_cuda_31270f5.attn_merge",
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
build/torch212-cu132-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 165933648
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cbee605b839226247d444803cb791b59c8268d6b7fc9dc32ab6ddd29d50d9a0b
|
| 3 |
size 165933648
|
build/torch212-cu132-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _natten_cuda_31270f5
|
| 3 |
+
ops = torch.ops._natten_cuda_31270f5
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_natten_cuda_31270f5::{op_name}"
|
build/torch212-cu132-x86_64-linux/metadata.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
|
|
|
| 5 |
"kernels-minver": "0.14.0",
|
| 6 |
"license": "MIT",
|
| 7 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
@@ -25,8 +26,8 @@
|
|
| 25 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 26 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 27 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 28 |
-
"
|
| 29 |
-
"_ops.py": "
|
| 30 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 31 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 32 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
@@ -55,7 +56,7 @@
|
|
| 55 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 56 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 57 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 58 |
-
"symbols.json": "
|
| 59 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 60 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 61 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
@@ -75,12 +76,12 @@
|
|
| 75 |
},
|
| 76 |
"provenance": {
|
| 77 |
"kernel-builder": {
|
| 78 |
-
"version": "0.
|
| 79 |
-
"commit": "
|
| 80 |
"dirty": false
|
| 81 |
},
|
| 82 |
"kernel": {
|
| 83 |
-
"commit": "
|
| 84 |
"dirty": false
|
| 85 |
}
|
| 86 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
+
"id": "_natten_cuda_31270f5",
|
| 4 |
"version": 1,
|
| 5 |
+
"build-layout": "files",
|
| 6 |
"kernels-minver": "0.14.0",
|
| 7 |
"license": "MIT",
|
| 8 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
|
|
| 26 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 27 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 28 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 29 |
+
"_natten_cuda_31270f5.abi3.so": "y+5gW4OSJiR9REgDy3kbWcgmjWt/ydwyq23dKdUNmgs=",
|
| 30 |
+
"_ops.py": "vzk3ldaPIUjmPzynSJNT3eXescYWsbmxBENeACy8WcA=",
|
| 31 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 32 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 33 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
|
|
| 56 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 57 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 58 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 59 |
+
"symbols.json": "UrDOuMsK8IE+RnVWVt4KeQR2kJ9QH15RD6+gjxAO9Ug=",
|
| 60 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 61 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 62 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
|
|
| 76 |
},
|
| 77 |
"provenance": {
|
| 78 |
"kernel-builder": {
|
| 79 |
+
"version": "0.19.0-dev1",
|
| 80 |
+
"commit": "b0bf5a2418da965879146c93b453166fe6df42fe",
|
| 81 |
"dirty": false
|
| 82 |
},
|
| 83 |
"kernel": {
|
| 84 |
+
"commit": "31270f5004b648862db9e8e0e97ce020324b0478",
|
| 85 |
"dirty": false
|
| 86 |
}
|
| 87 |
}
|
build/torch212-cu132-x86_64-linux/metadata.json.sigstore
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrOgAwIBAgIUTS+FL07ttp7Apf0cK+uqLzv6VAowCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMDMxMDUzNzE3WhcNMjYxMDMxMDU0NzE3WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEk5ty2DkrYaKyaxp3zgzZts4o8+kdBwD0tfzaJMf6a+XHG5a2YZ2io6R5THF9XhZAsOzZEUk764iVi/mNWyo71qOCBdIwggXOMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21tdW5pdHkvLmdpdGh1Yi93b3JrZmxvd3MvYnVpbGQueWFtbEByZWZzL2hlYWRzL21haW4wOQYKKwYBBAGDvzABAQQraH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m5lbHMtY29tbXVuaXR5Ly5naXRodWIvd29ya2Zsb3dzL2J1aWxkLnlhbWxAcmVmcy9oZWFkcy9tYWluMDgGCisGAQQBg78wARMEKgwoNWZlOWRiYjNkNDVmNmYyNjUyOTU4YzFmNzBlNTM4MTg5MWZhN2FhMDAhBgorBgEEAYO/MAEUBBMMEXdvcmtmbG93X2Rpc3BhdGNoMGQGCisGAQQBg78wARUEVgxUaHR0cHM6Ly9naXRodWIuY29tL2h1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5L2FjdGlvbnMvcnVucy80MTA4MzU5MjA4MS9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGLBgorBgEEAdZ5AgQCBH0EewB5AHcA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGhkHZaHQAABAMASDBGAiEA1+a5SxrvVgmIYuU3CePZKQjNt71bAmd3cFkI4RHg0M0CIQCVfKlU41rxBMnWGP5XUUL33NWq2obnxSRvOImwqGOu6TAKBggqhkjOPQQDAwNnADBkAjAnCZi0Lznefn+UpFrHM9ZuFxB7R7rB/Yqt0OcvV30tvnCOy89R5/utu3yGYLahTtgCMDqn64OMZatkeeKFclIWDElRHrOnB4nfAC1TblcXKdiGTqMz6KyqHGdk5dc14KHUOw=="}, "tlogEntries":[{"logIndex":"3610606998", "logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion":{"kind":"hashedrekord", "version":"0.0.1"}, "integratedTime":"1793425038", "inclusionPromise":{"signedEntryTimestamp":"MEUCIQDqsSTCFQvhfMGl6zMoQRerGuMfv8bHGi9LvBPg5c0VJgIgZvzgD81ttZRrWiGLn+43RV4CAcoA9aevy32Yjd7uYbM="}, "inclusionProof":{"logIndex":"3488702736", "rootHash":"dcfTtUIzliVJR+20TZH0wAt40k3Z1T2JsvJiPC6aRkc=", "treeSize":"3488702745", "hashes":["S5tTY4QqxnXGB6W3hmw9oP+ibFNJO+w03XimUrkpt7Q=", "aHpRYaAOHPqlcDaFp6INugioHV/YhxYoWjVGaRuI0ro=", "R5BWrvKIHcMEmnENYbre+XZoNRZffT6+RDvi7lxXX24=", "RPId5NAI3XjePH8f/GHsY0TBnY01ngoov7sYnqmB8Dc=", "hDCHwJud2v4ARbINu/a2K928RBXN25l4/TYVHQZkOMs=", "IS7BRxVHxq9gK5ijkANMWvxvAoFlqBHq9KAs0Gy7u/8=", "SBGYBxDW1vPrRfLVzkfAmHztV8hjryENrdOwzfl6ZyE=", "VBzotYQmLUVA5ePORWBybjfF8sU+JIUW7rZp/8qaNu0=", "fekca6POtULZgxL4E227LPRKxnnaSJ3Uh9jKswvvyus=", "aBdy9Mluw4miV25uIiM8ZDgXQ/Pm23TTNnKRoEbAiY4=", "Y+QmLOVFahp7HO4KPdNyWDRkNIAKEmTb7WzFzoAi58s=", "C1iNsNunwIhtOOJvTDxee6pgbCkOjryTGo1g+5SLxEs=", "2khvWt9d+ZdJVlsE9c5CUGSWz42nP08VUkB5e4aYzxI=", "e3OaWwzL1tEWYXiUzGpH+1v9CiFPwweyfRzIh3Z+uO4=", "b+938HIdfjdD/+LgIs3AVRE3Wc65/1NSSAL4OJ5FUXE=", "kQz/4ND7LdhfAQn+idNsO+ZFC32sfkYRlhjWF5W+sPc=", "zGfeoWKmrZlXMOvyi3R2GDbGpmI1skJW/wLTXCCgF0o=", "1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=", "xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="], "checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3488702745\ndcfTtUIzliVJR+20TZH0wAt40k3Z1T2JsvJiPC6aRkc=\n\n— rekor.sigstore.dev wNI9ajBGAiEAiorKJighwOL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RgPMjAyNjEwMzEwNTM3MTdaMAMCAQGgMqQwMC4xFTATBgNVBAoTDHNpZ3N0b3JlLmRldjEVMBMGA1UEAxMMc2lnc3RvcmUtdHNhoAAxggHbMIIB1wIBATBRMDkxFTATBgNVBAoTDHNpZ3N0b3JlLmRldjEgMB4GA1UEAxMXc2lnc3RvcmUtdHNhLXNlbGZzaWduZWQCFDoTVC8MkGHuvMFDL8uKjosqI4sMMAsGCWCGSAFlAwQCAaCB/DAaBgkqhkiG9w0BCQMxDQYLKoZIhvcNAQkQAQQwHAYJKoZIhvcNAQkFMQ8XDTI2MTAzMTA1MzcxN1owLwYJKoZIhvcNAQkEMSIEINzKcxVKsG9BjtuoMBy0aIioQEMcJTz1bkQ4KPf1/VwlMIGOBgsqhkiG9w0BCRACLzF/MH0wezB5BCCF+Se8B6tiysO0Q1bBDvyBssaIP9p6uebYcNnROs0FtzBVMD2kOzA5MRUwEwYDVQQKEwxzaWdzdG9yZS5kZXYxIDAeBgNVBAMTF3NpZ3N0b3JlLXRzYS1zZWxmc2lnbmVkAhQ6E1QvDJBh7rzBQy/Lio6LKiOLDDAKBggqhkjOPQQDAgRnMGUCMQCRsKHE8WrW2pGHQ2tlBPXw5jX9CzhgHrj30i4T9KqS8j1Y8woU/Ax4AtnVJRWwOGYCMF4HBSueHtX6EZG0JsHkCVL8lyTz1hf8oAzJjcX7o0UKS96E8ZEvTRaVXpw/Y+2BAQ=="}]}}, "messageSignature":{"messageDigest":{"algorithm":"SHA2_256", "digest":"ZrlnpEXKT42GSKh9zjoD0BhsUXMDPJ6ilgEzZX+jySY="}, "signature":"MEUCIQCEY4iACJN7xOJEWn2FNa5tnT03ktyheO3hlrMuAvhQrwIge8U4Bdwo4n+mVEOBtS3xeoj+8nzyEKLKXp2sgnYxsIo="}}
|
|
|
|
| 1 |
+
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUAO9snsFNV8J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ygC8p7o4AAAGh+9zNmAAABAMARzBFAiALafYysgxpYHaHO1om9E3yZXaNskAlBfanqXDhHXmt8AIhANG8xPoBD2fH8Xn6FVkTuEgjVaCSChsTvccnYxCnFRcgMAoGCCqGSM49BAMDA2gAMGUCMCe6/u3k6o7QIg7bFGi+j1xaWKkwJfzEh1fKm1otY68l7MD08/+9Yd9s0uK3RiTApAIxAOpCR2uW6HprkEK/Ye57yMOj0h155mpUeQfcKHn7OY27xGf2DdkGNpMnLP0UPZQCXQ=="},"tlogEntries":[{"logIndex":"4030899180","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1795226914","inclusionPromise":{"signedEntryTimestamp":"MEQCID4hueNAKkHBgo08PfVMIrBwnRDqVd6vE30wK+UlReFmAiB1h53FfLUHIEtZG8koOC2+1tUkQZtm8Wx94KvtnNPMOA=="},"inclusionProof":{"logIndex":"3908994918","rootHash":"ZARv8ss9UZdx9hjtsnCqtc8PvmM/QfLKOEDCuRd5dms=","treeSize":"3908994927","hashes":["VQpo8xQxckfP4OWVpNjsHLWQ3DmY5YpUGIsno3SAjVY=","uVhQDl/u73FuIWbQo/CZoXaUOtYcnZGLBdwHsV6/x/k=","BAW9oP55mbHGJdbqZcXElYs0udZjgCiNJIITewf0ZZM=","NvW3TeUrN/SnSHJoWhIycTauPfTLHQp7sj7JzaUT2O4=","DxKkaRTS1ffWfcGr0PcKCdbUxpJcP7HRYnoWeDReqmw=","Sn+AYb1YmK/F8ECgo2559k4WGjzjfUn4ZJ5Uez+H9QM=","5oRByY8/02bxJIs1anwiqAupB2RQIY7TrW971Nmpp7U=","2Rt71WgMyU/zi7k9KFRPq73TsDJ1BAA/gysPhaaqHs0=","TnYSkn6gCmC0W5Q70zE/If/0imIiTSMfjYHSNR2/gjM=","CivKB4qQwJ/efmzlbMOtHzFomKxmPl8DgmrU1gXfJbc=","7QhOatgVp6PdYroLLtoCkd+z7p++GJEi0PhNT4miazY=","DR/+o4PSouaxmcHOoT8SiQ/FTcN40w8KhvkWSePwUJ8=","TPnMFjEJWAQvABxd6vVJvcXxcAgWGkz86YdUNbzNnFk=","0FJURNcUGshJHgD9JEae8FQR1/wcJoN4WGg13j5k0IA=","YeXlZ0RHqFK6gqq4hsyYMgKKSx51NRc7HQ7jbKFb4ys=","MgeocvNqIwqgvy0zDQHTAPpPoJl126Y9z+ySQHgYrk0=","bpivoC31PB5djfiSn6cC5GXF2dPZuOJdVxDafoiGndU=","XYkf+Vk9hVBebwq5KRpgAFIE2Jk4aAgO1jFr22tSd4k=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3908994927\nZARv8ss9UZdx9hjtsnCqtc8PvmM/QfLKOEDCuRd5dms=\n\n— rekor.sigstore.dev wNI9ajBEAiBbvma3gQ0QNdd4qKeLszntTFXtc0sd4H7IQH4Q/qR/sAIgZJm6oDHiPA06dO12ojjwWNS/ntJwC+oIcfMoA1bb89s=\n"}},"canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiI5MGJmN2E4NTVmZWU5ZDVjZGJmNzNhZjdhOWJhYTNkYzY5YjBiMGE0MzdhNjZmYTEzNzNlYTA1OTViYmExMGJkIn19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FWUNJUUNOREthczd4Yjh3b3ZXN0RTQVpiU0tPcnAzYXREaFYweWxFQ0R4SmFJVE5nSWhBTmFOM25HNlkvQ1VOdEgvY2dCM1B5OVl0dTdLV3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","digest":"kL96hV/unVzb9zr3qbqj3GmwsKQ3pm+hNz6gWVu6EL0="},"signature":"MEYCIQCNDKas7xb8wovW7DSAZbSKOrp3atDhV0ylECDxJaITNgIhANaN3nG6Y/CUNtH/cgB3Py9Ytu7KWs2i4ub9YOoaZ+MQ"}}
|
build/torch212-cu132-x86_64-linux/symbols.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
-
"module": "
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
-
"module": "
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
-
"module": "
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
@@ -34,7 +34,7 @@
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
-
"module": "
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
-
"module": "
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
@@ -63,7 +63,7 @@
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
-
"module": "
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
@@ -81,18 +81,18 @@
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
-
"module": "
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
-
"return_annotation": "
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
-
"module": "
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
@@ -103,7 +103,7 @@
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
-
"module": "
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
@@ -114,7 +114,7 @@
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
-
"module": "
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
@@ -125,7 +125,7 @@
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
-
"module": "
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
@@ -136,7 +136,7 @@
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
-
"module": "
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
@@ -147,7 +147,7 @@
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
-
"module": "
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
-
"module": "
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
@@ -189,7 +189,7 @@
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
-
"module": "
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
@@ -200,7 +200,7 @@
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
-
"module": "
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
@@ -211,7 +211,7 @@
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
-
"module": "
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
@@ -241,7 +241,7 @@
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
-
"module": "
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
@@ -271,7 +271,7 @@
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
-
"module": "
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
@@ -301,7 +301,7 @@
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
-
"module": "
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
@@ -331,7 +331,7 @@
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
-
"module": "
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
@@ -355,13 +355,13 @@
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
-
"return_annotation": "List[Tuple[Tuple[int, int],
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
-
"module": "
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
@@ -391,7 +391,7 @@
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
-
"module": "
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
@@ -415,13 +415,13 @@
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
-
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]],
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
-
"module": "
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
@@ -451,7 +451,7 @@
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
-
"module": "
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
@@ -481,7 +481,7 @@
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
-
"module": "
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
@@ -511,7 +511,7 @@
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
-
"module": "
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
@@ -541,7 +541,7 @@
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
-
"module": "
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
@@ -571,7 +571,7 @@
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
-
"module": "
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
@@ -607,7 +607,7 @@
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
-
"module": "
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
@@ -643,7 +643,7 @@
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
-
"module": "
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
@@ -766,7 +766,7 @@
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
-
"annotation": "str |
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
@@ -787,7 +787,7 @@
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
-
"module": "
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
@@ -910,7 +910,7 @@
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
-
"annotation": "str |
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
@@ -931,7 +931,7 @@
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
-
"module": "
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
@@ -1054,7 +1054,7 @@
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
-
"annotation": "str |
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
@@ -1075,7 +1075,7 @@
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
-
"module": "
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
@@ -1198,7 +1198,7 @@
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
-
"annotation": "str |
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
@@ -1219,7 +1219,7 @@
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
-
"module": "
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
+
"module": "_natten_cuda_31270f5",
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
+
"module": "_natten_cuda_31270f5.context",
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
+
"module": "_natten_cuda_31270f5.context",
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
+
"module": "_natten_cuda_31270f5.context",
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
+
"module": "_natten_cuda_31270f5.context",
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
+
"module": "_natten_cuda_31270f5.context",
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
+
"module": "_natten_cuda_31270f5.context",
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
+
"return_annotation": "_natten_cuda_31270f5.context.MemoryUsagePreference"
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
+
"module": "_natten_cuda_31270f5.context",
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
+
"module": "_natten_cuda_31270f5.context",
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
+
"module": "_natten_cuda_31270f5.context",
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
+
"module": "_natten_cuda_31270f5.context",
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
+
"module": "_natten_cuda_31270f5.context",
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
+
"module": "_natten_cuda_31270f5.context",
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
+
"module": "_natten_cuda_31270f5.context",
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
+
"module": "_natten_cuda_31270f5.context",
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
+
"module": "_natten_cuda_31270f5.context",
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
+
"return_annotation": "List[Tuple[Tuple[int, int], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
+
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
+
"module": "_natten_cuda_31270f5.attn_merge",
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
build/torch213-cu126-x86_64-linux/{_natten_cuda_5fe9dbb.abi3.so → _natten_cuda_31270f5.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 103582312
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:35d0815e8879cb70cdefacbed69414ce1c03a8f550dab3646b054860a075dcfc
|
| 3 |
size 103582312
|
build/torch213-cu126-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _natten_cuda_31270f5
|
| 3 |
+
ops = torch.ops._natten_cuda_31270f5
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_natten_cuda_31270f5::{op_name}"
|
build/torch213-cu126-x86_64-linux/metadata.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
|
|
|
| 5 |
"kernels-minver": "0.14.0",
|
| 6 |
"license": "MIT",
|
| 7 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
@@ -22,8 +23,8 @@
|
|
| 22 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 23 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 24 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 25 |
-
"
|
| 26 |
-
"_ops.py": "
|
| 27 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 28 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 29 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
@@ -52,7 +53,7 @@
|
|
| 52 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 53 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 54 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 55 |
-
"symbols.json": "
|
| 56 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 57 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 58 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
@@ -72,12 +73,12 @@
|
|
| 72 |
},
|
| 73 |
"provenance": {
|
| 74 |
"kernel-builder": {
|
| 75 |
-
"version": "0.
|
| 76 |
-
"commit": "
|
| 77 |
"dirty": false
|
| 78 |
},
|
| 79 |
"kernel": {
|
| 80 |
-
"commit": "
|
| 81 |
"dirty": false
|
| 82 |
}
|
| 83 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "natten",
|
| 3 |
+
"id": "_natten_cuda_31270f5",
|
| 4 |
"version": 1,
|
| 5 |
+
"build-layout": "files",
|
| 6 |
"kernels-minver": "0.14.0",
|
| 7 |
"license": "MIT",
|
| 8 |
"upstream": "https://github.com/SHI-Labs/NATTEN",
|
|
|
|
| 23 |
"_environment.py": "9P189XTk2YMyWuRNI5eCI3UvHRqVR8Zh2hgJsHP7MYI=",
|
| 24 |
"_libnatten/__init__.py": "yMW+2Kd5Nxs716jaNq15IleYQ86HR5u7SMEQDqVVunI=",
|
| 25 |
"_libnatten/torch_wrappers.py": "v7vkrytkghNz+cJI7l2PXGqWactsSM1ImwCsHfyQ3iA=",
|
| 26 |
+
"_natten_cuda_31270f5.abi3.so": "NdCBXoh5y3DN76y+1pQUzhwDqPVQ2rNkawVIYKB13Pw=",
|
| 27 |
+
"_ops.py": "vzk3ldaPIUjmPzynSJNT3eXescYWsbmxBENeACy8WcA=",
|
| 28 |
"_private_for_testing.py": "Ir5abh5fQ1+9aqmmi7RqGhZybEvYV8JEnsrhzj558xw=",
|
| 29 |
"_types.py": "OzK1SfxBXbR01LDSzFOpvm5qUCLs3qOc021I31Eibm8=",
|
| 30 |
"attn_merge.py": "KDItp+YcD/18PEXqCOOxSBeLYYt50LhYZnyluE5iT7A=",
|
|
|
|
| 53 |
"context.py": "IzU+TvVnBZ41jc93BjQ7+/Q3Eg+8fDNSK4YCbTc2OU8=",
|
| 54 |
"functional.py": "zQq6Et4t+ywceLDcrQmiXYh2xpkRqSk1vBdHE7QsCGE=",
|
| 55 |
"modules.py": "1C3KPU4tOHIuRT+rOd6XVqPt98Ho/oehFEKOpwv445Q=",
|
| 56 |
+
"symbols.json": "UrDOuMsK8IE+RnVWVt4KeQR2kJ9QH15RD6+gjxAO9Ug=",
|
| 57 |
"token_permute/__init__.py": "NPxL8EMHxAxjHMcHTMFznH0oNQjGUr2divAbtGaWNhs=",
|
| 58 |
"token_permute/cutlass_impl.py": "nCXz+b8TJAbU/j0RiB0PMO94nqFZIvNxO9tKhLC/vDs=",
|
| 59 |
"token_permute/frontend.py": "mVlwIP2pjFEq/KHEiT9t9qE3Zl+pVpeeVhceclOIVOU=",
|
|
|
|
| 73 |
},
|
| 74 |
"provenance": {
|
| 75 |
"kernel-builder": {
|
| 76 |
+
"version": "0.19.0-dev1",
|
| 77 |
+
"commit": "b0bf5a2418da965879146c93b453166fe6df42fe",
|
| 78 |
"dirty": false
|
| 79 |
},
|
| 80 |
"kernel": {
|
| 81 |
+
"commit": "31270f5004b648862db9e8e0e97ce020324b0478",
|
| 82 |
"dirty": false
|
| 83 |
}
|
| 84 |
}
|
build/torch213-cu126-x86_64-linux/metadata.json.sigstore
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrOgAwIBAgIUL2Rb+lhv1TQprTdh+R+JrBThPeEwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMDMxMDUzNzIxWhcNMjYxMDMxMDU0NzIxWjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEsJ4Swm8ZRKw7D6orZ4Zo/UXLLXNm9ifmFBuNYaAy1MtmsSYgKVJxfoUKXwysopkxmI43XYQUVZFHSVec9uVmiqOCBdIwggXOMA4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tlogEntries":[{"logIndex":"3610607145", "logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion":{"kind":"hashedrekord", "version":"0.0.1"}, "integratedTime":"1793425042", "inclusionPromise":{"signedEntryTimestamp":"MEYCIQCa9V4EI57Rao22hpggavnv1rJUR7k8c4sBP4nrO7dJmAIhAOOL8TIAakNY0E7HQQT8WjfOtIBM3h1MN2F2eRIT8DJ+"}, "inclusionProof":{"logIndex":"3488702883", "rootHash":"RfS5YWMkTZOuZQ0CfQXn65Z/tWbaYkCYHe6UobZ859E=", "treeSize":"3488702885", "hashes":["08QFJNJlC27Pgj/xPepSFKfcwZZHDHG5PAHiHrLvW4o=", "ATQUGl86PSMskzlJ5+PNE54wryMVd656hs+QdusI/uc=", "DOrtS8rvYcK62HR7JZ3pU0z+UX2uFL6TidnhPjKVOSE=", "nlymWdvdDJVGPl/3x6P5MJFVNZ8Wxn4sNbGwpsp5w9Q=", "UnA7Q/ycZv69nqC078usjoOqN0K1OTS76oA9+Iu0wf4=", "IS7BRxVHxq9gK5ijkANMWvxvAoFlqBHq9KAs0Gy7u/8=", "SBGYBxDW1vPrRfLVzkfAmHztV8hjryENrdOwzfl6ZyE=", "VBzotYQmLUVA5ePORWBybjfF8sU+JIUW7rZp/8qaNu0=", "fekca6POtULZgxL4E227LPRKxnnaSJ3Uh9jKswvvyus=", "aBdy9Mluw4miV25uIiM8ZDgXQ/Pm23TTNnKRoEbAiY4=", "Y+QmLOVFahp7HO4KPdNyWDRkNIAKEmTb7WzFzoAi58s=", "C1iNsNunwIhtOOJvTDxee6pgbCkOjryTGo1g+5SLxEs=", "2khvWt9d+ZdJVlsE9c5CUGSWz42nP08VUkB5e4aYzxI=", "e3OaWwzL1tEWYXiUzGpH+1v9CiFPwweyfRzIh3Z+uO4=", "b+938HIdfjdD/+LgIs3AVRE3Wc65/1NSSAL4OJ5FUXE=", "kQz/4ND7LdhfAQn+idNsO+ZFC32sfkYRlh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U1VOQlZFVXRMUzB0TFFvPSJ9fX19"}], "timestampVerificationData":{"rfc3161Timestamps":[{"signedTimestamp":"MIICyDADAgEAMIICvwYJKoZIhvcNAQcCoIICsDCCAqwCAQMxDTALBglghkgBZQMEAgEwgbcGCyqGSIb3DQEJEAEEoIGnBIGkMIGhAgEBBgkrBgEEAYO/MAIwMTANBglghkgBZQMEAgEFAAQgi4XPw857NMBcNZ9VhKq86m9AtaRu7oelRUDb3QmRUpACFEh4HfnRD+/yu98jC3qE3nbeI+oTGA8yMDI2MTAzMTA1MzcyMVowAwIBAaAypDAwLjEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MRUwEwYDVQQDEwxzaWdzdG9yZS10c2GgADGCAdowggHWAgEBMFEwOTEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MSAwHgYDVQQDExdzaWdzdG9yZS10c2Etc2VsZnNpZ25lZAIUOhNULwyQYe68wUMvy4qOiyojiwwwCwYJYIZIAWUDBAIBoIH8MBoGCSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAcBgkqhkiG9w0BCQUxDxcNMjYxMDMxMDUzNzIxWjAvBgkqhkiG9w0BCQQxIgQg/au021XZxjmFtZ1t0VTBKFHqFCGGS9rCEA9XIF/7IVowgY4GCyqGSIb3DQEJEAIvMX8wfTB7MHkEIIX5J7wHq2LKw7RDVsEO/IGyxog/2nq55thw2dE6zQW3MFUwPaQ7MDkxFTATBgNVBAoTDHNpZ3N0b3JlLmRldjEgMB4GA1UEAxMXc2lnc3RvcmUtdHNhLXNlbGZzaWduZWQCFDoTVC8MkGHuvMFDL8uKjosqI4sMMAoGCCqGSM49BAMCBGYwZAIwBkBxbmNMBn45b8655WJVwfDXNzbmDUIz7MoB05PkW+98rNR020kFyyAgmp23JiqYAjALx3jmAKtHphzb53qJIR5FqgjRpIxUPtT+TBlxOVfTTDfIact1BGn225sEqOmOra0="}]}}, "messageSignature":{"messageDigest":{"algorithm":"SHA2_256", "digest":"7a/nhPxahBs2fqD0UIOEgO0r08pQteFqDDqWOCoz09I="}, "signature":"MEUCIQCMKs7wMTyefazNK7inyYjjpaAut0RJ/4WLTId11LRYfQIgZ62NtwwGUmfr2VzH2UqqWs7N7TdYioyBFpFFYCGDC3I="}}
|
|
|
|
| 1 |
+
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUAO9snsFNV8Jr2AnhkB1IDiOBgUUwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMTIxMDIwODM0WhcNMjYxMTIxMDIxODM0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDyti1kgfmj6pqED9rQHMeUyh1wXf98IYYSXwHwrnKrfAPBi9+VyEO6g5gSv6QIahYv+QrKv3URPVFeLZ7m2mXaOCBdEwggXNMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21tdW5pdHkvLmdpdGh1Yi93b3JrZmxvd3MvYnVpbGQueWFtbEByZWZzL2hlYWRzL21haW4wOQYKKwYBBAGDvzABAQQraHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbTAfBgorBgEEAYO/MAECBBF3b3JrZmxvd19kaXNwYXRjaDA2BgorBgEEAYO/MAEDBCgzMTI3MGY1MDA0YjY0ODg2MmRiOWU4ZTBlOTdjZTAyMDMyNGIwNDc4MBMGCisGAQQBg78wAQQEBUJ1aWxkMCsGCisGAQQBg78wAQUEHWh1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5MB0GCisGAQQBg78wAQYED3J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XR5L2FjdGlvbnMvcnVucy80NDc2OTQzOTc2My9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGh+9zNmAAABAMARzBFAiALafYysgxpYHaHO1om9E3yZXaNskAlBfanqXDhHXmt8AIhANG8xPoBD2fH8Xn6FVkTuEgjVaCSChsTvccnYxCnFRcgMAoGCCqGSM49BAMDA2gAMGUCMCe6/u3k6o7QIg7bFGi+j1xaWKkwJfzEh1fKm1otY68l7MD08/+9Yd9s0uK3RiTApAIxAOpCR2uW6HprkEK/Ye57yMOj0h155mpUeQfcKHn7OY27xGf2DdkGNpMnLP0UPZQCXQ=="},"tlogEntries":[{"logIndex":"4030899175","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1795226914","inclusionPromise":{"signedEntryTimestamp":"MEUCICecZFreT4bUE0xIx3BbDce8uqfvURNZiLEw32vhCXdjAiEA0oNetrGRH8HgrVPBDfWWqVh9+Y1wdxYKcGVJeeuJ5Lw="},"inclusionProof":{"logIndex":"3908994913","rootHash":"ZARv8ss9UZdx9hjtsnCqtc8PvmM/QfLKOEDCuRd5dms=","treeSize":"3908994927","hashes":["bG6CtDtYpFu7ybMEuErv12SVdJlqtaDlEkY59gIUDLA=","ZCgy6oTYO0StUn+d8bZnPQYX8nYyWWoK/C3jfLjd5Vo=","KdLN7UMhP89WXZ8sTZJ+Gk58TSzxx1zrfSg49/1do2Q=","NvW3TeUrN/SnSHJoWhIycTauPfTLHQp7sj7JzaUT2O4=","DxKkaRTS1ffWfcGr0PcKCdbUxpJcP7HRYnoWeDReqmw=","Sn+AYb1YmK/F8ECgo2559k4WGjzjfUn4ZJ5Uez+H9QM=","5oRByY8/02bxJIs1anwiqAupB2RQIY7TrW971Nmpp7U=","2Rt71WgMyU/zi7k9KFRPq73TsDJ1BAA/gysPhaaqHs0=","TnYSkn6gCmC0W5Q70zE/If/0imIiTSMfjYHSNR2/gjM=","CivKB4qQwJ/efmzlbMOtHzFomKxmPl8DgmrU1gXfJbc=","7QhOatgVp6PdYroLLtoCkd+z7p++GJEi0PhNT4miazY=","DR/+o4PSouaxmcHOoT8SiQ/FTcN40w8KhvkWSePwUJ8=","TPnMFjEJWAQvABxd6vVJvcXxcAgWGkz86YdUNbzNnFk=","0FJURNcUGshJHgD9JEae8FQR1/wcJoN4WGg13j5k0IA=","YeXlZ0RHqFK6gqq4hsyYMgKKSx51NRc7HQ7jbKFb4ys=","MgeocvNqIwqgvy0zDQHTAPpPoJl126Y9z+ySQHgYrk0=","bpivoC31PB5djfiSn6cC5GXF2dPZuOJdVxDafoiGndU=","XYkf+Vk9hVBebwq5KRpgAFIE2Jk4aAgO1jFr22tSd4k=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n3908994927\nZARv8ss9UZdx9hjtsnCqtc8PvmM/QfLKOEDCuRd5dms=\n\n— rekor.sigstore.dev wNI9ajBFAiByrayTkKBwJ4BSj0nsulbA0Blj69kaBoPw3xy6t1DLlAIhAIL5Rf4gUJrFknx4DBv2v8Qn9M3Ihlgco6ghHZFXWcAp\n"}},"canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2Iiw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DExdzaWdzdG9yZS10c2Etc2VsZnNpZ25lZAIUOhNULwyQYe68wUMvy4qOiyojiwwwCgYIKoZIzj0EAwIEaDBmAjEAt6mmr7cpnZqX8oRrmbp7zEC6ImqKfIxX80RfpgxPmwg/R292MZUq8LjQflzi0FB7AjEA+QHuFEcQUbuipnxtBoy7JOJLnbysZKOva/p5FOKbMZaKJlg/o5R3ywLdqGs49XlW"}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"0sayThGgWzDWk+zohbZfmmyDjsprWnjX0hoNLU+EKh8="},"signature":"MEUCIC5QGQ5L2b0K5hRpFFR3PitFtfJxtUIHUX61kOAtCcLUAiEA4MTmWK6tuOJvkiAFE9PF9AqeZRnuGTTs9wNBngs9Iv8="}}
|
build/torch213-cu126-x86_64-linux/symbols.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
-
"module": "
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
-
"module": "
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
-
"module": "
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
@@ -34,7 +34,7 @@
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
-
"module": "
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
-
"module": "
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
@@ -63,7 +63,7 @@
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
-
"module": "
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
@@ -81,18 +81,18 @@
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
-
"module": "
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
-
"return_annotation": "
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
-
"module": "
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
@@ -103,7 +103,7 @@
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
-
"module": "
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
@@ -114,7 +114,7 @@
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
-
"module": "
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
@@ -125,7 +125,7 @@
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
-
"module": "
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
@@ -136,7 +136,7 @@
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
-
"module": "
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
@@ -147,7 +147,7 @@
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
-
"module": "
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
-
"module": "
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
@@ -189,7 +189,7 @@
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
-
"module": "
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
@@ -200,7 +200,7 @@
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
-
"module": "
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
@@ -211,7 +211,7 @@
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
-
"module": "
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
@@ -241,7 +241,7 @@
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
-
"module": "
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
@@ -271,7 +271,7 @@
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
-
"module": "
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
@@ -301,7 +301,7 @@
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
-
"module": "
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
@@ -331,7 +331,7 @@
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
-
"module": "
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
@@ -355,13 +355,13 @@
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
-
"return_annotation": "List[Tuple[Tuple[int, int],
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
-
"module": "
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
@@ -391,7 +391,7 @@
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
-
"module": "
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
@@ -415,13 +415,13 @@
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
-
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]],
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
-
"module": "
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
@@ -451,7 +451,7 @@
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
-
"module": "
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
@@ -481,7 +481,7 @@
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
-
"module": "
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
@@ -511,7 +511,7 @@
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
-
"module": "
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
@@ -541,7 +541,7 @@
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
-
"module": "
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
@@ -571,7 +571,7 @@
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
-
"module": "
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
@@ -607,7 +607,7 @@
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
-
"module": "
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
@@ -643,7 +643,7 @@
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
-
"module": "
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
@@ -766,7 +766,7 @@
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
-
"annotation": "str |
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
@@ -787,7 +787,7 @@
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
-
"module": "
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
@@ -910,7 +910,7 @@
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
-
"annotation": "str |
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
@@ -931,7 +931,7 @@
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
-
"module": "
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
@@ -1054,7 +1054,7 @@
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
-
"annotation": "str |
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
@@ -1075,7 +1075,7 @@
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
-
"module": "
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
@@ -1198,7 +1198,7 @@
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
-
"annotation": "str |
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
@@ -1219,7 +1219,7 @@
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
-
"module": "
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 1,
|
| 3 |
+
"module": "_natten_cuda_31270f5",
|
| 4 |
"functions": [
|
| 5 |
{
|
| 6 |
"name": "are_deterministic_algorithms_enabled",
|
| 7 |
"qualname": "are_deterministic_algorithms_enabled",
|
| 8 |
+
"module": "_natten_cuda_31270f5.context",
|
| 9 |
"kind": "function",
|
| 10 |
"doc": null,
|
| 11 |
"signature": {
|
|
|
|
| 16 |
{
|
| 17 |
"name": "use_deterministic_algorithms",
|
| 18 |
"qualname": "use_deterministic_algorithms",
|
| 19 |
+
"module": "_natten_cuda_31270f5.context",
|
| 20 |
"kind": "function",
|
| 21 |
"doc": null,
|
| 22 |
"signature": {
|
|
|
|
| 34 |
{
|
| 35 |
"name": "use_kv_parallelism_in_fused_na",
|
| 36 |
"qualname": "use_kv_parallelism_in_fused_na",
|
| 37 |
+
"module": "_natten_cuda_31270f5.context",
|
| 38 |
"kind": "function",
|
| 39 |
"doc": "Sets guards for using KV Parallelism in backpropagation in `\"cutlass-fna\"`/`\"cutlass-fmha\"`\nbackends.\n\nWarning:\n Disabling KV parallelism can significantly slow down training, particularly in\n small-batch/head and large-token problems.\n\nArgs:\n mode: If `True`, allows KV parallelism (default setting), and otherwise disables it.",
|
| 40 |
"signature": {
|
|
|
|
| 52 |
{
|
| 53 |
"name": "is_kv_parallelism_in_fused_na_enabled",
|
| 54 |
"qualname": "is_kv_parallelism_in_fused_na_enabled",
|
| 55 |
+
"module": "_natten_cuda_31270f5.context",
|
| 56 |
"kind": "function",
|
| 57 |
"doc": "Returns whether KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"` backends is enabled.",
|
| 58 |
"signature": {
|
|
|
|
| 63 |
{
|
| 64 |
"name": "set_memory_usage_preference",
|
| 65 |
"qualname": "set_memory_usage_preference",
|
| 66 |
+
"module": "_natten_cuda_31270f5.context",
|
| 67 |
"kind": "function",
|
| 68 |
"doc": "Sets memory usage preference for KV parallelism in `\"cutlass-fna\"` and `\"cutlass-fmha\"`\nbackends.\n\nArgs:\n pref: Choices are `\"default\"`, `\"strict\"`, and `\"unrestricted\"`.",
|
| 69 |
"signature": {
|
|
|
|
| 81 |
{
|
| 82 |
"name": "get_memory_usage_preference",
|
| 83 |
"qualname": "get_memory_usage_preference",
|
| 84 |
+
"module": "_natten_cuda_31270f5.context",
|
| 85 |
"kind": "function",
|
| 86 |
"doc": null,
|
| 87 |
"signature": {
|
| 88 |
"parameters": [],
|
| 89 |
+
"return_annotation": "_natten_cuda_31270f5.context.MemoryUsagePreference"
|
| 90 |
}
|
| 91 |
},
|
| 92 |
{
|
| 93 |
"name": "is_memory_usage_default",
|
| 94 |
"qualname": "is_memory_usage_default",
|
| 95 |
+
"module": "_natten_cuda_31270f5.context",
|
| 96 |
"kind": "function",
|
| 97 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the default setting.",
|
| 98 |
"signature": {
|
|
|
|
| 103 |
{
|
| 104 |
"name": "is_memory_usage_strict",
|
| 105 |
"qualname": "is_memory_usage_strict",
|
| 106 |
+
"module": "_natten_cuda_31270f5.context",
|
| 107 |
"kind": "function",
|
| 108 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *restricted* setting.",
|
| 109 |
"signature": {
|
|
|
|
| 114 |
{
|
| 115 |
"name": "is_memory_usage_unrestricted",
|
| 116 |
"qualname": "is_memory_usage_unrestricted",
|
| 117 |
+
"module": "_natten_cuda_31270f5.context",
|
| 118 |
"kind": "function",
|
| 119 |
"doc": "Returns whether memory usage preference for KV parallelism in `\"cutlass-fna\"` and\n`\"cutlass-fmha\"` backends is the *unrestricted* setting.",
|
| 120 |
"signature": {
|
|
|
|
| 125 |
{
|
| 126 |
"name": "is_flex_compile_allowed",
|
| 127 |
"qualname": "is_flex_compile_allowed",
|
| 128 |
+
"module": "_natten_cuda_31270f5.context",
|
| 129 |
"kind": "function",
|
| 130 |
"doc": "Returns whether compilation is allowed in `\"flex-fna\"` and `\"flex-fmha\"` backends.",
|
| 131 |
"signature": {
|
|
|
|
| 136 |
{
|
| 137 |
"name": "is_flex_compile_backprop_allowed",
|
| 138 |
"qualname": "is_flex_compile_backprop_allowed",
|
| 139 |
+
"module": "_natten_cuda_31270f5.context",
|
| 140 |
"kind": "function",
|
| 141 |
"doc": "Returns whether compilation for backpropagation is allowed in `\"flex-fna\"` and `\"flex-fmha\"`\nbackends.",
|
| 142 |
"signature": {
|
|
|
|
| 147 |
{
|
| 148 |
"name": "allow_flex_compile",
|
| 149 |
"qualname": "allow_flex_compile",
|
| 150 |
+
"module": "_natten_cuda_31270f5.context",
|
| 151 |
"kind": "function",
|
| 152 |
"doc": "Sets guards for Flex Attention + `torch.compile`.\n\nAllows using our Flex FNA / Flex FMHA backends with `torch.compile`, meaning you can\npass `torch_compile=True` to the `na{1,2,3}d` or `attention` operation, along with\n`backend=\"flex-fna\"`/`backend=\"flex-fmha\"`, and NATTEN will compile the block-sparse mask, as\nwell as the attention operation using `torch.compile` for you.\n\nWarning:\n We have been *unable to verify the correctness* of this setting under all of our use\n cases. We are working on raising this issue with PyTorch directly, but until then we strongly\n recommend exercising caution when using this feature.\n\nDanger: backprop=True is strongly discouraged!\n Allowing `torch.compile` for backpropagation (detected by checking\n `tensor.requires_grad`) is guarded separately. We strongly recommend NOT using this setting, as\n it can impact your training results.\n\nArgs:\n mode: If `True`, enable compilation for forward pass, otherwise disable.\n backprop: If `True`, assuming compilation for forward pass is allowed, enable compilation\n for backward pass, otherwise disable.",
|
| 153 |
"signature": {
|
|
|
|
| 171 |
{
|
| 172 |
"name": "allow_flex_compile_backprop",
|
| 173 |
"qualname": "allow_flex_compile_backprop",
|
| 174 |
+
"module": "_natten_cuda_31270f5.context",
|
| 175 |
"kind": "function",
|
| 176 |
"doc": "Sets guards for Flex Attention + `torch.compile` for backpropagation only.\n\nArgs:\n mode: If `True`, enable compilation for backprop (assuming forward compilation is already\n enabled), otherwise disable.",
|
| 177 |
"signature": {
|
|
|
|
| 189 |
{
|
| 190 |
"name": "disable_flex_compile",
|
| 191 |
"qualname": "disable_flex_compile",
|
| 192 |
+
"module": "_natten_cuda_31270f5.context",
|
| 193 |
"kind": "function",
|
| 194 |
"doc": "Disallow Flex Attention + `torch.compile` entirely.",
|
| 195 |
"signature": {
|
|
|
|
| 200 |
{
|
| 201 |
"name": "disable_flex_compile_backprop",
|
| 202 |
"qualname": "disable_flex_compile_backprop",
|
| 203 |
+
"module": "_natten_cuda_31270f5.context",
|
| 204 |
"kind": "function",
|
| 205 |
"doc": "Disallow Flex Attention + `torch.compile` for backpropagation entirely.",
|
| 206 |
"signature": {
|
|
|
|
| 211 |
{
|
| 212 |
"name": "get_bwd_configs_for_cutlass_fmha",
|
| 213 |
"qualname": "get_bwd_configs_for_cutlass_fmha",
|
| 214 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 215 |
"kind": "function",
|
| 216 |
"doc": "Returns CUTLASS FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_size,\nbackward_kv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes in the *backward pass*.",
|
| 217 |
"signature": {
|
|
|
|
| 241 |
{
|
| 242 |
"name": "get_bwd_configs_for_cutlass_fna",
|
| 243 |
"qualname": "get_bwd_configs_for_cutlass_fna",
|
| 244 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 245 |
"kind": "function",
|
| 246 |
"doc": "Returns CUTLASS FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *backward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(backward_q_tile_shape,\nbackward_kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes* in the *backward pass*.",
|
| 247 |
"signature": {
|
|
|
|
| 271 |
{
|
| 272 |
"name": "get_configs_for_cutlass_fmha",
|
| 273 |
"qualname": "get_configs_for_cutlass_fmha",
|
| 274 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 275 |
"kind": "function",
|
| 276 |
"doc": "Returns CUTLASS FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 277 |
"signature": {
|
|
|
|
| 301 |
{
|
| 302 |
"name": "get_configs_for_cutlass_fna",
|
| 303 |
"qualname": "get_configs_for_cutlass_fna",
|
| 304 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 305 |
"kind": "function",
|
| 306 |
"doc": "Returns CUTLASS FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a device with compute capability >= 5.0, and if so,\nreturns *forward pass* configurations compatible with the specific compute capability, tensor\ndtype and head dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 307 |
"signature": {
|
|
|
|
| 331 |
{
|
| 332 |
"name": "get_configs_for_cutlass_hopper_fmha",
|
| 333 |
"qualname": "get_configs_for_cutlass_hopper_fmha",
|
| 334 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 335 |
"kind": "function",
|
| 336 |
"doc": "Returns Hopper FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one integer tuple, and another integer:\n`((q_tile_size, kv_tile_size), kernel_schedule)`. These are arguments to\n[natten.attention][natten.attention].\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[int, int], KernelSchedule]]): List of tuples of one tuple of two integers\n corresponding to query and KV tile sizes, and a kernel schedule enum type.",
|
| 337 |
"signature": {
|
|
|
|
| 355 |
"annotation": "torch.Tensor"
|
| 356 |
}
|
| 357 |
],
|
| 358 |
+
"return_annotation": "List[Tuple[Tuple[int, int], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 359 |
}
|
| 360 |
},
|
| 361 |
{
|
| 362 |
"name": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 363 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fmha",
|
| 364 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 365 |
"kind": "function",
|
| 366 |
"doc": "Returns Hopper FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is an integer tuple:\n`(backward_q_tile_size, backward_kv_tile_size)`. These are arguments to\n[natten.attention][natten.attention].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of integer tuples corresponding to query and KV tile sizes.",
|
| 367 |
"signature": {
|
|
|
|
| 391 |
{
|
| 392 |
"name": "get_configs_for_cutlass_hopper_fna",
|
| 393 |
"qualname": "get_configs_for_cutlass_hopper_fna",
|
| 394 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 395 |
"kind": "function",
|
| 396 |
"doc": "Returns Hopper FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *forward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of one tuple, and another integer:\n`((q_tile_shape, kv_tile_shape), kernel_schedule)`. These are arguments to\n[natten.na1d][natten.na1d], [natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\n`kernel_schedule` is specific to Hopper FNA/FMHA only.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[Tuple[tuple, tuple], KernelSchedule]]): List of tuples of one tuple of two\n shape tuples, corresponding to query and KV tile *shapes*, and a kernel schedule enum\n type.",
|
| 397 |
"signature": {
|
|
|
|
| 415 |
"annotation": "torch.Tensor"
|
| 416 |
}
|
| 417 |
],
|
| 418 |
+
"return_annotation": "List[Tuple[Tuple[Tuple[int], Tuple[int]] | Tuple[Tuple[int, int], Tuple[int, int]] | Tuple[Tuple[int, int, int], Tuple[int, int, int]], _natten_cuda_31270f5._types.KernelSchedule]]"
|
| 419 |
}
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"name": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 423 |
"qualname": "get_bwd_configs_for_cutlass_hopper_fna",
|
| 424 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 425 |
"kind": "function",
|
| 426 |
"doc": "Returns Hopper FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Hopper GPU (SM90; compute capability 9.0), and if so,\nreturns *backward pass* configurations compatible with the tensor dtype and head dim.\n\nEach configuration for this operation is a tuple of two tuples:\n`(q_tile_shape, kv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d],\n[natten.na2d][natten.na2d], and [natten.na3d][natten.na3d].\n\nNote that unlike forward pass, kernel schedule is not part of the configuration. All backward\npass kernels are persistent warp-specialized.\nSee CUTLASS's [example 88](https://github.com/NVIDIA/cutlass/tree/main/examples/88_hopper_fmha)\nfor more.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two shape tuples, corresponding to query and\n KV tile *shapes*.",
|
| 427 |
"signature": {
|
|
|
|
| 451 |
{
|
| 452 |
"name": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 453 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fmha",
|
| 454 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 455 |
"kind": "function",
|
| 456 |
"doc": "Returns Blackwell FMHA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 457 |
"signature": {
|
|
|
|
| 481 |
{
|
| 482 |
"name": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 483 |
"qualname": "get_bwd_configs_for_cutlass_blackwell_fna",
|
| 484 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 485 |
"kind": "function",
|
| 486 |
"doc": "Returns Blackwell FNA backward pass configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *backward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 487 |
"signature": {
|
|
|
|
| 511 |
{
|
| 512 |
"name": "get_configs_for_cutlass_blackwell_fmha",
|
| 513 |
"qualname": "get_configs_for_cutlass_blackwell_fmha",
|
| 514 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 515 |
"kind": "function",
|
| 516 |
"doc": "Returns Blackwell FMHA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 517 |
"signature": {
|
|
|
|
| 541 |
{
|
| 542 |
"name": "get_configs_for_cutlass_blackwell_fna",
|
| 543 |
"qualname": "get_configs_for_cutlass_blackwell_fna",
|
| 544 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 545 |
"kind": "function",
|
| 546 |
"doc": "Returns Blackwell FNA configurations compatible with input tensors, if any.\n\nChecks first if a CUDA tensor, and on a Blackwell datacenter GPU (SM100; compute capability\n10.0), and if so, returns *forward pass* configurations compatible with the tensor dtype and\nhead dim, and according to the rank of the token layout (1D/2D/3D).\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 547 |
"signature": {
|
|
|
|
| 571 |
{
|
| 572 |
"name": "get_configs_for_flex_fmha",
|
| 573 |
"qualname": "get_configs_for_flex_fmha",
|
| 574 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 575 |
"kind": "function",
|
| 576 |
"doc": "Returns Flex FMHA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integers: `(q_tile_size,\nkv_tile_size)`. These are arguments to [natten.attention][natten.attention].\nNot specifying these arguments while backend is Flex will default to `q_tile_size = 64` and\n`kv_tile_size = 64`.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[int, int]]): List of tuples of two integers corresponding to query and KV tile\n sizes.",
|
| 577 |
"signature": {
|
|
|
|
| 607 |
{
|
| 608 |
"name": "get_configs_for_flex_fna",
|
| 609 |
"qualname": "get_configs_for_flex_fna",
|
| 610 |
+
"module": "_natten_cuda_31270f5.backends.configs",
|
| 611 |
"kind": "function",
|
| 612 |
"doc": "Returns Flex FNA configurations compatible with input tensors, if any.\n\nEach configuration for this operation is a tuple of two integer tuples: `(q_tile_shape,\nkv_tile_shape)`. These are arguments to [natten.na1d][natten.na1d], [natten.na2d][natten.na2d],\nand [natten.na3d][natten.na3d].\nNot specifying these arguments while backend is Flex will default to single-dimensional tiling,\nand will not use our Token Permutation approach. By explicitly specifying tile shapes, you will\nautomatically use our Token Permutation approach, which saves you the most compute.\n\nArgs:\n query: Query tensor matching the shape, dtype, and device of your use case.\n key: Key tensor matching the shape, dtype, and device of your use case.\n value: Value tensor matching the shape, dtype, and device of your use case.\n torch_compile: Whether or not you intend to use compiled block mask and flex attention kernel.\n\nReturns:\n (List[Tuple[tuple, tuple]]): List of tuples of two integer tuples corresponding to query\n and KV tile *shapes*.",
|
| 613 |
"signature": {
|
|
|
|
| 643 |
{
|
| 644 |
"name": "na1d",
|
| 645 |
"qualname": "na1d",
|
| 646 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 647 |
"kind": "function",
|
| 648 |
"doc": "Computes 1-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen, heads_kv, head_dim_v]`)\n\n kernel_size (Tuple[int] | int): Neighborhood window (kernel) size.\n\n !!! note\n `kernel_size` must be smaller than or equal to `seqlen`.\n\n stride (Tuple[int] | int): Sliding window step size. Defaults to `1` (standard sliding\n window).\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size`.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int] | int): Dilation step size. Defaults to `1` (standard sliding window).\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n `seqlen`.\n\n is_causal (Tuple[bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the forward pass\n kernel. You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n kv_tile_shape (Tuple[int]): 1-D Tile shape for the key-value token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int]): 1-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int]): 1-D Tile shape for the key/value token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int]): Number of key/value tiles allowed to work in parallel in\n the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal, `kernel_size == seqlen`), NATTEN will also attempt to directly\n use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na1d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 649 |
"signature": {
|
|
|
|
| 766 |
"name": "kernel_schedule",
|
| 767 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 768 |
"default": "None",
|
| 769 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"name": "torch_compile",
|
|
|
|
| 787 |
{
|
| 788 |
"name": "na2d",
|
| 789 |
"qualname": "na2d",
|
| 790 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 791 |
"kind": "function",
|
| 792 |
"doc": "Computes 2-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 2-D query tensor, with the heads last layout:\n `[batch, X, Y, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n key (Tensor): 2-D key tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n value (Tensor): 2-D value tensor, with the heads last layout:\n `[batch, X, Y, heads_kv, head_dim_v]`, where token layout shape (feature map shape) is\n `(X, Y)`.\n\n kernel_size (Tuple[int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 2 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y)`) along\n every dimension.\n\n stride (Tuple[int, int] | int): Sliding window step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `stride=2` is reinterpreted as `stride=(2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 2 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y)`) along every dimension.\n\n is_causal (Tuple[bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 2 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the forward\n pass kernel. You can use [profiler](profiler.md) to find valid choices for your use\n case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int]): 2-D Tile shape for the query token layout in the\n backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int]): 2-D Tile shape for the key/value token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_splits (Tuple[int, int]): Number of key/value tiles allowed to work in parallel\n in the backward pass kernel. Like tile shapes, this is a tuple and not an integer for\n neighborhood attention operations, and the size of the tuple corresponds to the number\n of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na2d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 5-D output tensor, with the heads last layout\n (`[batch, X, Y, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 4-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, heads]`).",
|
| 793 |
"signature": {
|
|
|
|
| 910 |
"name": "kernel_schedule",
|
| 911 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 912 |
"default": "None",
|
| 913 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 914 |
},
|
| 915 |
{
|
| 916 |
"name": "torch_compile",
|
|
|
|
| 931 |
{
|
| 932 |
"name": "na3d",
|
| 933 |
"qualname": "na3d",
|
| 934 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 935 |
"kind": "function",
|
| 936 |
"doc": "Computes 3-D neighborhood attention.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fna` and\n`flex-fna` support GQA/MQA natively, and `cutlass-fna` and `hopper-fna` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 3-D query tensor, with the heads last layout:\n `[batch, X, Y, Z, heads, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n key (Tensor): 3-D key tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n value (Tensor): 3-D value tensor, with the heads last layout:\n `[batch, X, Y, Z, heads_kv, head_dim_V]`, where token layout shape (feature map shape) is\n `(X, Y, Z)`.\n\n kernel_size (Tuple[int, int, int] | int): Neighborhood window (kernel) size/shape. If an\n integer, it will be repeated for all 3 dimensions. For example `kernel_size=3` is\n reinterpreted as `kernel_size=(3, 3, 3)`.\n\n !!! note\n `kernel_size` must be smaller than or equal to token layout shape (`(X, Y, Z)`)\n along every dimension.\n\n stride (Tuple[int, int, int] | int): Sliding window step size/shape. Defaults to `1`\n (standard sliding window). If an integer, it will be repeated for all 3 dimensions.\n For example `stride=2` is reinterpreted as `stride=(2, 2, 2)`.\n\n !!! note\n `stride` must be smaller than or equal to `kernel_size` along every dimension.\n When `stride == kernel_size`, there will be no overlap between sliding windows,\n which is equivalent to blocked attention (a.k.a.\n [window self attention](https://arxiv.org/abs/2103.14030)).\n\n dilation (Tuple[int, int, int] | int): Dilation step size/shape. Defaults to `1` (standard\n sliding window). If an integer, it will be repeated for all 3 dimensions. For example\n `dilation=4` is reinterpreted as `dilation=(4, 4, 4)`.\n\n !!! note\n The product of `dilation` and `kernel_size` must be smaller than or equal to\n token layout shape (`(X, Y, Z)`) along every dimension.\n\n is_causal (Tuple[bool, bool, bool] | bool): Toggle causal masking. Defaults to `False`\n (bi-directional). If a boolean, it will be repeated for all 3 dimensions. For example\n `is_causal=True` is reinterpreted as `is_causal=(True, True, True)`.\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n additional_keys: `None` or 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to key tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n additional_values: `None` or 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`), corresponding to value tokens from some\n additional context. Used when performing neighborhood cross-attention, where `query`\n tokens attend to their neighborhood, as well as some fixed additional set of tokens.\n\n !!! note\n `additional_keys` and `additional_values` must both either be `Tensor`s, or both\n `None`s, and must match in shape.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fna\"`, `\"hopper-fna\"`, `\"blackwell-fna\"`, `\"flex-fna\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key-value token layout in the\n forward pass kernel. You can use [profiler](profiler.md) to find valid choices for your\n use case, and search for the best combination.\n\n backward_q_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the query token layout in\n the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case, and\n search for the best combination.\n\n backward_kv_tile_shape (Tuple[int, int, int]): 3-D Tile shape for the key/value token\n layout in the backward pass kernel. This is ignored by `\"flex-fna\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case,\n and search for the best combination.\n\n backward_kv_splits (Tuple[int, int, int]): Number of key/value tiles allowed to work in\n parallel in the backward pass kernel. Like tile shapes, this is a tuple and not an\n integer for neighborhood attention operations, and the size of the tuple corresponds to\n the number of dimensions / rank of the layout of tokens. This is only respected by the\n `\"cutlass-fna\"` backend, and only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fna\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fna\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fna\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n attention_kwargs: arguments to the [attention][natten.attention] operator, if used to\n implement neighborhood cross-attention, or self attention as a fast path for\n neighborhood attention.\n\n If `additional_{keys,values}` are specified, NATTEN usually performs a separate\n cross-attention using our [attention][natten.attention] operator, and\n [merges][natten.merge_attentions] the results.\n\n If for a given use case, the neighborhood attention problem is equivalent to self\n attention (not causal along any dims, `kernel_size == (X, Y, Z)`), NATTEN will also\n attempt to directly use [attention][natten.attention].\n\n You can override arguments to [attention][natten.attention] by passing a\n dictionary here.\n\n !!! example\n ```python\n out = na3d(\n q, k, v, kernel_size=kernel_size,\n ...,\n attention_kwargs={\n \"backend\": \"blackwell-fmha\",\n \"run_persistent_kernel\": True,\n }\n )\n ```\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 6-D output tensor, with the heads last layout\n (`[batch, X, Y, Z, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 5-D logsumexp tensor, with the\n heads last layout (`[batch, X, Y, Z, heads]`).",
|
| 937 |
"signature": {
|
|
|
|
| 1054 |
"name": "kernel_schedule",
|
| 1055 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1056 |
"default": "None",
|
| 1057 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1058 |
},
|
| 1059 |
{
|
| 1060 |
"name": "torch_compile",
|
|
|
|
| 1075 |
{
|
| 1076 |
"name": "attention",
|
| 1077 |
"qualname": "attention",
|
| 1078 |
+
"module": "_natten_cuda_31270f5.functional",
|
| 1079 |
"kind": "function",
|
| 1080 |
"doc": "Runs standard dot product attention.\n\nThis operation is used to implement neighborhood cross attention, in which we allow every\ntoken to interact with some additional context (`additional_keys` and `additional_values`\ntensors in [na1d][natten.na1d], [na2d][natten.na2d], and [na3d][natten.na3d]).\nThis operator is also used as a fast path for cases where neighborhood attention is equivalent\nto self attention (not causal along any dims, and `kernel_size` is equal to the number of input\ntokens).\n\nThis operation does not call into PyTorch's SDPA, and only runs one of the NATTEN backends\n(`cutlass-fmha`, `hopper-fmha`, `blackwell-fmha`, `flex-fmha`). Reasons for that include being\nable to control performance-related arguments, return logsumexp, and more.\nFor more information refer to [backends](backends.md).\n\nCausal mask, and Variable length (varlen) Attention are also supported in some backends\n(`cutlass-fmha` and `blackwell-fmha`).\n\nVarlen Attention is only supported for the sequence-packed layout: QKV tensors have batch size\n1, and tokens from different batches are concatenated without any padding along the sequence\ndimension. Sequence lengths for different batches can be provided in two ways:\n 1. `seqlens_Q` and `seqlens_KV` (less efficient): only provide the sequence lengths as\n integer tensors (must be on the same device as QKV), and NATTEN will compute cumulative\n and maximum sequence lengths on each call.\n This is **incompatible** with full-graph `torch.compile` since it requires a\n synchronization.\n 2. `cumulative_seqlen_{Q,KV}` and `max_seqlen_{Q,KV}` (more efficient):\n compute cumulative and maximum sequence lengths. `cumulative_seqlen_{Q,KV}` are integer\n tensors on the same device as QKV containing the cumulative sum of `seqlens_{Q,KV}`,\n with an additional `0` element in the beginning, therefore sized `batch+1`.\n `max_seqlen_{Q,KV}` are integers (not Tensors) that represent the maximum sequence\n lengths for Q and KV among all sequence batches.\n You can use `natten.utils.varlen.generate_varlen_parameters` to generate these\n parameters:\n ```python3\n from .utils.varlen import generate_varlen_parameters\n (\n cumulative_seqlen_Q,\n cumulative_seqlen_KV,\n max_seqlen_Q,\n max_seqlen_KV,\n ) = generate_varlen_parameters(q, k, v, seqlens_Q, seqlens_KV)\n ```\n As long as `generate_varlen_parameters` is called ahead of torch.compiling the model, it\n is supported without any graph breaks.\n\nGQA/MQA support (`heads != heads_kv`) is available. For now, `blackwell-fmha` and\n`flex-fmha` support GQA/MQA natively, and `cutlass-fmha` and `hopper-fmha` support it with\nexplicit repeats (increases memory usage and runtime).\n\nParameters:\n query (Tensor): 4-D query tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n key (Tensor): 4-D key tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim]`)\n\n value (Tensor): 4-D value tensor, with the heads last layout\n (`[batch, seqlen_kv, heads_kv, head_dim_v]`)\n\n is_causal (bool): Toggle causal masking. Defaults to `False` (bi-directional).\n\n scale (float): Attention scale. Defaults to `head_dim ** -0.5`.\n\n seqlens_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of query tokens in each batch. Must be passed together with\n `seqlens_KV`.\n\n seqlens_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch`\n indicating the number of key/value tokens in each batch. Must be passed together with\n `seqlens_Q`.\n\n cumulative_seqlen_Q (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of query tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_KV` and `max_seqlen_{Q,KV}`.\n\n cumulative_seqlen_KV (Optional[Tensor]): (varlen) Optional 1-D tensor with size `batch + 1`\n indicating the cumulative sum of number of key/value tokens in each batch, with an\n additional 0 element in the beginning. Must be passed together with\n `cumulative_seqlen_Q` and `max_seqlen_{Q,KV}`.\n\n max_seqlen_Q (Optional[int]): (varlen) Optional integer indicating the maximum query\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_KV`.\n\n max_seqlen_KV (Optional[int]): (varlen) Optional integer indicating the maximum key/value\n sequence length in all batches. Must be passed together with `cumulative_seqlen_{Q,KV}`\n and `max_seqlen_Q`.\n\nOther Parameters:\n backend (str): Backend implementation to run with. Choices are: `None` (pick the best\n available one), `\"cutlass-fmha\"`, `\"hopper-fmha\"`, `\"blackwell-fmha\"`, `\"flex-fmha\"`.\n Refer to [backends](backends.md) for more information.\n\n q_tile_size (int): Tile size along query sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n kv_tile_size (int): Tile size along key/value sequence length in the forward pass kernel.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_q_tile_size (int): Tile size along query sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_tile_size (int): Tile size along key/value sequence length in the backward pass\n kernel. This is ignored by `\"flex-fmha\"`.\n You can use [profiler](profiler.md) to find valid choices for your use case.\n\n backward_kv_splits (int): Number of key/value tiles allowed to work in parallel in the\n backward pass kernel. This is only respected by the `\"cutlass-fmha\"` backend, only when\n [KV parallelism](context.md#kv-parallelism-in-fna) is enabled.\n\n backward_use_pt_reduction (bool): Whether to use PyTorch eager for computing the `dO * O`\n product required by the backward pass, over the CUTLASS kernel. This only applies to\n the `\"cutlass-fmha\"` backend.\n\n run_persistent_kernel (bool): Whether to use persistent tile scheduling in the forward pass\n kernel. This only applies to the `\"blackwell-fmha\"` backend.\n\n kernel_schedule (Optional[str]): Kernel type (Hopper architecture only). Choices are\n `None`: pick the default, `\"non\"` (non-persistent), `\"coop\"` (warp-specialized\n cooperative), or `\"pp\"` (warp-specialized ping-ponging). Refer to\n [Hopper FMHA/FNA backend](backends.md#hopper-fna-fmha) for more information.\n\n torch_compile (bool): Applies only to the `\"flex-fmha\"` backend. Whether or not to JIT\n compile the attention kernel. Due to this being an experimental feature in PyTorch, we\n do not recommend it, and it is guarded by context flags. Read more in\n [Flex Attention + `torch.compile`](context.md#flex-attention-torchcompile).\n\n return_lse (bool): Whether or not to return the `logsumexp` tensor. `logsumexp` can be used\n in the backward pass, and for [attention merging][natten.merge_attentions].\n\nReturns:\n output (Tensor): 4-D output tensor, with the heads last layout\n (`[batch, seqlen, heads, head_dim_v]`).\n\n logsumexp (Tensor): only returned when `return_lse=True`. 3-D logsumexp tensor, with the\n heads last layout (`[batch, seqlen, heads]`).",
|
| 1081 |
"signature": {
|
|
|
|
| 1198 |
"name": "kernel_schedule",
|
| 1199 |
"kind": "POSITIONAL_OR_KEYWORD",
|
| 1200 |
"default": "None",
|
| 1201 |
+
"annotation": "str | _natten_cuda_31270f5._types.KernelSchedule | None"
|
| 1202 |
},
|
| 1203 |
{
|
| 1204 |
"name": "torch_compile",
|
|
|
|
| 1219 |
{
|
| 1220 |
"name": "merge_attentions",
|
| 1221 |
"qualname": "merge_attentions",
|
| 1222 |
+
"module": "_natten_cuda_31270f5.attn_merge",
|
| 1223 |
"kind": "function",
|
| 1224 |
"doc": "Takes multiple attention *outputs* originating from the same query tensor, and their\ncorresponding logsumexps, and merges them as if their context (key/value pair) had been\nconcatenated.\n\nThis operation is used to implement cross-neighborhood attention, and can also be used for\ndistributed setups, such as context-parallelism.\n\nThis operation also attempts to use `torch.compile` to fuse the elementwise operations. This\ncan be disabled by passing `torch_compile=False`.\n\nParameters:\n outputs (List[Tensor]): List of 4-D attention output tensors, with the heads last layout\n (`[batch, seqlen, heads, head_dim]`)\n\n lse_tensors (List[Tensor]): List of 3-D logsumexp tensors, with the heads last layout\n (`[batch, seqlen, heads]`)\n\n torch_compile (bool): Attempt to use `torch.compile` to fuse the underlying elementwise\n operations. Default: True.\n\n use_autograd_fix (bool): fix backpropagation by using a custom autograd function. Only\n compatible with fused attention operations (Flash/FMHA/FNA), only as long as the inputs\n of this function are (views) of outputs from said attention operation.\n NATTEN's tests (tests/test_attn_merge.py) only verify correctness for when using\n attention operations from NATTEN. Integration for non-NATTEN ops must be verified by the\n end user.\n This must be disabled when using unfused Attention, which includes Flex without\n torch.compile. Default: True.\n\nReturns:\n output (Tensor): merged attention output.\n\n logsumexp (Tensor): updated logsumexp.",
|
| 1225 |
"signature": {
|