Skip to content
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

Add should_run_in_parallel to public API #12412

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jakelishman
Copy link
Member

Summary

The function was added in a stable manner to enable backport to the 1.1 series, but from 1.2 onwards, we want this to be part of the public interface so that others can rely on it too.

Details and comments

This was elided from #12410 to make that PR backwards compatible. This PR exposes the feature as part of the public API, so will be new for 1.2.

Depends on #12410.

@jakelishman jakelishman added on hold Can not fix yet Changelog: New Feature Include in the "Added" section of the changelog labels May 15, 2024
@jakelishman jakelishman added this to the 1.2.0 milestone May 15, 2024
@jakelishman jakelishman requested a review from a team as a code owner May 15, 2024 16:24
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented May 15, 2024

Pull Request Test Coverage Report for Build 9100279306

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 7 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.009%) to 89.587%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 7 91.6%
Totals Coverage Status
Change from base Build 9100255975: -0.009%
Covered Lines: 62281
Relevant Lines: 69520

💛 - Coveralls

The function was added in a stable manner to enable backport to the 1.1
series, but from 1.2 onwards, we want this to be part of the public
interface so that others can rely on it too.
@jakelishman jakelishman removed the on hold Can not fix yet label May 15, 2024
@jakelishman
Copy link
Member Author

Now rebased over #12410.

Comment on lines +6 to +7
decision is dependent on how many CPUs are available to Qiskit, what the :mod:`multiprocessing`
start method is, how many processes were requested.
Copy link
Member

Choose a reason for hiding this comment

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

I mean sort of, we don't explicitly check what multiprocessing is set to (ie we ignore if the user explicitly sets this to spawn), but the value for PARALLEL_DEFAULT is based on what the OS default start method is.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I think I was being more aspirational than correct here. We should do the check based on the multiprocessing start method if that's what we care about, but we don't. I can change the wording.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should just do this, it seems totally in scope to update the logic in the function to call multiprocessing.get_start_method() and get rid of the OS based logic here for 1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants