CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 935
GSoC 2023 Project Ideas
Thank you for your interest in applying for Google Summer of Code with CuPy!
CuPy is a NumPy/SciPy-compatible array library for GPU-accelerated computing with Python. CuPy acts as a drop-in replacement to run existing NumPy/SciPy code on NVIDIA CUDA or AMD ROCm platforms. See the Overview for more details about CuPy.
Contributing to CuPy will help everyone in the Python/CUDA ecosystem as CuPy is becoming one of the key building blocks for major projects like NVIDIA RAPIDS, spaCy, and more. You will also get in-depth knowledge of NumPy/SciPy functionality and specifications.
When submitting your proposal on the GSoC dashboard, please prefix your title with CuPy:
.
If you are new to CuPy and would like to become familiar with the codebase, take a look at the list of good-first-issues, NumPy-compatible API tracker issue, and SciPy-compatible API tracker issue, and try resolving or implementing one of them.
We also recommend joining to CuPy Gitter chat (gsoc23 room) and talking with mentors about your ideas.
CuPy covers many of the functions that are provided by NumPy/SciPy, but not all of them. Review the functions that CuPy doesn't cover yet, and implement them in CuPy to use the full speed of the GPU.
Look at the NumPy/SciPy functions that are not yet implemented in CuPy, and prioritize that list by which functions you think will be most helpful and used.
- Comparison Table
- Issues with contribution-welcome label
- Tracker issues for APIs to be implemented
- NumPy APIs: https://github.com/cupy/cupy/issues/6078
- SciPy APIs: https://github.com/cupy/cupy/issues/6324
- Distributions in
cupy.random.Generator
: https://github.com/cupy/cupy/issues/4557
- GPU implementation of NumPy/SciPy APIs. We expect you to implement routines in a way that they take advantage of the GPU compute model rather than just copy-pasting NumPy source code.
- Documentation and tests. Routines have to be properly documented and with the required tests that cover all the code paths and range of inputs (dtype/shape of the input data, options, etc.)
- Performance measurement results when necessary. Performance comparison with CPU (NumPy/SciPy) or other GPU implementations might be requested during the review.
- Python 3
- Experience in NumPy/SciPy API
- Understanding of the CUDA semantics (e.g., use of CUDA Toolkit APIs, parallel programming on GPU, host/device synchronization)
@takagi
Medium (175 hours)
Easy to Medium
CuPy is planning to add type annotations to all public functions, and we are considering the automatic generation of type annotations. The task is to propose an algorithm of type inference for CuPy APIs.
-
There is a small difference in the data type rule between NumPy and CuPy, so we can't simply copy and paste NumPy’s type annotation. You can see more details here
-
numpy.typing was just introduced in version 1.20, and more features may be added in the future. It is a tedious task to update CuPy’s type annotation every time numpy.typing is updated. So, we are considering reducing the amount of work by automatically (or semi-automatically) generating the type annotations for the cupy APIs.
Please write a concrete example of what type annotation would be useful for type checking. Then consider ideas and concrete algorithms for automatic generation of type annotations. It may be useful to use numpy's type annotation or the unit tests in cupy/tests as hints for automatic generation.
-
A tool to automatically generate type annotation. A tool emits
__init__.pyi
that consists of type annotations for all public NumPy/SciPy APIs. - Documentation and tests. A brief description of the tool for maintainers, and unit tests for the tool.
- Python 3
- Experience in NumPy/SciPy API
- Understanding of static typing (mypy)
@asi1024
Medium (175 hours)
Medium
CuPy JIT (JIT kernel definition), added in v9, is a feature to automatically generate CUDA kernels from Python functions. Our team plans to enhance this feature to allow processing more advanced code (e.g., lambda functions). Contributors should choose some tasks from the list of tasks below and include them in their proposals.
-
Starter Tasks
- Support
math
Python built-in module - Add usage examples of CuPy JIT
- Support Python function inputs in
ReductionKernel
- Support
-
Challenging Tasks
- Support type hints (specifying C types in Python)
- Support recursive function call in target functions
- Support lambda function in target functions
- Support
*args
,*kwargs
, default arguments and keyword-only arguments - Enhance
cupy.apply_along_axis
to accept JIT kernels, similar tocupy.vectorize
.
Refer to https://github.com/cupy/cupy/issues/4290 for the details.
Please write a concrete example that shows what Python functions should be input and what CUDA kernel should be output, and a summary of the implementation to support the features.
- Extension of CuPy JIT Support for the above features.
- Documentation and tests. A brief description of the enhancements, and unit tests.
- Python 3
- Understanding of the CUDA semantics
@asi1024
Medium (175 hours)
Medium to Hard