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

Allow extensions to set the vectorcall field on instances of PyFunctionObject #91049

Closed
itamaro mannequin opened this issue Mar 1, 2022 · 4 comments
Closed

Allow extensions to set the vectorcall field on instances of PyFunctionObject #91049

itamaro mannequin opened this issue Mar 1, 2022 · 4 comments
Labels
3.12 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@itamaro
Copy link
Mannequin

itamaro mannequin commented Mar 1, 2022

BPO 46893
Nosy @carljm, @DinoV, @itamaro

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2022-03-01.22:14:02.858>
labels = ['interpreter-core', 'type-feature', '3.11']
title = 'Allow extensions to set the vectorcall field on instances of PyFunctionObject'
updated_at = <Date 2022-03-01.22:14:02.858>
user = 'https://github.com/itamaro'

bugs.python.org fields:

activity = <Date 2022-03-01.22:14:02.858>
actor = 'itamaro'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Interpreter Core']
creation = <Date 2022-03-01.22:14:02.858>
creator = 'itamaro'
dependencies = []
files = []
hgrepos = []
issue_num = 46893
keywords = []
message_count = 1.0
messages = ['414302']
nosy_count = 3.0
nosy_names = ['carljm', 'dino.viehland', 'itamaro']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue46893'
versions = ['Python 3.11']

@itamaro
Copy link
Mannequin Author

itamaro mannequin commented Mar 1, 2022

CPython extensions providing optimized execution of Python bytecode (like Cinder JIT and Pyjion)
can benefit from being able to modify the vectorcall field on instances of PyFunctionObject to allow calling the optimized path (e.g. JIT-compiled) directly.

We propose adding an API to allow extensions to override this field:

void PyFunction_SetVectorcall(PyFunctionObject *func, vectorcallfunc vectorcall);

@itamaro itamaro mannequin added 3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Mar 1, 2022
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@gvanrossum
Copy link
Member

@markshannon @itamaro

@itamaro
Copy link
Contributor

itamaro commented May 25, 2022

this is now targeting 3.12 - how can I update the labels?

GH-92257 adds this API and should be ready for review!

@gvanrossum gvanrossum added 3.12 bugs and security fixes and removed 3.11 only security fixes labels May 25, 2022
@gvanrossum
Copy link
Member

Moved the labels for you, and started the tests running on the PR. Others will have to review it.

itamaro added a commit to itamaro/cpython that referenced this issue Sep 6, 2022
itamaro added a commit to itamaro/cpython that referenced this issue Sep 6, 2022
markshannon pushed a commit that referenced this issue Sep 15, 2022
…-92257)

Co-authored-by: Andrew Frost <adfrost@fb.com>
Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
@carljm carljm closed this as completed Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants