-
Notifications
You must be signed in to change notification settings - Fork 587
refactor: remove MetaInfoHash class #2064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||
yzh119 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| KERNEL_MAP_HASH = "f161e031826adb8c4f0d31ddbd2ed77e4909e4e43cdfc9728918162a62fcccfb" | ||||||
|
|
||||||
| def __init__(self): | ||||||
| self.indice = None | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For better readability and consistency with the filename
Suggested change
|
||||||
|
|
||||||
| 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() | ||||||
Uh oh!
There was an error while loading. Please reload this page.