Skip to content

Commit b3fcb1c

Browse files
committed
precommit
1 parent 1f3fb07 commit b3fcb1c

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

flashinfer/artifacts.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class ArtifactPath:
8686
The paths are generated in cubin publishing script logs (accessible by codeowners).
8787
When compiling new cubins for backend directories, update the corresponding path.
8888
"""
89+
8990
TRTLLM_GEN_FMHA: str = "463def7494c9fc6792b5aa5b5beef34025e247ac/fmha/trtllm-gen/"
9091
TRTLLM_GEN_BMM: str = (
9192
"56fea80cb22f8b2ef2a2c6a822a075fb20b36803/batched_gemm-074aec4-cc00b23"
@@ -117,6 +118,7 @@ class CheckSumHash:
117118
The sha256 hashes are generated in cubin publishing script logs (accessible by codeowners).
118119
When updating the ArtifactPath for backend directories, update the corresponding hash.
119120
"""
121+
120122
TRTLLM_GEN_FMHA: str = (
121123
"639c534614e9fdf5a9cfa91f7ea8f53989613019c0e1f8b755f461e1fcc7546f"
122124
)

flashinfer/jit/attention/modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
sm90a_nvcc_flags,
2929
current_compilation_context,
3030
)
31-
from ...jit.cubin_loader import get_cubin, get_meta_hash,
31+
from ...jit.cubin_loader import get_cubin, get_meta_hash
3232
from ..utils import (
3333
dtype_map,
3434
filename_safe_dtype_map,

flashinfer/jit/cubin_loader.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,12 @@ def get_meta_hash(checksums_bytes: bytes) -> str:
140140
"""
141141
Parse the checksums.txt file and get the hash of corresponding flashinferMetaInfo.h file
142142
"""
143-
for line in checksums_bytes.splitlines():
143+
checksums_lines = checksums_bytes.decode("utf-8").splitlines()
144+
for line in checksums_lines:
144145
sha256, filename = line.strip().split()
145146
if ".h" in filename:
146147
return sha256
147-
raise ValueError(f"Invalid checksums.txt, no flashinferMetaInfo.h found")
148+
raise ValueError("Invalid checksums.txt, no flashinferMetaInfo.h found")
148149

149150

150151
def verify_cubin(cubin_path: str, expected_sha256: str) -> bool:

flashinfer/jit/fused_moe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def gen_trtllm_gen_fused_moe_sm100_module() -> JitSpec:
185185
checksum = get_cubin(checksum_path, CheckSumHash.TRTLLM_GEN_BMM)
186186
assert checksum, f"Failed to get checksums.txt from {checksum_path}"
187187
meta_hash = get_meta_hash(checksum)
188-
188+
189189
# use `get_cubin` to get "flashinferMetaInfo.h"
190190
metainfo = get_cubin(
191191
f"{include_path}/{header_name}.h",

0 commit comments

Comments
 (0)