4 ms·
I forgot to mention There's was recently a cool article on things to you can do with python decorators https://news.ycombinator.com/item?id=42918846 https://n
by rat87 2y ago
I forgot to mention
There's was recently a cool article on things to you can do with python decorators
https://news.ycombinator.com/item?id=42918846 https://news.ycombinator.com/item?id=42918846
Basically the python function is created as a regular python function but then passed to a jit decorator
@something.jit
def some_func():
....
Which takes the source code and uses it as a dsl for something else compiles it say something to run in the GPU and assigns it the name of the original function. Technically you haven't hooked creation of of the func just replaced it with a wrapper or in this case a related function that doesn't call the original but it does the job.