Skip to content

Add sglang repo in to find_kernel_sources sources#37

Open
haofrank wants to merge 3 commits into
mainfrom
haoli/sglang-gap-analysis-sources
Open

Add sglang repo in to find_kernel_sources sources#37
haofrank wants to merge 3 commits into
mainfrom
haoli/sglang-gap-analysis-sources

Conversation

@haofrank

Copy link
Copy Markdown
Collaborator

The experimental find_kernel_sources feature has been added to the AMD benchmark gap analysis within the SGLang repository. It is now possible to search for relevant kernel source code and test cases directly within SGLang.

"sgl_hip",
"write_req_to_token_pool",
"create_flashinfer_kv_indices",
"flashinfer",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm do you think there is a chance that this might misroute FlashInfer kernels into SGLang/$SGLANG_DIR

INDUCTOR_PATTERN = re.compile(r'triton_\w+_fused_')
HIPBLASLT_PATTERN = re.compile(r'wvSplitK|wvSpltK|DeviceGemmWmma')
AITER_PATTERN = re.compile(r'^_ZN5aiter|aiter::')
SGLANG_PATTERN = re.compile(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any correlation with _is_sglang_kernel in searcher.py? there is some regex difference with that.

)
)

def _search_sglang_source(self, function_name: str, original_name: str) -> Optional[SourceMatch]:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we make this consistent with rest? Every other search*_source returns None when nothing is found

Comment thread Magpie/modes/benchmark/gap_analysis.py Outdated
from Magpie.tools.amd_kernel_finder import KernelSourceInfo
headers.extend(KernelSourceInfo.csv_headers())
f.write(
"# Warning: columns 7-19 from find_kernel_sources/testcase "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we going to have these columns always the same? so always 7-19?

@haofrank haofrank requested a review from sinarafati-amd June 17, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants