Skip to content

dev call 20240201

Florian Angerer edited this page Feb 1, 2024 · 1 revision

Dev Call: 1 February 2024

Present

Antonio, Florian, Max, Matti, Petr, Simon, Du Toit

Using Type Information for Fast External Function Calls

  • Max is working on an implementation (in PyPy) that uses type information to be able to do fast and specialized calls of external function (C exts). This is mainly beneficial for functions using primitive types.
  • This topic strongly related to the idea of having an argument clinic in HPy where our plan is that the extension author would provide the type information such that we can exactly do that (see https://github.com/hpyproject/hpy/issues/129#issuecomment-1256957384)
  • Max goals for the project are:
    • Short-term goal: Speed-up primitive type interactions
    • Mid-term goal: Have Cython generate the appropriate C functions for the signatures
    • Long-term goal: interpret Cython source directly
  • Stepan asks for putting an HPy API on top of that (basically realizing HPy arg clinic)
  • We should look at this from two angles:
    • the user-facing API (using macros, arg clinic, etc)
    • the ABI: where an array of integers is fine to specify the argument types
  • Even if we don't solve the API problem now, we should maybe already define an ABI for that.
  • We (HPy devs) would like to know if Cinder would be interested in that (in general and then also, if they would be willing to use HPy if HPy would provide that). Max says that Cinder is currently in some state where its not clear what will be the priorities in near future. If the priority is again performance, then they would be very interested in that.

Cython/HPy

  • Du Toit's internship ended last week 🙁
  • As last time, Du Toit and Florian were concentrating on benchmarks.
  • Florian already merged some of the new APIs they've used in Cython/HPy.
  • Some remaining APIs (e.g. HPyMethod_New) will need more discussion.

Build Problems

  • Some users on GitHub reported build issues due to deprecated functionality in setuptools and similar (see Issue #43)
  • In general, it is discouraged to use setup.py directly. However, using pip install . or something similar doesn't provide a possibility do specify the HPy ABI one wants to build for.
  • Antonio had the idea that we should describe how to build HPy without our setuptools integration. We could add some docs on how to get the include paths, the files to add to the sources (HPy helpers), and defines.
  • For now, we should aim to make python -m build work.

C API Conference Workshop

  • Antonio had some contact with EuroPython organizers and they said they will be happy to host a C API workshop.
  • For now, we need to wait for further information.
  • In the meantime, we should create a list of people we want to invite. Florian offered to start the list.
Clone this wiki locally