Uploaded using `kernel-builder`.
Browse files
build/torch211-cxx11-cu128-x86_64-linux/__init__.py
CHANGED
|
@@ -7,6 +7,28 @@ import torch
|
|
| 7 |
from ._ops import add_op_namespace_prefix, ops
|
| 8 |
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
def sfa_size_bytes(rows: int, dim: int) -> int:
|
| 11 |
if rows <= 0 or dim <= 0 or dim % 16 != 0:
|
| 12 |
raise ValueError("rows must be positive and dim must be positive/divisible by 16")
|
|
@@ -714,6 +736,12 @@ def nvfp4_gemm_streamk_bias_bf16(
|
|
| 714 |
|
| 715 |
|
| 716 |
__all__ = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 717 |
"aligned_fp4_dim",
|
| 718 |
"cutlass_fp4_gemm_geglu_il_hw_v10",
|
| 719 |
"dequantize_fp4_sfa_fp16",
|
|
|
|
| 7 |
from ._ops import add_op_namespace_prefix, ops
|
| 8 |
|
| 9 |
|
| 10 |
+
NVFP4_BLOCK_SIZE = 16
|
| 11 |
+
NVFP4_SCALE_TILE_ROWS = 128
|
| 12 |
+
NVFP4_SCALE_TILE_BLOCKS = 4
|
| 13 |
+
SUPPORTED_LAYOUTS = ("row-major-packed-e2m1", "cutlass-sm1xx-blockscaled")
|
| 14 |
+
SUPPORTED_CUDA_CAPABILITIES = ("11.0a", "12.0a")
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
def capabilities() -> dict[str, object]:
|
| 18 |
+
"""Return the public Tensor API contract used by runtime dispatchers."""
|
| 19 |
+
return {
|
| 20 |
+
"quantization": "W4A4 NVFP4 E2M1",
|
| 21 |
+
"block_size": NVFP4_BLOCK_SIZE,
|
| 22 |
+
"scale_layout": "pad128(rows) x pad4(dim/16), 512 bytes per tile",
|
| 23 |
+
"scale_size": "ceil(rows/128) * ceil((dim/16)/4) * 512 bytes",
|
| 24 |
+
"layouts": SUPPORTED_LAYOUTS,
|
| 25 |
+
"cuda_capabilities": SUPPORTED_CUDA_CAPABILITIES,
|
| 26 |
+
"public_m_alignment": 1,
|
| 27 |
+
"raw_sm120_tile_m": 128,
|
| 28 |
+
"errors": "exceptions",
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
|
| 32 |
def sfa_size_bytes(rows: int, dim: int) -> int:
|
| 33 |
if rows <= 0 or dim <= 0 or dim % 16 != 0:
|
| 34 |
raise ValueError("rows must be positive and dim must be positive/divisible by 16")
|
|
|
|
| 736 |
|
| 737 |
|
| 738 |
__all__ = [
|
| 739 |
+
"NVFP4_BLOCK_SIZE",
|
| 740 |
+
"NVFP4_SCALE_TILE_ROWS",
|
| 741 |
+
"NVFP4_SCALE_TILE_BLOCKS",
|
| 742 |
+
"SUPPORTED_CUDA_CAPABILITIES",
|
| 743 |
+
"SUPPORTED_LAYOUTS",
|
| 744 |
+
"capabilities",
|
| 745 |
"aligned_fp4_dim",
|
| 746 |
"cutlass_fp4_gemm_geglu_il_hw_v10",
|
| 747 |
"dequantize_fp4_sfa_fp16",
|
build/torch211-cxx11-cu128-x86_64-linux/{_fp4_gemm_cuda_e79264b.abi3.so → _fp4_gemm_cuda_3cf453b.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:78c2183adc8195e0645609429ddbae0cf3130513c8841b99d0659ca20e71dd8d
|
| 3 |
+
size 2093080
|
build/torch211-cxx11-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 _fp4_gemm_cuda_3cf453b
|
| 3 |
+
ops = torch.ops._fp4_gemm_cuda_3cf453b
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_fp4_gemm_cuda_3cf453b::{op_name}"
|
build/torch211-cxx11-cu128-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": [],
|
|
@@ -13,10 +13,21 @@
|
|
| 13 |
"digest": {
|
| 14 |
"algorithm": "sha256",
|
| 15 |
"files": {
|
| 16 |
-
"__init__.py": "
|
| 17 |
-
"
|
| 18 |
-
"_ops.py": "
|
| 19 |
"fp4_gemm/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 20 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
}
|
| 22 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "fp4-gemm",
|
| 3 |
+
"id": "_fp4_gemm_cuda_3cf453b",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
|
|
| 13 |
"digest": {
|
| 14 |
"algorithm": "sha256",
|
| 15 |
"files": {
|
| 16 |
+
"__init__.py": "lJLCqFZi1vLuBzLeaNpAAfy/5/sHKv/E70REf7nu6ds=",
|
| 17 |
+
"_fp4_gemm_cuda_3cf453b.abi3.so": "eMIYOtyBleBkVglCnduuDPMTBRPIhBuZ0GWcog5x3Y0=",
|
| 18 |
+
"_ops.py": "htjsKuSbtwjw+R6PK+Wg4yiVz73RQvTzuJae/Up8mFU=",
|
| 19 |
"fp4_gemm/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 20 |
}
|
| 21 |
+
},
|
| 22 |
+
"provenance": {
|
| 23 |
+
"kernel-builder": {
|
| 24 |
+
"version": "0.17.0-dev0",
|
| 25 |
+
"sha": "b39ca23f1b36383df00b27b3ffe1276cd5dbea85",
|
| 26 |
+
"dirty": false
|
| 27 |
+
},
|
| 28 |
+
"kernel": {
|
| 29 |
+
"sha": "3cf453b28a019b4703dc3a8092eb6badc8f2b18c",
|
| 30 |
+
"dirty": false
|
| 31 |
+
}
|
| 32 |
}
|
| 33 |
}
|