From d4c030e672034df053d29d6ef2065391776a1eed Mon Sep 17 00:00:00 2001 From: Zihao Ye Date: Fri, 7 Nov 2025 20:01:40 -0500 Subject: [PATCH 1/2] upd --- flashinfer/artifacts.py | 14 -------------- flashinfer/deep_gemm.py | 12 +++++++----- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/flashinfer/artifacts.py b/flashinfer/artifacts.py index 733b7aed24..c29585f1a7 100644 --- a/flashinfer/artifacts.py +++ b/flashinfer/artifacts.py @@ -98,20 +98,6 @@ class ArtifactPath: DEEPGEMM: str = "a72d85b019dc125b9f711300cb989430f762f5a6/deep-gemm/" -@dataclass(frozen=True) -class MetaInfoHash: - DEEPGEMM: str = "f161e031826adb8c4f0d31ddbd2ed77e4909e4e43cdfc9728918162a62fcccfb" - TRTLLM_GEN_FMHA: str = ( - "2b8a485f2af84768bc769e678eb6014a8181ad95a7ea9e699de5efca4b18ec6a" - ) - TRTLLM_GEN_BMM: str = ( - "6cfade1395f9648aba5dcf2c329114619e175c0f238882555178f98c8f5c1968" - ) - TRTLLM_GEN_GEMM: str = ( - "bd5c3227bec4f8d7a7d3a27fd7628e010d99a5c42651d0a6b97e146803e63340" - ) - - class CheckSumHash: """ This class is used to store the checksums of the cubin files in artifactory. diff --git a/flashinfer/deep_gemm.py b/flashinfer/deep_gemm.py index 4da91750fd..c7e42494d4 100644 --- a/flashinfer/deep_gemm.py +++ b/flashinfer/deep_gemm.py @@ -41,7 +41,7 @@ import torch -from .artifacts import ArtifactPath, MetaInfoHash +from .artifacts import ArtifactPath from .cuda_utils import checkCudaErrors from .jit.cubin_loader import get_cubin from .jit.env import FLASHINFER_CUBIN_DIR @@ -1487,13 +1487,15 @@ def m_grouped_fp8_gemm_nt_masked( class KernelMap: - def __init__(self, sha256: str): - self.sha256 = sha256 + # Hash for kernel_map.json, updated when deepgemm cubins are republished + KERNEL_MAP_HASH = "f161e031826adb8c4f0d31ddbd2ed77e4909e4e43cdfc9728918162a62fcccfb" + + def __init__(self): self.indice = None def init_indices(self): indice_path = ArtifactPath.DEEPGEMM + "/" + "kernel_map.json" - assert get_cubin(indice_path, self.sha256), ( + assert get_cubin(indice_path, self.KERNEL_MAP_HASH), ( "cubin kernel map file not found, nor downloaded with matched sha256" ) path = FLASHINFER_CUBIN_DIR / indice_path @@ -1513,4 +1515,4 @@ def __getitem__(self, key): return self.indice[key] -KERNEL_MAP = KernelMap(MetaInfoHash.DEEPGEMM) +KERNEL_MAP = KernelMap() From f6d4bc400e5f5c5d9abe120eb9d31b5356e4a022 Mon Sep 17 00:00:00 2001 From: Zihao Date: Sun, 9 Nov 2025 12:25:12 -0800 Subject: [PATCH 2/2] upd --- flashinfer/artifacts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/flashinfer/artifacts.py b/flashinfer/artifacts.py index f504664012..1c041be9d0 100644 --- a/flashinfer/artifacts.py +++ b/flashinfer/artifacts.py @@ -95,6 +95,7 @@ class ArtifactPath: "1fddc48b7b48af33914d040051b3e2ee9ba4701e/gemm-145d1b1-9b113e3" ) CUDNN_SDPA: str = "a72d85b019dc125b9f711300cb989430f762f5a6/fmha/cudnn/" + # For DEEPGEMM, we also need to update KernelMap.KERNEL_MAP_HASH in flashinfer/deep_gemm.py DEEPGEMM: str = "a72d85b019dc125b9f711300cb989430f762f5a6/deep-gemm/"