Marc Sun commited on
Commit ·
2c9588b
1
Parent(s): 0becb0a
Refresh the Metal builds for the 20-type table
Browse filesBuilt from a clean tree at 0becb0a, so the variants carry that revision rather than a dirty stamp.
104 tests pass against torch212-metal on this machine.
- .gitattributes +2 -4
- build/torch212-metal-aarch64-darwin/__init__.py +10 -3
- build/torch212-metal-aarch64-darwin/{_gguf_kernels_metal_49187c6.abi3.so → _gguf_kernels_metal_0becb0a.abi3.so} +2 -2
- build/torch212-metal-aarch64-darwin/_ops.py +3 -3
- build/torch212-metal-aarch64-darwin/metadata.json +5 -5
- build/torch213-metal-aarch64-darwin/__init__.py +10 -3
- build/torch213-metal-aarch64-darwin/{_gguf_kernels_metal_49187c6.abi3.so → _gguf_kernels_metal_0becb0a.abi3.so} +2 -2
- build/torch213-metal-aarch64-darwin/_ops.py +3 -3
- build/torch213-metal-aarch64-darwin/metadata.json +5 -5
.gitattributes
CHANGED
|
@@ -48,7 +48,5 @@ build/torch211-cxx11-cu130-x86_64-linux/_gguf_kernels_cuda_e4e2164.abi3.so filte
|
|
| 48 |
build/torch212-cxx11-cu126-x86_64-linux/_gguf_kernels_cuda_e4e2164.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 49 |
build/torch212-cxx11-cu130-x86_64-linux/_gguf_kernels_cuda_e4e2164.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 50 |
build/torch212-cxx11-cu132-x86_64-linux/_gguf_kernels_cuda_e4e2164.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 51 |
-
build/torch212-metal-aarch64-darwin/
|
| 52 |
-
build/torch213-metal-aarch64-darwin/
|
| 53 |
-
build/torch212-metal-aarch64-darwin/_gguf_kernels_metal_49187c6.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 54 |
-
build/torch213-metal-aarch64-darwin/_gguf_kernels_metal_49187c6.abi3.so filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 48 |
build/torch212-cxx11-cu126-x86_64-linux/_gguf_kernels_cuda_e4e2164.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 49 |
build/torch212-cxx11-cu130-x86_64-linux/_gguf_kernels_cuda_e4e2164.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 50 |
build/torch212-cxx11-cu132-x86_64-linux/_gguf_kernels_cuda_e4e2164.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
build/torch212-metal-aarch64-darwin/_gguf_kernels_metal_0becb0a.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
build/torch213-metal-aarch64-darwin/_gguf_kernels_metal_0becb0a.abi3.so filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
build/torch212-metal-aarch64-darwin/__init__.py
CHANGED
|
@@ -20,9 +20,16 @@ __all__ = ["GEMV_TYPES", "MAX_GEMV_ROWS", "dequantize", "mul_mat_vec"]
|
|
| 20 |
# caller with more (prefill) dequantizes and uses an ordinary matmul.
|
| 21 |
MAX_GEMV_ROWS = 8
|
| 22 |
|
| 23 |
-
# ggml type ids `mul_mat_vec` implements
|
| 24 |
-
#
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
def dequantize(
|
|
|
|
| 20 |
# caller with more (prefill) dequantizes and uses an ordinary matmul.
|
| 21 |
MAX_GEMV_ROWS = 8
|
| 22 |
|
| 23 |
+
# ggml type ids `mul_mat_vec` implements, as this build reports them -- it is backend-specific, and
|
| 24 |
+
# a type routed into a gemv that has no kernel for it is a fault, not a fallback. CUDA covers
|
| 25 |
+
# Q4_0/Q4_1/Q5_0/Q5_1/Q8_0, the K quants, the IQ quants, MXFP4/NVFP4 and Q1_0/Q2_0; Metal is the
|
| 26 |
+
# same minus NVFP4/Q1_0/Q2_0, which its metallib has no kernels for. `dequantize` covers more, so
|
| 27 |
+
# check this before choosing the fused path.
|
| 28 |
+
try:
|
| 29 |
+
GEMV_TYPES = frozenset(ops.gemv_types())
|
| 30 |
+
except AttributeError:
|
| 31 |
+
# A build published before `gemv_types` existed; those are CUDA-only, so its list is theirs.
|
| 32 |
+
GEMV_TYPES = frozenset({2, 3, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 29, 39, 40, 41, 42})
|
| 33 |
|
| 34 |
|
| 35 |
def dequantize(
|
build/torch212-metal-aarch64-darwin/{_gguf_kernels_metal_49187c6.abi3.so → _gguf_kernels_metal_0becb0a.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b369cc5b468e2fd3b9ac84f5c63897a52bc25e0381c37104d11d0956f5ad4dd9
|
| 3 |
+
size 7403104
|
build/torch212-metal-aarch64-darwin/_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 _gguf_kernels_metal_0becb0a
|
| 3 |
+
ops = torch.ops._gguf_kernels_metal_0becb0a
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_gguf_kernels_metal_0becb0a::{op_name}"
|
build/torch212-metal-aarch64-darwin/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "gguf-kernels",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "MIT",
|
| 6 |
"python-depends": [],
|
|
@@ -10,9 +10,9 @@
|
|
| 10 |
"digest": {
|
| 11 |
"algorithm": "sha256",
|
| 12 |
"files": {
|
| 13 |
-
"__init__.py": "
|
| 14 |
-
"
|
| 15 |
-
"_ops.py": "
|
| 16 |
}
|
| 17 |
},
|
| 18 |
"provenance": {
|
|
@@ -22,7 +22,7 @@
|
|
| 22 |
"dirty": false
|
| 23 |
},
|
| 24 |
"kernel": {
|
| 25 |
-
"sha": "
|
| 26 |
"dirty": false
|
| 27 |
}
|
| 28 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "gguf-kernels",
|
| 3 |
+
"id": "_gguf_kernels_metal_0becb0a",
|
| 4 |
"version": 1,
|
| 5 |
"license": "MIT",
|
| 6 |
"python-depends": [],
|
|
|
|
| 10 |
"digest": {
|
| 11 |
"algorithm": "sha256",
|
| 12 |
"files": {
|
| 13 |
+
"__init__.py": "GoFcHJbbJ9C8b40XNznMxsTcC+CV9kaFE8a1DP763kU=",
|
| 14 |
+
"_gguf_kernels_metal_0becb0a.abi3.so": "s2nMW0aOL9O5rIT1xjiXpSvCXgOBw3EE0R0JVvWtTdk=",
|
| 15 |
+
"_ops.py": "3htLDPFBO8zVroZkTqPmryb9pDPjZ5OuMItEBg94Jp4="
|
| 16 |
}
|
| 17 |
},
|
| 18 |
"provenance": {
|
|
|
|
| 22 |
"dirty": false
|
| 23 |
},
|
| 24 |
"kernel": {
|
| 25 |
+
"sha": "0becb0aafe12b27da05fa08f4b6cc7c72b288fbb",
|
| 26 |
"dirty": false
|
| 27 |
}
|
| 28 |
}
|
build/torch213-metal-aarch64-darwin/__init__.py
CHANGED
|
@@ -20,9 +20,16 @@ __all__ = ["GEMV_TYPES", "MAX_GEMV_ROWS", "dequantize", "mul_mat_vec"]
|
|
| 20 |
# caller with more (prefill) dequantizes and uses an ordinary matmul.
|
| 21 |
MAX_GEMV_ROWS = 8
|
| 22 |
|
| 23 |
-
# ggml type ids `mul_mat_vec` implements
|
| 24 |
-
#
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
def dequantize(
|
|
|
|
| 20 |
# caller with more (prefill) dequantizes and uses an ordinary matmul.
|
| 21 |
MAX_GEMV_ROWS = 8
|
| 22 |
|
| 23 |
+
# ggml type ids `mul_mat_vec` implements, as this build reports them -- it is backend-specific, and
|
| 24 |
+
# a type routed into a gemv that has no kernel for it is a fault, not a fallback. CUDA covers
|
| 25 |
+
# Q4_0/Q4_1/Q5_0/Q5_1/Q8_0, the K quants, the IQ quants, MXFP4/NVFP4 and Q1_0/Q2_0; Metal is the
|
| 26 |
+
# same minus NVFP4/Q1_0/Q2_0, which its metallib has no kernels for. `dequantize` covers more, so
|
| 27 |
+
# check this before choosing the fused path.
|
| 28 |
+
try:
|
| 29 |
+
GEMV_TYPES = frozenset(ops.gemv_types())
|
| 30 |
+
except AttributeError:
|
| 31 |
+
# A build published before `gemv_types` existed; those are CUDA-only, so its list is theirs.
|
| 32 |
+
GEMV_TYPES = frozenset({2, 3, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 29, 39, 40, 41, 42})
|
| 33 |
|
| 34 |
|
| 35 |
def dequantize(
|
build/torch213-metal-aarch64-darwin/{_gguf_kernels_metal_49187c6.abi3.so → _gguf_kernels_metal_0becb0a.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59d0c2717f44308bc965b82e520cce45b0a6f7e496bc9e95dfc2367dbc75f441
|
| 3 |
+
size 7403104
|
build/torch213-metal-aarch64-darwin/_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 _gguf_kernels_metal_0becb0a
|
| 3 |
+
ops = torch.ops._gguf_kernels_metal_0becb0a
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_gguf_kernels_metal_0becb0a::{op_name}"
|
build/torch213-metal-aarch64-darwin/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "gguf-kernels",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "MIT",
|
| 6 |
"python-depends": [],
|
|
@@ -10,9 +10,9 @@
|
|
| 10 |
"digest": {
|
| 11 |
"algorithm": "sha256",
|
| 12 |
"files": {
|
| 13 |
-
"__init__.py": "
|
| 14 |
-
"
|
| 15 |
-
"_ops.py": "
|
| 16 |
}
|
| 17 |
},
|
| 18 |
"provenance": {
|
|
@@ -22,7 +22,7 @@
|
|
| 22 |
"dirty": false
|
| 23 |
},
|
| 24 |
"kernel": {
|
| 25 |
-
"sha": "
|
| 26 |
"dirty": false
|
| 27 |
}
|
| 28 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "gguf-kernels",
|
| 3 |
+
"id": "_gguf_kernels_metal_0becb0a",
|
| 4 |
"version": 1,
|
| 5 |
"license": "MIT",
|
| 6 |
"python-depends": [],
|
|
|
|
| 10 |
"digest": {
|
| 11 |
"algorithm": "sha256",
|
| 12 |
"files": {
|
| 13 |
+
"__init__.py": "GoFcHJbbJ9C8b40XNznMxsTcC+CV9kaFE8a1DP763kU=",
|
| 14 |
+
"_gguf_kernels_metal_0becb0a.abi3.so": "WdDCcX9EMIvJZbguUgzORbCm9+SWvJ6V38I2fbx19EE=",
|
| 15 |
+
"_ops.py": "3htLDPFBO8zVroZkTqPmryb9pDPjZ5OuMItEBg94Jp4="
|
| 16 |
}
|
| 17 |
},
|
| 18 |
"provenance": {
|
|
|
|
| 22 |
"dirty": false
|
| 23 |
},
|
| 24 |
"kernel": {
|
| 25 |
+
"sha": "0becb0aafe12b27da05fa08f4b6cc7c72b288fbb",
|
| 26 |
"dirty": false
|
| 27 |
}
|
| 28 |
}
|