Skip to content

Configure Tier 2 interpreter at build time #118335

Description

@gvanrossum

It would be nice if by default we didn't ship the optimizer infrastructure, since approximately nobody is going to use it, so we should ship (and by default build) binaries that just don't include it.

I propose to enable it only when configured with --enable-experimental-jit-interpreter. We drop support for PYTHON_UOPS and -Xuops, in favor of PYTHON_JIT=0|1.

@mdboom this will have some consequences for the benchmarking infra; checking the Tier 2 box should use this configure option rather than setting the PYTHON_UOPS=1 env var. It should be possible to use both (./configure gives a warning but otherwise seems to ignore incorrect flags, and the env var will just be ignored).

Linked PRs

Activity

  1. mdboom commented on Apr 29, 2024

    @mdboom
    Contributor

    @mdboom this will have some consequences for the benchmarking infra; checking the Tier 2 box should use this configure option rather than setting the PYTHON_UOPS=1 env var. It should be possible to use both (./configure gives a warning but otherwise seems to ignore incorrect flags, and the env var will just be ignored).

    That should be easy enough to deal with, but I'll hold off on shipping that change until #118339 is merged.

  2. gvanrossum commented on Apr 29, 2024

    @gvanrossum
    MemberAuthor

    That should be easy enough to deal with, but I'll hold off on shipping that change until #118339 is merged.

    Understood, but then how can I run a benchmark that tells me how Tier 2 fares with my changes before merging it? (Possibly we won't care. We should discuss this in today's meeting.)

  3. mdboom commented on Apr 29, 2024

    @mdboom
    Contributor

    Oh, good point. If I'm reading correctly, we could probably do both the ./configure flag and the environment variable for a while (and then remove the environment variable).

  4. gvanrossum commented on Apr 29, 2024

    @gvanrossum
    MemberAuthor

    Off-line we decided on a different configure experience. The --configure-experimental-jit flag will be extended so you can write

    ./configure --enable-experimental-jit={off|yes|no|interp}
    

    (enum names subject to bikeshedding) which selects whether the JIT or the Tier 2 interpreter is built, and whether it's on or off by default. An environment variable, PYTHON_JIT={0|1} can override whatever is built.

  5. gvanrossum commented on Apr 29, 2024

    @gvanrossum
    MemberAuthor

    Meanwhile, Brandt and I solved the Windows failure, which was due to _Py_JIT being undefined when _testinternalcapi.c was being compiled in JIT mode. Fix forthcoming.

  6. added 3 commits that reference this issue on May 1, 2024
  7. added 3 commits that reference this issue on May 8, 2024
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions