Skip to content

Add exact-name bitcode library lookup#2302

Open
benhg wants to merge 3 commits into
NVIDIA:mainfrom
benhg:issue-2200-bitcode-by-name
Open

Add exact-name bitcode library lookup#2302
benhg wants to merge 3 commits into
NVIDIA:mainfrom
benhg:issue-2200-bitcode-by-name

Conversation

@benhg

@benhg benhg commented Jul 6, 2026

Copy link
Copy Markdown
Member

Description

Addresses new design of #2200.

@copy-pr-bot

copy-pr-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the cuda.pathfinder Everything related to the cuda.pathfinder module label Jul 6, 2026
@benhg benhg requested a review from rwgk July 6, 2026 17:15
@benhg benhg self-assigned this Jul 6, 2026

rwgk commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@benhg, @leofang: I checked CUDA 12.0–13.3 and NVSHMEM cu12 wheels 3.6.5, 3.7.0, and 3.7.1. All actual bitcode filenames end in .bc, but NVSHMEM’s bitcode directory also contains .a archives, the host .so, and bootstrap/transport plugins. As written, find/locate_bitcode_lib_by_name() can return any of those by basename. Should the API require a .bc filename, or is generic exact-name lookup within the configured directory intentional? Would suffix validation be the right contract, or do we want content-level bitcode validation?

@rwgk rwgk added this to the cuda.pathfinder next milestone Jul 8, 2026
@rwgk rwgk added the P0 High priority - Must do! label Jul 8, 2026
@benhg

benhg commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@benhg, @leofang: I checked CUDA 12.0–13.3 and NVSHMEM cu12 wheels 3.6.5, 3.7.0, and 3.7.1. All actual bitcode filenames end in .bc, but NVSHMEM’s bitcode directory also contains .a archives, the host .so, and bootstrap/transport plugins. As written, find/locate_bitcode_lib_by_name() can return any of those by basename. Should the API require a .bc filename, or is generic exact-name lookup within the configured directory intentional? Would suffix validation be the right contract, or do we want content-level bitcode validation?

I could go either way. The argument in favor of looser checking is we may have new formats (e.g. .bc.fatbin or .bc.gz or something), and could use the same function to support .ltoir. The argument against is more risk of bugs

return _locate_bitcode_lib(name)


def locate_bitcode_lib_by_name(name: str, filename: str) -> LocatedBitcodeLib:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

name and filename are quite confusing IMHO. Is name the directory name that contains the bitcode library?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Name is the library name (e.g. "nvshmem"). Filename is the bitcode filename (e.g. "libnvshmem_device.bc")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

agree it's confusing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.pathfinder Everything related to the cuda.pathfinder module P0 High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants