liangsu9988 commited on
Commit
accd8fb
·
verified ·
1 Parent(s): edada1b

Uploaded using `kernel-builder`.

Browse files
build/torch211-cxx11-cu128-x86_64-linux/__init__.py CHANGED
@@ -169,6 +169,8 @@ def select_fp8_linear_tile(m: int, n: int, k: int, variant: int = 0) -> str:
169
  raise RuntimeError("small-M dispatcher currently supports variant=0 only")
170
  if k % 32:
171
  raise RuntimeError("SM120 requires k divisible by 32")
 
 
172
  if m <= 16:
173
  if k % 256 == 0:
174
  return "ld_fp8_gemm_16x128x256_w4" if n % 128 == 0 else "ld_fp8_gemm_16x64x256_w4"
@@ -193,7 +195,7 @@ def select_fp8_linear_tile(m: int, n: int, k: int, variant: int = 0) -> str:
193
  if n % 128 == 0:
194
  return "ld_fp8_gemm_64x128x128_w4"
195
  return "ld_fp8_gemm_64x64x128_w4"
196
- raise RuntimeError("only M=1 decode or 2 <= M <= 64 small-M rows are supported")
197
 
198
 
199
  def fp8_linear_bf16(
@@ -209,7 +211,7 @@ def fp8_linear_bf16(
209
  ``(M, K)`` and ``(N, K)``. ``alpha`` is a host float, normally the product
210
  of static per-tensor input and weight scales. SM110 uses the production
211
  CUTLASS Sq/T1/Wide dispatcher over full model row counts; SM120 uses the
212
- hand-tuned M<=64 path.
213
  """
214
 
215
  if out is None:
 
169
  raise RuntimeError("small-M dispatcher currently supports variant=0 only")
170
  if k % 32:
171
  raise RuntimeError("SM120 requires k divisible by 32")
172
+ if m > 64:
173
+ return "cublaslt_fp8_large_m"
174
  if m <= 16:
175
  if k % 256 == 0:
176
  return "ld_fp8_gemm_16x128x256_w4" if n % 128 == 0 else "ld_fp8_gemm_16x64x256_w4"
 
195
  if n % 128 == 0:
196
  return "ld_fp8_gemm_64x128x128_w4"
197
  return "ld_fp8_gemm_64x64x128_w4"
198
+ raise RuntimeError("M must be positive")
199
 
200
 
201
  def fp8_linear_bf16(
 
211
  ``(M, K)`` and ``(N, K)``. ``alpha`` is a host float, normally the product
212
  of static per-tensor input and weight scales. SM110 uses the production
213
  CUTLASS Sq/T1/Wide dispatcher over full model row counts; SM120 uses the
214
+ hand-tuned M<=64 path and cuBLASLt for larger row counts.
215
  """
216
 
217
  if out is None:
build/torch211-cxx11-cu128-x86_64-linux/{_fp8_gemm_cuda_a6f59d3.abi3.so → _fp8_gemm_cuda_64d1bd9.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:050b9317e0055fff914a3cf9ff3177bc890b3f29f549780f5feb96e406b58093
3
  size 3968152
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b16fcea4e36cf230bdb72e6b873330410ff4b0f2730eb8c78b05db29e0f97349
3
  size 3968152
build/torch211-cxx11-cu128-x86_64-linux/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _fp8_gemm_cuda_a6f59d3
3
- ops = torch.ops._fp8_gemm_cuda_a6f59d3
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_fp8_gemm_cuda_a6f59d3::{op_name}"
 
1
  import torch
2
+ from . import _fp8_gemm_cuda_64d1bd9
3
+ ops = torch.ops._fp8_gemm_cuda_64d1bd9
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_fp8_gemm_cuda_64d1bd9::{op_name}"
build/torch211-cxx11-cu128-x86_64-linux/metadata.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "fp8-gemm",
3
- "id": "_fp8_gemm_cuda_a6f59d3",
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": "HsFfsGY7AK/6Fziv4r2VQ+R2kDjS6hxKKgWqlA+zrKY=",
18
- "_fp8_gemm_cuda_a6f59d3.abi3.so": "BQuTF+AFX/+RSjz5/zF3vIkLPyn1SXgPX+uW5Aa1gJM=",
19
- "_ops.py": "kgQ6LWi/1cNaF3rEiBHA8t3jyz0toqRVj94wVDPiqVU=",
20
  "fp8_gemm/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
21
  }
22
  }
 
1
  {
2
  "name": "fp8-gemm",
3
+ "id": "_fp8_gemm_cuda_64d1bd9",
4
  "version": 1,
5
  "license": "Apache-2.0",
6
  "python-depends": [],
 
14
  "digest": {
15
  "algorithm": "sha256",
16
  "files": {
17
+ "__init__.py": "7UODiuG0STVFP2F4ZTuu+2z8Ih/u8572gTNX+uLBP/s=",
18
+ "_fp8_gemm_cuda_64d1bd9.abi3.so": "sW/OpONs8jC9ty5rhzMwQQ/0sPJzDrjHiwXbKeD5c0k=",
19
+ "_ops.py": "jag/F9UmHiMkVKMKMXdiqfBQmITf2quzY0zUwZqmyi4=",
20
  "fp8_gemm/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
21
  }
22
  }