Use JIT compiler to back `cupy.fromfunction()`
See original GitHub issueDescription
#5925 added a bunch of NumPy-compliant functions, including cupy.fromfunction()
. However, it is suboptimal as numpy.fromfunction
is called internally.
It’d be nice to take the same JIT capability behind cupy.vectorize()
and make it work with fromfunction
. However, a common usage of fromfunction
seems to involve lambda functions, which CuPy does not support yet (#4290). Not sure if this is a blocker, though.
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:6 (6 by maintainers)
Top Results From Across the Web
latest PDF - CuPy Documentation
Just-in-time Transpiler (JIT): Generate CUDA kernel from Python source code ... If we do copy the array in this situation, you can use...
Read more >Compiling Python code with @jit - Numba
The recommended way to use the @jit decorator is to let Numba decide when and how to ... For example, calling the f()...
Read more >Numba: a LLVM-based Python JIT compiler
In addi- tion, we share our experience in building a JIT compiler using LLVM[1]. Categories and Subject Descriptors. D.3.4 [Programming ...
Read more >Staged Static Techniques to Efficiently Implement Array Copy ...
Since we are in the context of a JIT compiler, we developed a staged ... 2We use AspectMatlab to for some dynamic measurements...
Read more >CUDA C++ Programming Guide - NVIDIA Documentation Center
Environment variables are available to control just-in-time compilation as ... by calling MyKernel() , and copies the result outputDevPtr back to the same ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am planning the support of lambda function input in
cupy.vectorize
as the first step 😃How about walking through the AST generated from
inspect.getsource
and using the first lambda found? (I think it’s acceptable to raise an error when two lambdas are found in the AST).