Publish torch213-cxx11-cu130-x86_64-linux
Browse files
build/torch213-cxx11-cu130-x86_64-linux/__init__.py
CHANGED
|
@@ -127,6 +127,13 @@ def _gemm_warpsplit_mrows_fake(a_packed, b_packed, sfa, sfb, out, alpha: float =
|
|
| 127 |
return None
|
| 128 |
|
| 129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
@torch.library.register_fake(add_op_namespace_prefix("fp4_w4a4_gemv_warpsplit_bf16"))
|
| 131 |
def _gemv_warpsplit_fake(a_packed, b_packed, sfa, sfb, out, alpha: float = 1.0, warps: int = 4, stages: int = 4) -> None:
|
| 132 |
if a_packed.shape[0] != 1:
|
|
@@ -257,6 +264,11 @@ def _quant_bf16_fake(x: torch.Tensor, packed: torch.Tensor, sfa: torch.Tensor, i
|
|
| 257 |
return None
|
| 258 |
|
| 259 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 260 |
@torch.library.register_fake(add_op_namespace_prefix("dequantize_fp4_sfa_fp16"))
|
| 261 |
def _dequant_fake(packed: torch.Tensor, sfa: torch.Tensor, out: torch.Tensor, is_sfb: bool = False) -> None:
|
| 262 |
return None
|
|
@@ -468,6 +480,19 @@ def quantize_fp4_sfa_bf16(
|
|
| 468 |
return packed, sfa
|
| 469 |
|
| 470 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 471 |
def dequantize_fp4_sfa_fp16(
|
| 472 |
packed: torch.Tensor,
|
| 473 |
sfa: torch.Tensor,
|
|
@@ -683,6 +708,31 @@ def fp4_w4a4_gemm_warpsplit_mrows_bf16(
|
|
| 683 |
return out
|
| 684 |
|
| 685 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 686 |
def fp4_w4a4_gemv_warpsplit_bf16(
|
| 687 |
a_packed: torch.Tensor,
|
| 688 |
b_packed: torch.Tensor,
|
|
@@ -1062,6 +1112,7 @@ __all__ = [
|
|
| 1062 |
"fp4_w4a4_gemv_warpsplit_bf16",
|
| 1063 |
"fp4_w4a4_gemv_warpsplit_interleaved_bf16",
|
| 1064 |
"fp4_w4a4_gemm_warpsplit_mrows_bf16",
|
|
|
|
| 1065 |
"nvfp4_gemm_bf16",
|
| 1066 |
"nvfp4_gemm_fp16",
|
| 1067 |
"nvfp4_gemm_variant_bf16",
|
|
@@ -1087,5 +1138,6 @@ __all__ = [
|
|
| 1087 |
"pack_nvfp4_weight_bf16",
|
| 1088 |
"quantize_e0m3_sfa_fp16",
|
| 1089 |
"quantize_fp4_sfa_bf16",
|
|
|
|
| 1090 |
"sfa_size_bytes",
|
| 1091 |
]
|
|
|
|
| 127 |
return None
|
| 128 |
|
| 129 |
|
| 130 |
+
@torch.library.register_fake(add_op_namespace_prefix("fp4_w4a4_gemm_warpsplit_mrows_pdl_bf16"))
|
| 131 |
+
def _gemm_warpsplit_mrows_pdl_fake(a_packed, b_packed, sfa, sfb, out, alpha: float = 1.0, warps: int = 2, stages: int = 6) -> None:
|
| 132 |
+
return _gemm_warpsplit_mrows_fake(
|
| 133 |
+
a_packed, b_packed, sfa, sfb, out, alpha, warps, stages
|
| 134 |
+
)
|
| 135 |
+
|
| 136 |
+
|
| 137 |
@torch.library.register_fake(add_op_namespace_prefix("fp4_w4a4_gemv_warpsplit_bf16"))
|
| 138 |
def _gemv_warpsplit_fake(a_packed, b_packed, sfa, sfb, out, alpha: float = 1.0, warps: int = 4, stages: int = 4) -> None:
|
| 139 |
if a_packed.shape[0] != 1:
|
|
|
|
| 264 |
return None
|
| 265 |
|
| 266 |
|
| 267 |
+
@torch.library.register_fake(add_op_namespace_prefix("quantize_fp4_sfa_bf16_pdl"))
|
| 268 |
+
def _quant_bf16_pdl_fake(x: torch.Tensor, packed: torch.Tensor, sfa: torch.Tensor, is_sfb: bool = False) -> None:
|
| 269 |
+
return None
|
| 270 |
+
|
| 271 |
+
|
| 272 |
@torch.library.register_fake(add_op_namespace_prefix("dequantize_fp4_sfa_fp16"))
|
| 273 |
def _dequant_fake(packed: torch.Tensor, sfa: torch.Tensor, out: torch.Tensor, is_sfb: bool = False) -> None:
|
| 274 |
return None
|
|
|
|
| 480 |
return packed, sfa
|
| 481 |
|
| 482 |
|
| 483 |
+
def quantize_fp4_sfa_bf16_pdl(
|
| 484 |
+
x: torch.Tensor,
|
| 485 |
+
packed: torch.Tensor | None = None,
|
| 486 |
+
sfa: torch.Tensor | None = None,
|
| 487 |
+
is_sfb: bool = False,
|
| 488 |
+
):
|
| 489 |
+
"""PDL-enabled twin of :func:`quantize_fp4_sfa_bf16`."""
|
| 490 |
+
if packed is None or sfa is None:
|
| 491 |
+
packed, sfa = _alloc_fp4(x.shape[0], x.shape[1], x.device)
|
| 492 |
+
ops.quantize_fp4_sfa_bf16_pdl(x, packed, sfa, bool(is_sfb))
|
| 493 |
+
return packed, sfa
|
| 494 |
+
|
| 495 |
+
|
| 496 |
def dequantize_fp4_sfa_fp16(
|
| 497 |
packed: torch.Tensor,
|
| 498 |
sfa: torch.Tensor,
|
|
|
|
| 708 |
return out
|
| 709 |
|
| 710 |
|
| 711 |
+
def fp4_w4a4_gemm_warpsplit_mrows_pdl_bf16(
|
| 712 |
+
a_packed: torch.Tensor,
|
| 713 |
+
b_packed: torch.Tensor,
|
| 714 |
+
sfa: torch.Tensor,
|
| 715 |
+
sfb: torch.Tensor,
|
| 716 |
+
*,
|
| 717 |
+
alpha: float = 1.0,
|
| 718 |
+
warps: int = 2,
|
| 719 |
+
stages: int = 6,
|
| 720 |
+
out: Optional[torch.Tensor] = None,
|
| 721 |
+
) -> torch.Tensor:
|
| 722 |
+
"""PDL-enabled twin of the SM120 M<=16 warp-split GEMM."""
|
| 723 |
+
if out is None:
|
| 724 |
+
out = torch.empty(
|
| 725 |
+
(a_packed.shape[0], b_packed.shape[0]),
|
| 726 |
+
device=a_packed.device,
|
| 727 |
+
dtype=torch.bfloat16,
|
| 728 |
+
)
|
| 729 |
+
ops.fp4_w4a4_gemm_warpsplit_mrows_pdl_bf16(
|
| 730 |
+
a_packed, b_packed, sfa, sfb, out,
|
| 731 |
+
float(alpha), int(warps), int(stages),
|
| 732 |
+
)
|
| 733 |
+
return out
|
| 734 |
+
|
| 735 |
+
|
| 736 |
def fp4_w4a4_gemv_warpsplit_bf16(
|
| 737 |
a_packed: torch.Tensor,
|
| 738 |
b_packed: torch.Tensor,
|
|
|
|
| 1112 |
"fp4_w4a4_gemv_warpsplit_bf16",
|
| 1113 |
"fp4_w4a4_gemv_warpsplit_interleaved_bf16",
|
| 1114 |
"fp4_w4a4_gemm_warpsplit_mrows_bf16",
|
| 1115 |
+
"fp4_w4a4_gemm_warpsplit_mrows_pdl_bf16",
|
| 1116 |
"nvfp4_gemm_bf16",
|
| 1117 |
"nvfp4_gemm_fp16",
|
| 1118 |
"nvfp4_gemm_variant_bf16",
|
|
|
|
| 1138 |
"pack_nvfp4_weight_bf16",
|
| 1139 |
"quantize_e0m3_sfa_fp16",
|
| 1140 |
"quantize_fp4_sfa_bf16",
|
| 1141 |
+
"quantize_fp4_sfa_bf16_pdl",
|
| 1142 |
"sfa_size_bytes",
|
| 1143 |
]
|
build/torch213-cxx11-cu130-x86_64-linux/_fp4_gemm_cuda_d0297c9.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:53fcef343db9da31b616727c11c8c71d298383eaca65d95547b0fab907bff372
|
| 3 |
+
size 11046856
|
build/torch213-cxx11-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 _fp4_gemm_cuda_d0297c9
|
| 3 |
+
ops = torch.ops._fp4_gemm_cuda_d0297c9
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_fp4_gemm_cuda_d0297c9::{op_name}"
|
build/torch213-cxx11-cu130-x86_64-linux/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "fp4-gemm",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
@@ -14,9 +14,9 @@
|
|
| 14 |
"digest": {
|
| 15 |
"algorithm": "sha256",
|
| 16 |
"files": {
|
| 17 |
-
"__init__.py": "
|
| 18 |
-
"
|
| 19 |
-
"_ops.py": "
|
| 20 |
"fp4_gemm/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 21 |
}
|
| 22 |
},
|
|
@@ -27,7 +27,7 @@
|
|
| 27 |
"dirty": false
|
| 28 |
},
|
| 29 |
"kernel": {
|
| 30 |
-
"sha": "
|
| 31 |
"dirty": false
|
| 32 |
}
|
| 33 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "fp4-gemm",
|
| 3 |
+
"id": "_fp4_gemm_cuda_d0297c9",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
|
|
| 14 |
"digest": {
|
| 15 |
"algorithm": "sha256",
|
| 16 |
"files": {
|
| 17 |
+
"__init__.py": "vJAc910iyL+GomTQLPDvl5MM5X0d6a8RzdQ/SV/BiQ8=",
|
| 18 |
+
"_fp4_gemm_cuda_d0297c9.abi3.so": "U/zvND252jG2FnJ8EcjHHSmDg+rKZdlVR7D6uQe/83I=",
|
| 19 |
+
"_ops.py": "mFWrViw+mMqyMmt/TuyUUNjzunMWYkC4JH0mqbPp6KQ=",
|
| 20 |
"fp4_gemm/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 21 |
}
|
| 22 |
},
|
|
|
|
| 27 |
"dirty": false
|
| 28 |
},
|
| 29 |
"kernel": {
|
| 30 |
+
"sha": "d0297c93d91ab430899d09ba9f9bd1c05fbfc9f9",
|
| 31 |
"dirty": false
|
| 32 |
}
|
| 33 |
}
|