NVIDIA / NVIDIA/cuda-quantum

Potential symbol collision when pre-loading multiple sim libs in `LinkedLibraryHolder` (Python)

Open
#698 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale-notified
Dominant language
C++
Stars
1.1k
Forks
456
Avg merge
1d 22h
Merged PRs (30d)
165

Description

In LinkedLibraryHolder.cpp, we load (dlopen) all the nvqir simulator libs on construction.

This could potentially create issues like what we saw here (the linker switches between simulator libs at will)

Note: this is the same issue as what we've fixed for OpenBLAS: https://github.com/NVIDIA/cuda-quantum/issues/186

One potential fix is to make LinkedLibraryHolder.cpp to do proper load/unload of polymorphic plugin libs (e.g., backend simulators) as requested.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read LinkedLibraryHolder.cpp around the dlopen call at line 170, then compare the OpenBLAS fix in issue #186 and the simulator behavior discussed in PR #660. Done means polymorphic backend simulator libraries are loaded and unloaded without the symbol collisions caused by pre-loading them together.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.