Skip to content

Allow pyperformance to compile CPython with the JIT enabled. #345

Closed

Description

@diegorusso

From 3.13, CPython can be built with the JIT and it doesn't seem to be the way to pass custom flags to the configure or the compile step:

def compile(self):

It would be nice to have either:

  • a way to pass custom flags to the configure via CLI/benchmark.conf
  • hard code the jit (like lto/pgo) in the benchmark.conf

I don't have strong opinions for both implementations and TBH we could have both. The former is more generic and flexible, the latter more explicit.

Activity

  1. brandtbucher commented on Jun 18, 2024

    @brandtbucher
    Member

    @mdboom, would this be helpful for us?

  2. mdboom commented on Jun 18, 2024

    @mdboom
    Contributor

    I think it's a good idea in order to make it easier for others. The Faster CPython team's infrastructure doesn't actually use pyperformance compile, but in the interests of open source, it probably wouldn't be a bad idea to close the gap there so pyperformance compile is feature-complete and our infrastructure could start using it.

  3. diegorusso commented on Jun 19, 2024

    @diegorusso
    ContributorAuthor

    Thanks for confirming that. I guess the only way possible for now is to compile Python outside of pyperformance and then instruct pyperformance to run benchmarks with the just compiled CPython.
    I agree with @mdboom, I think it is useful if we can expose the JIT as configuration options.
    In the same line of the JIT we could expose the option for free threading as well (in a separate PR).
    For the sake of flexibility it would be nice to expose an interface to pass whatever flags we want to the ./configure (but this can come in a further PR).

  4. diegorusso commented on Aug 22, 2024

    @diegorusso
    ContributorAuthor

    PR: #351

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions