facebookincubator / cinder

Cinder is Meta's internal performance-oriented production version of CPython.
https://trycinder.com
Other
3.49k stars 121 forks source link

have cinderjit.force_compile() override jit list #19

Open belm0 opened 3 years ago

belm0 commented 3 years ago

I noticed that force_compile() fails if the function isn't in the jit list. Would it be reasonable to change that behavior?

Example use case: I'd like to enable jit on some 3rd party modules using jit list wildcards, but within my own code use decorators and force_compile() to mark functions for compile.

jbower-fb commented 3 years ago

I was wondering this from #18. Perhaps just doing this and starting with JIT enabled but an empty JIT-list will do what you want. I think we only use force_compile() during tests which generally don't have a JIT list so I'm not sure why this check is present.

tekknolagi commented 2 years ago

cc @jbower-fb did you fix this?

jbower-fb commented 2 years ago

@tekknolagi, I think you're referring to 4d6a8d562e4eb74f4fadd86a27af8d01d2375cd6 but I'm afraid it does not. There is still a check in _PyJIT_CompileFuncion().

jbower-fb commented 2 years ago

I mean there's still a JIT list presence check in _PyJIT_CompileFuncion().