Add arch-specific bitcode file search to cuda.pathfinder#2201
Draft
benhg wants to merge 8 commits into
Draft
Conversation
Contributor
benhg
commented
Jun 11, 2026
d1f8cc6 to
f1289cc
Compare
benhg
commented
Jun 11, 2026
f1289cc to
98ccd6e
Compare
leofang
reviewed
Jun 11, 2026
Co-authored-by: Leo Fang <leo80042@gmail.com>
rwgk
reviewed
Jun 11, 2026
| attachments.append(f' Directory does not exist: "{dir_path}"') | ||
|
|
||
|
|
||
| def _filename_with_sm_arch(filename: str, sm_arch: str) -> str: |
Contributor
There was a problem hiding this comment.
Small cleanup: switching to fullmatch, compile the SM arch pattern once, and reuse .pattern in the error message. That keeps the validation contract in one place instead of repeating the regex in code and text.
_SM_ARCH_PATTERN = re.compile(r"sm[0-9]+[a-z]?")
def _filename_with_sm_arch(filename: str, sm_arch: str) -> str:
if not sm_arch:
return filename
if not _SM_ARCH_PATTERN.fullmatch(sm_arch):
raise ValueError(f"Invalid sm_arch: {sm_arch!r} must match {_SM_ARCH_PATTERN.pattern!r}")
stem, ext = os.path.splitext(filename)
return f"{stem}_{sm_arch}{ext}"
rwgk
reviewed
Jun 11, 2026
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com>
Contributor
|
/ok to test 614dead |
Contributor
|
Hi @benhg, I went ahead and added a commit to parametrize the |
Contributor
|
Sorry I overlooked before that this PR was behind |
Contributor
|
/ok to test bb8643b |
|
Contributor
|
Converting to draft, so this doesn't get merged accidentally, pending offline nvshmem design/packaging discussions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implement #2200. Adds an
sm_archargument to CUDA-Pathfinder's bitcode file search.Checklist