|
|
|
|
|
by adsharma
427 days ago
|
|
Much of the stdlib is written in C. What happens when you use @compile on a function that calls into stdlib directly or indirectly? How do you deal with existing extensions, GIL etc? If you accept that 100% of legal python is not accepted, you have to write down exactly what is accepted. Example: https://github.com/py2many/py2many/blob/main/doc/langspec.md |
|
With this in place, when we trace through a dev's function, a given function call is considered a leaf node unless the function's containing module is in `trace_modules`. This covers the Python stdlib.
We then take all leaf nodes, lookup their equivalent implementation in native code (written and validated by us), and use that native implementation for codegen.
We don't interact with the GIL. And we keep track of what is unsupported so far: https://docs.fxn.ai/predictors/requirements#language-coverag...