<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kenichi Maehashi on Medium]]></title>
        <description><![CDATA[Stories by Kenichi Maehashi on Medium]]></description>
        <link>https://medium.com/@kmaehashi?source=rss-441c797d4ede------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*5xWAnl__VvI5Yyv-DF9A3A.jpeg</url>
            <title>Stories by Kenichi Maehashi on Medium</title>
            <link>https://medium.com/@kmaehashi?source=rss-441c797d4ede------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 05:07:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kmaehashi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Announcing CuPy v14: NumPy v2 Semantics, bfloat16, CUDA Pip Wheels Support, and More ]]></title>
            <link>https://medium.com/cupy-team/announcing-cupy-v14-e8515ec05fca?source=rss-441c797d4ede------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8515ec05fca</guid>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Kenichi Maehashi]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 01:01:00 GMT</pubDate>
            <atom:updated>2026-02-19T01:01:00.893Z</atom:updated>
            <content:encoded><![CDATA[<p>We are happy to announce the release of <strong>CuPy v14</strong>, a major milestone for the CuPy ecosystem. This release brings important compatibility updates, broader platform support, and significant expansion of NumPy and SciPy API coverage — making GPU-accelerated computing with Python more accessible and more interoperable than ever.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aaJzqkCntRcwV4swrYQz5Q.png" /></figure><p>Since celebrating our 10th anniversary in 2025, CuPy has reached some incredible milestones, including <strong>60 million downloads</strong> and <strong>10,000 GitHub stars</strong>. This growth really belongs to the community of researchers, developers, and collaborators who have supported us along the way. Now, in 2026, we’re so excited to share CuPy v14 with you — our first major update in two years. We’re grateful to have you with us as we keep building together, and we’d love for you to join us as we dive into the highlights of what’s new in v14.</p><h3>🔢 NumPy v2 Type Promotion and Semantics</h3><p>CuPy v14 now provides <strong>behavior equivalent to NumPy v2</strong>.<strong> </strong>This includes:</p><ul><li>Updated type promotion rules</li><li>Adjusted behaviors to match NumPy 2 semantics</li></ul><p>While CuPy has been compatible with NumPy v2 for several years, earlier CuPy releases (v13 and prior) followed behaviors equivalent to the NumPy v1 series, particularly in areas such as type promotion rules and casting behavior.</p><p>With CuPy v14, these semantics have been updated to align with the NumPy v2 specification, bringing CuPy’s behavior in line with the modern NumPy ecosystem.</p><p>This change improves consistency for users working across NumPy and CuPy, especially for codebases that are transitioning to or already targeting NumPy v2.</p><h3>✨ Introduction of bfloat16 and Structured Dtype Support</h3><p>CuPy v14 introduces initial support for <strong>bfloat16 data type (dtype)</strong> as well as NumPy’s <strong>structured dtypes</strong>. Using bfloat16 requires installing and using ml_dtypes.</p><p>At this time the support of structured dtype is very limited, mainly supporting arr[&quot;field&quot;] access and assignments. bfloat16 is supported for large parts of the CuPy API but there are known missing features and limitations. We expect the support for both to grow and evolve in the near future.</p><h3>🐍 Support for CUDA Pip Wheels</h3><p>One of the most impactful changes in CuPy v14 is <strong>support for CUDA Toolkit binary packages distributed on PyPI</strong>.</p><p>With this enhancement:</p><ul><li>CuPy can now be used <strong>without installing a system-wide CUDA Toolkit. </strong>Users can rely on <a href="https://pypi.org/project/cuda-toolkit/">CUDA components provided via PyPI</a>. Only the CUDA driver needs to be pre-installed.</li><li>Interoperability with other CUDA-enabled Python libraries, such as <a href="https://nvidia.github.io/cuda-python/latest/index.html">CUDA Python</a> and PyTorch, is significantly improved.</li></ul><p>This lowers the barrier to entry for GPU acceleration and simplifies deployment, especially in virtual environments and containerized setups.</p><p>CuPy automatically recognizes CUDA PyPI packages if they are available in the environment. Otherwise you can install CuPy alongside the necessary toolkit components by using the [ctk] extras, e.g., pip install &#39;cupy-cuda13x[ctk]&#39; .</p><h3>🧠 AMD ROCm 7 Support</h3><p>CuPy v14 expands its AMD GPU support with <strong>ROCm 7 compatibility</strong>.</p><p>Highlights include:</p><ul><li>Support for the <strong>AMD ROCm 7 platform</strong></li><li><strong>A new binary package: </strong><strong>cupy-rocm-7-0</strong>, built specifically for ROCm 7.0</li></ul><p>This update ensures that CuPy continues to support a diverse set of GPU platforms and keeps pace with the latest AMD software stack.</p><h3>📐 Expanded NumPy &amp; SciPy API Coverage</h3><p>CuPy v14 continues our effort to close the gap between CuPy and NumPy/SciPy APIs. This release brings <strong>50 new APIs</strong>.</p><p>Notable additions include:</p><ul><li>Linear algebra routines such as <strong>cupy.linalg.eig</strong> and <strong>cupy.linalg.eigvals</strong></li><li><a href="https://numpy.org/doc/stable/reference/array_api.html">Array API standard compatibility</a> in the main namespace</li><li>SciPy interpolation routines</li></ul><p>Below is the complete list of APIs newly added in this release.</p><h4>NumPy-compatible APIs</h4><p><strong>Routines:</strong></p><ul><li><em>cupy.apply_over_axes</em></li><li><em>cupy.bitwise_count</em></li><li><em>cupy.concat</em></li><li><em>cupy.put_along_axis</em></li></ul><p><strong>Array API Compatibility:</strong></p><ul><li><em>cupy.acos / cupy.acosh</em></li><li><em>cupy.asin / cupy.asinh</em></li><li><em>cupy.atan / cupy.atan2 / cupy.atanh</em></li><li><em>cupy.astype</em></li><li><em>cupy.bitwise_invert / cupy.bitwise_left_shift / cupy.bitwise_right_shift</em></li><li><em>cupy.permute_dims</em></li><li><em>cupy.pow</em></li><li><em>cupy.trapezoid</em></li><li><em>cupy.unique_all / cupy.unique_counts / cupy.unique_inverse / cupy.unique_values</em></li><li><em>cupy.ndarray.mT</em></li></ul><p><strong>Dtype Aliases:</strong></p><ul><li><em>cupy.bool</em></li><li><em>cupy.long</em></li><li><em>cupy.ulong</em></li></ul><p><strong>Linear Algebra:</strong></p><ul><li><em>cupy.linalg.cond</em></li><li><em>cupy.linalg.cross</em></li><li><em>cupy.linalg.eig</em></li><li><em>cupy.linalg.eigvals</em></li></ul><h4>SciPy-compatible APIs (cupyx.scipy)</h4><p><strong>Interpolation:</strong></p><ul><li><em>cupyx.scipy.interpolate.CloughTocher2DInterpolator</em></li><li><em>cupyx.scipy.interpolate.CubicSpline</em></li><li><em>cupyx.scipy.interpolate.InterpolatedUnivariateSpline</em></li><li><em>cupyx.scipy.interpolate.LSQUnivariateSpline</em></li><li><em>cupyx.scipy.interpolate.LinearNDInterpolator</em></li><li><em>cupyx.scipy.interpolate.NdBSpline</em></li><li><em>cupyx.scipy.interpolate.NearestNDInterpolator</em></li><li><em>cupyx.scipy.interpolate.UnivariateSpline</em></li><li><em>cupyx.scipy.interpolate.interp1d</em></li><li><em>cupyx.scipy.interpolate.make_lsq_spline</em></li></ul><p><strong>N-D Image:</strong></p><ul><li><em>cupyx.scipy.ndimage.find_objects</em></li></ul><p><strong>Signal Processing:</strong></p><ul><li><em>cupyx.scipy.signal.freqz_sos</em></li><li><em>cupyx.scipy.signal.sweep_poly</em></li></ul><p><strong>Special Functions:</strong></p><ul><li><em>cupyx.scipy.special.ellipeinc</em></li><li><em>cupyx.scipy.special.ellipkinc</em></li><li><em>cupyx.scipy.special.lambertw</em></li><li><em>cupyx.scipy.special.shichi</em></li><li><em>cupyx.scipy.special.sici</em></li><li><em>cupyx.scipy.special.sph_harm_y</em></li><li><em>cupyx.scipy.special.wright_bessel</em></li></ul><h3>🔄 Upgrading from CuPy v13 or Earlier</h3><p>As always, we have prepared an <a href="https://docs.cupy.dev/en/latest/upgrade.html"><strong>Upgrade Guide</strong></a> that summarizes the changes that may affect existing code when migrating between major CuPy releases. If you are upgrading from CuPy v13 or earlier, we strongly recommend reviewing the guide before upgrading.</p><h3>🤝 Welcoming New CuPy Maintainers</h3><p>Alongside this release, we are happy to welcome <strong>two new maintainers to the CuPy project</strong>:</p><ul><li><strong>Leo Fang</strong> (GitHub: <a href="https://github.com/leofang">leofang</a>)</li><li><strong>Sebastian Berg</strong> (GitHub: <a href="https://github.com/seberg">seberg</a>)</li></ul><p>Both have already made impactful contributions, and we are excited to have them more deeply involved in shaping CuPy’s future.</p><blockquote><strong>Leo Fang:<em><br></em></strong><em>I have been a long-time open-source contributor to CuPy and many other OSS projects across the Python ecosystem. I am enthusiastic about making Python run faster and delivering delightful Python user experience. I am excited to join the team and help evolve CuPy in its second decade!</em></blockquote><blockquote><strong>Sebastian Berg:<br></strong><em>As a long-time NumPy maintainer, I care deeply about the scientific Python community and projects like CuPy. I’m excited to work with the team to help improve CuPy and support the scientists and engineers who depend on it for their GPU computing.</em></blockquote><h3>🌍 Join the CuPy Community!</h3><p>CuPy has an active and growing community of developers and users. If you are interested in joining the community:</p><ul><li>Talk to core developers on the <a href="https://matrix.to/#/#cupy_community:gitter.im">Matrix</a> chat</li><li>File an issue on GitHub for feature requests or bug reports</li><li>Send a pull request to contribute code or documentation — if you are unsure where to start, check out one of the good first issues.</li></ul><p>Finally, don’t forget to <a href="https://github.com/cupy/cupy/"><strong>star us on GitHub</strong></a> and follow us on <a href="https://www.linkedin.com/company/cupy-team/"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://medium.com/cupy-team"><strong>Medium</strong></a><strong>, and </strong><a href="https://x.com/CuPy_Team"><strong>X</strong></a> to stay up to date with the latest news!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8515ec05fca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cupy-team/announcing-cupy-v14-e8515ec05fca">Announcing CuPy v14: NumPy v2 Semantics, bfloat16, CUDA Pip Wheels Support, and More 🚀</a> was originally published in <a href="https://medium.com/cupy-team">CuPy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transferring GitHub Projects Between Organizations]]></title>
            <link>https://medium.com/@kmaehashi/transferring-github-projects-between-orgs-91dd1e259d5d?source=rss-441c797d4ede------2</link>
            <guid isPermaLink="false">https://medium.com/p/91dd1e259d5d</guid>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Kenichi Maehashi]]></dc:creator>
            <pubDate>Wed, 30 Oct 2024 13:49:51 GMT</pubDate>
            <atom:updated>2024-11-16T14:12:07.720Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VOU5I89mEWttsomQ.png" /><figcaption>GitHub Projects (<a href="https://docs.github.com/en/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/changing-the-layout-of-a-view">source</a>)</figcaption></figure><p>When moving a repository from one GitHub organization to another, one of the burdens is about GitHub Projects.</p><p>Although transferring repositories between organizations is straightforward, project boards will remain in the original organization, as GitHub projects are resources linked to organizations rather than repositories.</p><p>While the ability to transfer projects has been repeatedly requested in <a href="https://github.com/orgs/community/discussions/8548">community discussions</a>, it is unfortunately not available as of yet. However, <strong>there is a way to “duplicate” projects across organizations</strong>, using <a href="https://github.com/timrogers/gh-migrate-project">gh-migrate-project</a> utility developed by a GitHub engineer <a href="https://github.com/timrogers">@timrogers</a>. This GitHub CLI extension allows for the exporting and importing of projects via the GitHub GraphQL API, ensuring all items linked to issues in the repository are preserved. Here, we’ll go through the steps needed to relocate projects and repositories between organizations.</p><h3>Steps to move repositories with projects between GitHub organizations</h3><h4>1. Setup GitHub CLI and migrate-project Extension</h4><p>If you haven’t done so already, install the GitHub CLI by following the <a href="https://github.com/cli/cli#installation">instructions</a>. Once ready, you can install the extension with the command:</p><pre>$ gh extension install timrogers/gh-migrate-project</pre><h4>2. Generate Personal Access Token</h4><p>The gh migrate-project command requires a personal access token (“PAT”) to export/import projects. <a href="https://github.com/settings/tokens/new?scopes=project,read:org,repo">Generate a classic PAT here</a>.</p><h4>3. Export Project</h4><p>Export the project from the source organization using the following commands:</p><pre>$ export EXPORT_GITHUB_TOKEN=ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>$ gh migrate-project export \<br>    --project-owner SOURCE-ORG-NAME \<br>    --project-owner-type organization \<br>    --project-number 10</pre><p>For projects in the users’ namespace, use --project-owner-type user instead.</p><p>Upon export, you will see two files: project.json containing the project content, and repository-mappings.csv, which we’ll deal with later.</p><h4>4. Transfer Repository</h4><p>Now, transfer the repository from the source organization to the target organization, using the “Transfer” button on the repository’s Settings page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*LF2VjEyqUo8rCI4xMF97sw.png" /></figure><h4>5. Edit Repository Mapping</h4><p>Edit the repository-mappings.csv file. This plain CSV file defines the mapping between source and target organizations/repositories:</p><pre>source_repository,target_repository<br>SOURCE-ORG-NAME/sample-repo,</pre><p>You may observe two or more repositories listed if the project contains issues from multiple repositories.</p><p>All you need to do is fill out the target_repository column:</p><pre>source_repository,target_repository<br>SOURCE-ORG-NAME/sample-repo,<strong>TARGET-ORG-NAME/sample-repo</strong></pre><h4>6. Import Project</h4><p>Finally, import the project to the target organization:</p><pre>$ export IMPORT_GITHUB_TOKEN=ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>$ gh migrate-project import \<br>    --input-path project.json \<br>    --repository-mappings-path repository-mappings.csv \<br>    --project-owner TARGET-ORG-NAME \<br>    --project-owner-type organization</pre><p>If the “Status” field has a non-default label set, you will be prompted to configure them manually during the import:</p><pre>   ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗<br>   ║                                                                                                                    ║<br>   ║   Your new project has been created.                                                                               ║<br>   ║                                                                                                                    ║<br>   ║   You now need to manually update the &quot;Status&quot; field&#39;s options to match your source. Here&#39;s what you need to do:   ║<br>   ║                                                                                                                    ║<br>   ║   1. Go to &lt;https://github.com/orgs/TARGET-ORG-NAME/projects/1/settings/fields/Status&gt;.                            ║<br>   ║   2. Make sure you have exactly the following options configured:                                                  ║<br>   ║                                                                                                                    ║<br>   ║   Done, In Progress, Planned, Todo                                                                                 ║<br>   ║                                                                                                                    ║<br>   ║   Once you&#39;ve done that, hit Enter and we&#39;ll check that everything looks good.                                     ║<br>   ║                                                                                                                    ║<br>   ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝</pre><p>Once completed, a message will appear, confirming the successful import:</p><pre>   ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗<br>   ║                                                                                                                                                        ║<br>   ║   Your project and project items have been migrated. To check out your new project, head to &lt;https://github.com/orgs/TARGET-ORG-NAME/projects/1&gt;.      ║<br>   ║                                                                                                                                                        ║<br>   ║   You&#39;ll need to migrate your views and workflows manually                                                                                             ║<br>   ║                                                                                                                                                        ║<br>   ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝</pre><h3>Limitations</h3><p>Do be aware of several considerations when planning your migration.</p><ul><li><a href="https://github.com/timrogers/gh-migrate-project?tab=readme-ov-file#not-all-data-is-migrated">gh-migrate-project cannot migrate all data.</a> For instance, views, order of project items, or workflows must be reconfigured manually.</li><li>The author of draft issues will become the person running the migration (i.e., the GitHub account that generated the IMPORT_GITHUB_TOKEN).</li><li>Unlike repository transfers, you cannot set up a redirect from the old project to the new one. The old project board remains as-is.</li><li>Modifications made after export cannot be reflected to the new (imported) project. You might want to consider archiving/unarchiving the repository before export/after import to freeze the activity during the migration.</li></ul><h3>Conclusion</h3><p>While there are certain manual steps to be completed, the gh migrate-project command makes it much easier to export and import projects across organizations. I hope this guide will help you manage repositories on GitHub more effectively!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91dd1e259d5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing CuPy v13]]></title>
            <link>https://medium.com/cupy-team/announcing-cupy-v13-66979ee7fab0?source=rss-441c797d4ede------2</link>
            <guid isPermaLink="false">https://medium.com/p/66979ee7fab0</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[gpu]]></category>
            <dc:creator><![CDATA[Kenichi Maehashi]]></dc:creator>
            <pubDate>Thu, 18 Jan 2024 06:07:31 GMT</pubDate>
            <atom:updated>2024-01-18T22:45:27.058Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*sX_AmxmMRTxepaoCaGk9-w.png" /></figure><p>We are happy to announce that CuPy v13 is now available. This new major release contains the effort of over 270 pull requests, including more SciPy-compatible routines and better packaging. Let’s check out the highlights:</p><h3>Signal Processing APIs − `cupyx.scipy.signal`</h3><p>In this release, we have added 140 signal processing routines that are compatible with SciPy’s scipy.signal.* APIs. The <a href="https://docs.cupy.dev/en/latest/reference/scipy_signal.html">API Reference</a> lists all the available signal functions. This work has been done by <a href="https://github.com/ev-br">Evgani Burovski</a> and <a href="https://github.com/andfoy">Edgar Andrés Margffoy Tuay</a> from Quansight, under the support of <a href="https://medium.com/cupy-team/cupy-received-grant-as-essential-open-source-software-for-science-e7ad8f7d313b">CZI’s Essential OSS for Science program</a>.</p><p>We would also like to highlight cuSignal’s contributions in this release. <a href="https://github.com/rapidsai/cusignal">cuSignal</a> is a library developed by the <a href="https://rapids.ai/">NVIDIA RAPIDS</a> project that provides GPU-accelerated implementation of signal processing algorithms using CuPy as its backend. cuSignal includes scipy.signal compatible APIs, so we shared the same goals. After a discussion with the cuSignal team, we agreed to merge cuSignal into CuPy to provide users a better experience with a unified library for SciPy routines on GPU. We would like to acknowledge and thank <a href="https://github.com/awthomp">Adam Thompson</a> and everyone involved in the development for creating this great library and agreeing to this transition.</p><h3>Import CuPy without CUDA</h3><p>Essentially, CuPy is tightly coupled with underlying GPU toolkits such as NVIDIA CUDA and AMD ROCm. For a long time, CuPy’s installation assumed the toolkit to be installed locally — if not, import cupy has yielded an ImportError. This has been a problem in some scenarios, such as NumPy-based projects with optional GPU support via CuPy. In CuPy v13, all CUDA Toolkit libraries are lazily-loaded, making import cupy to success even when CUDA is not installed.</p><h3>More NumPy &amp; SciPy-compatible APIs</h3><p>In addition to the signal processing routines mentioned above, the following fifteen functions have been newly implemented, providing <a href="https://docs.cupy.dev/en/latest/reference/comparison.html">more coverage for NumPy/SciPy APIs</a>.</p><ul><li><em>cupy.delete</em></li><li><em>cupy.polynomial.polynomial.polyval</em></li><li><em>cupy.polynomial.polynomial.polyvalfromroots</em></li><li><em>cupyx.scipy.linalg.bandwidth</em></li><li><em>cupyx.scipy.linalg.expm</em></li><li><em>cupyx.scipy.linalg.khatri_rao</em></li><li><em>cupyx.scipy.ndimage.distance_transform_edt</em></li><li><em>cupyx.scipy.ndimage.value_indices</em></li><li><em>cupyx.scipy.interpolate.NdPPoly</em></li><li><em>cupyx.scipy.special.binom</em></li><li><em>cupyx.scipy.special.ellipj</em></li><li><em>cupyx.scipy.special.ellipk</em></li><li><em>cupyx.scipy.special.exprel</em></li><li><em>cupyx.scipy.special.spherical_yn</em></li><li><em>cupyx.scipy.special.zetac</em></li></ul><h3>Support for cuTENSOR 2.0</h3><p><a href="https://developer.nvidia.com/cutensor">NVIDIA cuTENSOR</a> is a performant and flexible library for accelerating tensor linear algebra. CuPy v13 supports <a href="https://developer.nvidia.com/blog/unlock-the-power-of-nvidia-grace-and-nvidia-hopper-architectures-with-foundational-hpc-software/#:~:text=cuDSS%20documentation.-,NVIDIA%20cuTENSOR%202.0,-NVIDIA%20cuTENSOR%202.0">cuTENSOR 2.0</a>, the latest major release of the library, achieving higher performance than cuTENSOR 1.x series.</p><p>To enable cuTENSOR support in CuPy, install cuTENSOR by pip install cutensor-cu12 (or cutensor-cu11 for CUDA 11.x) and set CUPY_ACCELERATORS=cub,cutensor environment variable.</p><h3>Distributed ND-Array (preview)</h3><p>CuPy v13 added initial support for sharding n-dimensional arrays across multiple GPU devices connected to the same host.</p><pre>from cupyx.distributed.array import distributed_array<br><br>shape = (16, 16)<br>cpu_array = numpy.random.rand(*shape)<br><br># Set the chunk indexes for each device<br># device 0 holds  rows 0..8 and device 1 holds rows 8..16<br>mapping = {<br>        0: [(slice(8), slice(None, None))],<br>        1: [(slice(8, None), slice(None, None))],<br>}<br><br># The array is allocated in devices 0 and 1<br>multi_gpu_array = distributed_array(cpu_array, mapping)</pre><p>The work has been done by <a href="https://github.com/shino16">@shino16</a> during the Preferred Networks 2023 summer internship.</p><h3>Upgrading from CuPy v12 or earlier</h3><p>As always, we have prepared the <a href="https://docs.cupy.dev/en/latest/upgrade.html">Upgrade Guide</a>, which lists the changes that may break your code when migrating between major releases. Especially note that the minimum requirement for CuPy is now CUDA 11.2 and Python 3.9.</p><h3>Support Us via GitHub Sponsors!</h3><p>Like many open-source projects, it is important to have a financial backbone to achieve continuous development. As a part of our effort to make the project sustainable, we have enrolled in GitHub Sponsors to accept donations. Please consider <a href="https://github.com/sponsors/cupy">sponsoring us</a> to help us support CuPy’s development.</p><p>As a <a href="https://numfocus.org/project/cupy">NumFOCUS Sponsored Project</a>, funds sponsored through the GitHub Sponsors are collected and disbursed via NumFOCUS, a 501(c)(3) public charity in the United States, which acts as the fiscal sponsor for the project. Anyone can track the financial details on our <a href="https://opencollective.com/cupy">Open Collective page.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66979ee7fab0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cupy-team/announcing-cupy-v13-66979ee7fab0">Announcing CuPy v13</a> was originally published in <a href="https://medium.com/cupy-team">CuPy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Released CuPy v12]]></title>
            <link>https://medium.com/cupy-team/released-cupy-v12-4497315e811e?source=rss-441c797d4ede------2</link>
            <guid isPermaLink="false">https://medium.com/p/4497315e811e</guid>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Kenichi Maehashi]]></dc:creator>
            <pubDate>Thu, 30 Mar 2023 06:11:28 GMT</pubDate>
            <atom:updated>2023-03-30T06:11:28.018Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*XwyDbTmqLBevzQ68.png" /></figure><p>The CuPy team is excited to announce the release of CuPy v12! In this major release, we focused on enhancing the NumPy/SciPy API coverage, including the new interpolation module (cupyx.scipy.interpolate) and ufunc methods like cupy.add.at.</p><h3>Highlights</h3><h4><strong>SciPy Interpolation Module</strong></h4><p>A new module, cupyx.scipy.interpolate, has been introduced to host <a href="https://docs.scipy.org/doc/scipy/reference/interpolate.html">SciPy’s Interpolation APIs</a> optimized for GPU. The following 18 APIs are <a href="https://docs.cupy.dev/en/latest/reference/scipy_interpolate.html">available</a>, including univariate/multivariate interpolators and 1-D Splines.</p><ul><li>Akima1DInterpolator</li><li>barycentric_interpolate (*)</li><li>BarycentricInterpolator (*)</li><li>BPoly</li><li>BSpline</li><li>CubicHermiteSpline</li><li>interpn</li><li>krogh_interpolate (*)</li><li>KroghInterpolator (*)</li><li>make_interp_spline</li><li>pchip</li><li>pchip_interpolate</li><li>PchipInterpolator</li><li>PPoly</li><li>RBFInterpolator</li><li>RegularGridInterpolator</li><li>splantider</li><li>splder</li></ul><p><em>Acknowledgment: This work has been done by </em><a href="https://github.com/ev-br"><em>Evgani Burovski</em></a><em> and </em><a href="https://github.com/andfoy"><em>Edgar Andrés Margffoy Tuay</em></a><em> from Quansight, under the support of </em><a href="https://medium.com/cupy-team/cupy-received-grant-as-essential-open-source-software-for-science-e7ad8f7d313b"><em>CZI’s EOSS program</em></a><em>. The work for functions denoted by (*) has been done by </em><a href="https://github.com/khushi-411"><em>Khushi Agrawal</em></a><em>, under the support of </em><a href="https://medium.com/cupy-team/gsoc-2022-successfully-ends-dd7fef553d61"><em>Google Summer of Code 2022</em></a><em>.</em></p><h4>Enhanced NumPy/SciPy API Coverage</h4><p>In addition to the interpolation module, CuPy v12 adds the following 16<a href="https://docs.cupy.dev/en/latest/reference/comparison.html"> NumPy/SciPy-compatible APIs</a>.</p><ul><li>cupy.byte_bounds</li><li>cupy.heaviside</li><li>cupy.min_scalar_type</li><li>cupy.ndarray.searchsorted</li><li>cupyx.scipy.special.cosm1</li><li>cupyx.scipy.special.exp1</li><li>cupyx.scipy.special.expi</li><li>cupyx.scipy.special.k0</li><li>cupyx.scipy.special.k0e</li><li>cupyx.scipy.special.k1</li><li>cupyx.scipy.special.k1e</li><li>cupyx.scipy.special.logsumexp</li><li>cupyx.scipy.special.softmax</li><li>cupyx.scipy.stats.boxcox_llf</li><li>cupyx.scipy.stats.zmap</li><li>cupyx.scipy.stats.zscore</li></ul><h4><strong>ufunc Methods</strong></h4><p>CuPy now provides <a href="https://docs.cupy.dev/en/latest/reference/ufunc.html#ufunc">ufunc methods</a> for selected ufuncs. In particular, you can now write scatter operations in the same way as NumPy, e.g., cupy.add.at(arr, slices, value) instead of cupyx.scatter_add(arr, slices, value).</p><ul><li>cupy.ufunc.reduce</li><li>cupy.ufunc.accumulate</li><li>cupy.ufunc.reduceat</li><li>cupy.ufunc.outer</li><li>cupy.ufunc.at</li></ul><h4>Support for the latest platforms — CUDA 12, H100, and Jetson Orin</h4><p>CuPy v12 added official support for these latest NVIDIA GPU platforms.</p><p>NVIDIA CUDA 12 is the latest CUDA major release in many years, with performance optimizations and support for the NVIDIA Hopper &amp; Ada Lovelace architectures. CuPy now offers the <a href="https://docs.cupy.dev/en/latest/install.html#installing-cupy">cupy-cuda12x</a> binary package, including kernels optimized for H100 GPU and Jetson Orin platform.</p><p>Thanks to the <a href="https://developer.nvidia.com/blog/cuda-toolkit-12-0-released-for-general-availability/#:~:text=CUDA_MODULE_LOADING%3DLAZY%20set.-,Compatibility,-CUDA%20minor%20version">minor version compatibility</a>, the binary package will work with CUDA 12.0 and future 12.x releases, allowing users to quickly upgrade to the latest CUDA minor version without waiting for a new CuPy release.</p><p><em>Acknowledgment: This work has been done by </em><a href="https://www.preferred.jp/en/"><em>Preferred Networks</em></a><em> and </em><a href="https://www.nvidia.com/"><em>NVIDIA</em></a><em>. Part of the work is supported by </em><a href="https://medium.com/cupy-team/cupy-received-grant-as-essential-open-source-software-for-science-e7ad8f7d313b"><em>CZI’s EOSS program</em></a><em>.</em></p><h4><strong>Thrust &amp; CUB Support in CuPy JIT</strong></h4><p>You can now use Thrust functions and CUB reduction classes in kernels defined by CuPy JIT. The following examples illustrate the usage of Thrust for sorting and CUB for calculating the sum.</p><pre>import cupy, cupyx<br><br>@cupyx.jit.rawkernel()<br>def sort_by_key(x, y):<br>    i = cupyx.jit.threadIdx.x<br>    x_array = x[i]<br>    y_array = y[i]<br>    cupyx.jit.thrust.sort_by_key(<br>        cupyx.jit.thrust.device,<br>        x_array.begin(),<br>        x_array.end(),<br>        y_array.begin(),<br>    )<br><br>h, w = (256, 256)<br>x = cupy.arange(h * w, dtype=cupy.int32)<br>cupy.random.shuffle(x)<br>x = x.reshape(h, w)<br>y = cupy.arange(h * w, dtype=cupy.int32)<br>cupy.random.shuffle(y)<br>y = y.reshape(h, w)<br>sort_by_key[1, 256](x, y)</pre><pre>import cupy, cupyx<br>from cupy.cuda import runtime<br>from cupyx import jit<br><br>@jit.rawkernel()<br>def warp_reduce_sum(x, y):<br>    WarpReduce = jit.cub.WarpReduce[cupy.int32]<br>    temp_storage = jit.shared_memory(<br>        dtype=WarpReduce.TempStorage, size=1)<br>    i, j = jit.blockIdx.x, jit.threadIdx.x<br>    value = x[i, j]<br>    aggregator = WarpReduce(temp_storage[0])<br>    aggregate = aggregator.Reduce(value, jit.cub.Sum())<br>    if j == 0:<br>        y[i] = aggregate<br><br>warp_size = 64 if runtime.is_hip else 32<br>h, w = (32, warp_size)<br>x = cupy.arange(h * w, dtype=cupy.int32).reshape(h, w)<br>cupy.random.shuffle(x)<br>y = cupy.zeros(h, dtype=cupy.int32)<br>warp_reduce_sum[h, w](x, y)</pre><p><em>Acknowledgment: This work is based on the implementation done by </em><a href="https://github.com/TsutsuiMasayoshi"><em>Tsutsui Masayoshi</em></a><em> during the summer internship program 2022 at </em><a href="https://www.preferred.jp/en/"><em>Preferred Networks</em></a><em>.</em></p><h3>Upgrading from v11 or earlier</h3><p>Please check out the <a href="https://docs.cupy.dev/en/latest/upgrade.html#cupy-v12">Upgrade Guide</a> for the list of possibly breaking changes since the last major release. In case you are working with multiple GPUs, please note that cupy.cuda.Device() API has been changed to reactivate the previous device when exiting a context manager for better interoperability with other CUDA-powered libraries like PyTorch.</p><h3>Join the CuPy community!</h3><p>CuPy has an active and growing community of developers and users. If you are interested in joining the community, start by talking to core developers in <a href="https://gitter.im/cupy/community">Gitter</a>, filing an issue on GitHub for feature requests or bug reports, or sending a pull request to contribute code or documentation. If you are unsure where to start, take a look at one of the <a href="https://github.com/cupy/cupy/labels/good%20first%20issue">good first issues</a> or try to implement one of the <a href="https://github.com/cupy/cupy/issues/6078">NumPy</a>/<a href="https://github.com/cupy/cupy/issues/6324">SciPy</a> APIs in CuPy.</p><p>Finally, don’t forget to <a href="https://github.com/cupy/cupy/">star us on GitHub</a> and follow our <a href="https://twitter.com/CuPy_Team">Twitter</a> and <a href="https://medium.com/cupy-team">Medium</a> to stay updated on the latest news!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4497315e811e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cupy-team/released-cupy-v12-4497315e811e">Released CuPy v12</a> was originally published in <a href="https://medium.com/cupy-team">CuPy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CuPy Received Grant as Essential Open Source Software for Science]]></title>
            <link>https://medium.com/cupy-team/cupy-received-grant-as-essential-open-source-software-for-science-e7ad8f7d313b?source=rss-441c797d4ede------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7ad8f7d313b</guid>
            <dc:creator><![CDATA[Kenichi Maehashi]]></dc:creator>
            <pubDate>Fri, 11 Nov 2022 02:21:09 GMT</pubDate>
            <atom:updated>2022-11-11T02:21:09.585Z</atom:updated>
            <content:encoded><![CDATA[<p>The CuPy team is pleased to announce that we have been awarded a grant of $350,000 from the <a href="https://chanzuckerberg.com/">Chan Zuckerberg Initiative</a> (CZI) through the <a href="https://chanzuckerberg.com/eoss/">Essential Open Source Software for Science</a> (EOSS) program. Over the next two years, this grant will fund the effort of (1) enhancing <a href="https://docs.cupy.dev/en/latest/reference/scipy.html">SciPy-compatible APIs in CuPy</a> (cupyx.scipy.*), and (2) continuously maintaining CuPy to provide support for the latest GPU platforms in a timely manner. The granted fund will be managed by our fiscal sponsor <a href="https://numfocus.org/">NumFOCUS</a>, a non-profit organization dedicated to supporting scientific open-source projects.</p><p>CZI has been supporting open-source software projects that are essential to biomedical research through its unique EOSS program since 2019. The <a href="https://chanzuckerberg.com/eoss/proposals/enhancing-high-level-scientific-computing-support-in-cupy/">proposal from CuPy</a> was selected as <a href="https://chanzuckerberg.com/eoss/proposals/?cycle=5">one of the grantees in Cycle 5 of the program</a>. In the past cycles, EOSS has <a href="https://chanzuckerberg.com/eoss/proposals/">awarded grants</a> to globally recognized OSS projects, including <a href="https://numpy.org/">NumPy</a>, <a href="https://scipy.org/">SciPy</a>, <a href="https://matplotlib.org/">Matplotlib</a>, <a href="https://pandas.pydata.org/">Pandas</a>, <a href="https://github.com/pypa/pip">pip</a>, <a href="https://conda-forge.org/">conda-forge</a>, and <a href="https://arrow.apache.org/">Apache Arrow</a>. Refer to the <a href="https://cziscience.medium.com/the-key-to-scientific-breakthroughs-improving-access-to-open-source-software-38f04c14accf">announcement from CZI</a> for more information.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7ad8f7d313b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cupy-team/cupy-received-grant-as-essential-open-source-software-for-science-e7ad8f7d313b">CuPy Received Grant as Essential Open Source Software for Science</a> was originally published in <a href="https://medium.com/cupy-team">CuPy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CuPy v11 is now available]]></title>
            <link>https://medium.com/cupy-team/cupy-v11-is-now-available-caa61b26dc40?source=rss-441c797d4ede------2</link>
            <guid isPermaLink="false">https://medium.com/p/caa61b26dc40</guid>
            <category><![CDATA[releases]]></category>
            <category><![CDATA[open-source-software]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Kenichi Maehashi]]></dc:creator>
            <pubDate>Thu, 28 Jul 2022 07:58:01 GMT</pubDate>
            <atom:updated>2022-07-28T07:58:01.220Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*XwyDbTmqLBevzQ68.png" /></figure><p>We are excited to announce the release of CuPy v11! This release is the culmination of the effort in the past seven months, with more than 350 pull requests. The CuPy team would like to thank everyone involved in the development.</p><h3>Highlights</h3><h4>Distributed Collective &amp; P2P Primitives for Sparse Matrix</h4><p>First introduced in <a href="https://medium.com/cupy-team/announcing-cupy-v10-b4b0ed6f470a">CuPy v10</a>, cupyx.distributed package now supports sparse matrices (cupyx.scipy.sparse.*_matrix) in addition to ndarrays. Here is a simple example that computes the sum of sparse matrices from all processes:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c837e7b4b39ff45ab4f03ebd5b2a4fd6/href">https://medium.com/media/c837e7b4b39ff45ab4f03ebd5b2a4fd6/href</a></iframe><p>Check <a href="https://gist.github.com/kmaehashi/bfc01ca32a3330dbd9d856d18577b183">here</a> for the full working code.</p><h4>Unified Binary Package for CUDA 11.2+</h4><p>Previously, CuPy provided binary packages for all supported CUDA releases; cupy-cuda112 for CUDA 11.2, cupy-cuda113 for CUDA 11.3, and so on. CuPy v11 replaces them with a unified binary package named cupy-cuda11x, which supports all CUDA 11.2 ~ 11.x releases. This allows you to upgrade your CUDA installation without reinstalling CuPy, and also improves interoperability with other libraries using CUDA, such as PyTorch.</p><p>For those using CUDA 11.1 or earlier, you can use the regular separate packages (cupy-cuda{102,110,111}), which is also continued to be available in CuPy v11.</p><h4>Arm Server &amp; JetPack 5</h4><p>CuPy v11 now supports CUDA on the Arm Server Base System Architecture (SBSA) platform. This will allow users to deploy GPU workloads at a lower cost by using Arm-based servers like <a href="https://aws.amazon.com/jp/ec2/instance-types/g5g/">G5g instances on Amazon Web Services</a>.</p><p>Support for <a href="https://developer.nvidia.com/jetpack-sdk-50">JetPack 5</a>, the latest SDK for Jetson embedded platform, is also added. We would like to thank NVIDIA for kindly providing the necessary help and access to Jetson platforms.</p><p>You can install the cupy-cuda11x binary package in Arm SBSA and JetPack 5 using:</p><pre>$ pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64</pre><h4>NumPy/SciPy API Coverage</h4><p>CuPy v11 adds new 96 <a href="https://docs.cupy.dev/en/latest/reference/comparison.html">NumPy/SciPy-compatible APIs</a>, increasing the coverage to 85% for NumPy top-level APIs (numpy.*), 82% for SciPy FFT APIs (scipy.fft.*), and 25% for SciPy Special APIs (scipy.special.*). It is worth mentioning that all of these works were done by community contributors. We appreciate everyone for their outstanding contributions, especially <a href="https://github.com/grlee77">Gregory Lee</a>, <a href="https://github.com/cjnolet">Corey J. Nolet</a>, <a href="https://github.com/khushi-411">Khushi Agrawal</a>, and <a href="https://github.com/pri1311">Priya Nagda</a>.</p><pre>cupy.array_equiv<br>cupy.asarray_chkfinite<br>cupy.asfarray<br>cupy.ediff1d<br>cupy.fabs<br>cupy.float_power<br>cupy.format_float_positional<br>cupy.format_float_scientific<br>cupy.intersect1d<br>cupy.isneginf<br>cupy.isposinf<br>cupy.mask_indices<br>cupy.poly<br>cupy.real_if_close<br>cupy.row_stack<br>cupy.setdiff1d<br>cupy.setxor1d<br>cupy.trapz<br>cupy.tril_indices<br>cupy.tril_indices_from<br>cupy.triu_indices<br>cupy.triu_indices_from<br>cupy.union1d<br>cupy.vander</pre><pre>cupyx.scipy.fft.dct<br>cupyx.scipy.fft.dctn<br>cupyx.scipy.fft.dst<br>cupyx.scipy.fft.dstn<br>cupyx.scipy.fft.fht<br>cupyx.scipy.fft.idct<br>cupyx.scipy.fft.idctn<br>cupyx.scipy.fft.idst<br>cupyx.scipy.fft.idstn<br>cupyx.scipy.fft.ifht</pre><pre>cupyx.scipy.spatial.distance_matrix<br>cupyx.scipy.spatial.distance.cdist<br>cupyx.scipy.spatial.distance.minkowski</pre><pre>cupyx.scipy.special.bdtr<br>cupyx.scipy.special.bdtrc<br>cupyx.scipy.special.bdtri<br>cupyx.scipy.special.beta<br>cupyx.scipy.special.betainc<br>cupyx.scipy.special.betaincinv<br>cupyx.scipy.special.betaln<br>cupyx.scipy.special.boxcox<br>cupyx.scipy.special.boxcox1p<br>cupyx.scipy.special.btdtr<br>cupyx.scipy.special.btdtri<br>cupyx.scipy.special.cbrt<br>cupyx.scipy.special.chdtr<br>cupyx.scipy.special.chdtrc<br>cupyx.scipy.special.chdtri<br>cupyx.scipy.special.cosdg<br>cupyx.scipy.special.cotdg<br>cupyx.scipy.special.exp10<br>cupyx.scipy.special.exp2<br>cupyx.scipy.special.expit<br>cupyx.scipy.special.expm1<br>cupyx.scipy.special.expn<br>cupyx.scipy.special.fdtr<br>cupyx.scipy.special.fdtrc<br>cupyx.scipy.special.fdtri<br>cupyx.scipy.special.gammainc<br>cupyx.scipy.special.gammaincc<br>cupyx.scipy.special.gammainccinv<br>cupyx.scipy.special.gammaincinv<br>cupyx.scipy.special.gammasgn<br>cupyx.scipy.special.gdtr<br>cupyx.scipy.special.gdtrc<br>cupyx.scipy.special.i0e<br>cupyx.scipy.special.i1e<br>cupyx.scipy.special.inv_boxcox<br>cupyx.scipy.special.inv_boxcox1p<br>cupyx.scipy.special.log1p<br>cupyx.scipy.special.log_expit<br>cupyx.scipy.special.log_ndtr<br>cupyx.scipy.special.loggamma<br>cupyx.scipy.special.logit<br>cupyx.scipy.special.lpmv<br>cupyx.scipy.special.multigammaln<br>cupyx.scipy.special.nbdtr<br>cupyx.scipy.special.nbdtrc<br>cupyx.scipy.special.nbdtri<br>cupyx.scipy.special.ndtri<br>cupyx.scipy.special.pdtr<br>cupyx.scipy.special.pdtrc<br>cupyx.scipy.special.pdtri<br>cupyx.scipy.special.poch<br>cupyx.scipy.special.psi<br>cupyx.scipy.special.radian<br>cupyx.scipy.special.rgamma<br>cupyx.scipy.special.round<br>cupyx.scipy.special.sinc<br>cupyx.scipy.special.sindg<br>cupyx.scipy.special.sph_harm<br>cupyx.scipy.special.tandg<br>cupyx.scipy.special.xlog1py<br>cupyx.scipy.special.xlogy<br>cupyx.scipy.special.yn</pre><h4>And more!</h4><ul><li>Users can now subclass cupy.ndarray by following the same <a href="https://numpy.org/doc/stable/user/basics.subclassing.html">protocol</a> as numpy.ndarray.</li><li>CUB is now enabled by default, improving performance for many reduction operations.</li><li>Enhanced support and improvement to the CuPy JIT compiler (cupyx.jit), including device functions, cooperative groups, access to the .shape / .stride array attributes, etc.</li><li>The cupy.typing module has been introduced to add type annotations to CuPy code.</li><li>The cupy.einsum() function is accelerated by <a href="https://docs.nvidia.com/cuda/cuquantum/cutensornet/index.html">cuTensorNet</a>, part of the <a href="https://developer.nvidia.com/cuquantum-sdk">NVIDIA cuQuantum SDK</a>. Note that this requires 1. <a href="https://docs.nvidia.com/cuda/cuquantum/python/README.html">cuquantum-python</a> is installed, 2. cutensornet is prepended to the environment variable <a href="https://docs.cupy.dev/en/latest/reference/environment.html#envvar-CUPY_ACCELERATORS">CUPY_ACCELERATORS</a>.</li></ul><h3>Upgrading from v10 or earlier</h3><p>You can refer to the <a href="https://docs.cupy.dev/en/latest/upgrade.html#cupy-v11">Upgrade Guide</a> for the summary of changes that may affect users upgrading from previous CuPy major versions. If you have any feedback, feel free to let us know on <a href="https://github.com/cupy/cupy/issues">GitHub</a>.</p><h3>Join the community!</h3><p>CuPy has an active and growing community of developers and users. If you are interested, you can start by talking to core developers in <a href="https://gitter.im/cupy/community">Gitter</a>, filing an issue on GitHub for feature requests or bug reports, or sending a pull request to contribute code or documentation. If you are unsure where to start, take a look at one of the <a href="https://github.com/cupy/cupy/labels/good%20first%20issue">good first issues</a> or try to <a href="https://github.com/cupy/cupy/issues/6078">implement one of the NumPy APIs in CuPy</a>.</p><p>Finally, don’t forget to <a href="https://github.com/cupy/cupy/">star us on GitHub</a> and follow our <a href="https://twitter.com/CuPy_Team">Twitter</a> and <a href="https://medium.com/cupy-team">Medium</a> to stay updated on the latest news!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=caa61b26dc40" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cupy-team/cupy-v11-is-now-available-caa61b26dc40">CuPy v11 is now available</a> was originally published in <a href="https://medium.com/cupy-team">CuPy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing CuPy v10]]></title>
            <link>https://medium.com/cupy-team/announcing-cupy-v10-b4b0ed6f470a?source=rss-441c797d4ede------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4b0ed6f470a</guid>
            <category><![CDATA[open-source-software]]></category>
            <category><![CDATA[releases]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Kenichi Maehashi]]></dc:creator>
            <pubDate>Thu, 09 Dec 2021 06:44:43 GMT</pubDate>
            <atom:updated>2021-12-09T07:22:02.834Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*jGiT9fmBB7kz2b1tuJvWFQ.png" /></figure><p>The CuPy team is pleased to announce the availability of CuPy v10 today. This release contains more than 2,500 commits in 530 pull requests made by 34 contributors. We would like to thank all the contributors who made the release possible.</p><h3>Highlights</h3><h4>Enhanced Multi-Node/GPU Features</h4><p>The new <em>cupyx.distributed</em> module has been added, which provides collective and peer-to-peer communication primitives for <em>cupy.ndarray</em>, backed by NVIDIA NCCL. This opens the possibility of using CuPy in distributed cluster environments. Here is a simple example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7364f4604d44f58673439d30b439279c/href">https://medium.com/media/7364f4604d44f58673439d30b439279c/href</a></iframe><p>Support for <a href="https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#peer-to-peer-memory-access">peer access</a> has also been added. When calling CuPy functions with <em>ndarray</em> residing in the memory of a different GPU, CuPy automatically enables peer access between devices so that the kernel can access data on another GPU.</p><h3>Arm Architecture Support</h3><p>With many requests from the community, CuPy now provides official support for the Arm (<em>aarch64</em>) platform. Prebuilt binaries (wheels) for NVIDIA Jetson are also available on <a href="https://pypi.org/project/cupy-cuda102/">PyPI</a>, enabling the use of CuPy in edge environments.</p><h3>Improved Just-in-time Transpiler (JIT)</h3><p>First introduced in CuPy v9, the JIT transpiler allows you to define GPU kernels in Python.</p><p>In this release, it is now possible to transpile lambda functions. This is especially handy when using JIT in conjunction with <em>cupy.vectorize</em>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/98181e59b504d888020c731dcf6eeee1/href">https://medium.com/media/98181e59b504d888020c731dcf6eeee1/href</a></iframe><p>JIT APIs have also improved to cover all CUDA atomic functions (<em>cupyx.jit.atomic_add</em>, etc.) and several Python built-in functions (<em>max</em>, <em>min</em>, <em>range</em>, <em>len</em>).</p><h3>More NumPy/SciPy APIs</h3><p>As always, this release contains a lot of newly covered <a href="https://docs.cupy.dev/en/latest/reference/comparison.html">NumPy/SciPy APIs</a>. CuPy v10 comes with 51 new APIs (including aliases) under <em>cupy</em> and <em>cupyx.scipy</em> namespaces:</p><ul><li><em>cupy.alltrue</em></li><li><em>cupy.array2string</em></li><li><em>cupy.cumproduct</em></li><li><em>cupy.frombuffer</em></li><li><em>cupy.fromfunction</em></li><li><em>cupy.fromiter</em></li><li><em>cupy.fromstring</em></li><li><em>cupy.genfromtxt</em></li><li><em>cupy.loadtxt</em></li><li><em>cupy.positive</em></li><li><em>cupy.product</em></li><li><em>cupy.savetxt</em></li><li><em>cupy.sometrue</em></li><li><em>cupy.DataSource</em></li><li><em>cupy.broadcast_shapes</em></li><li><em>cupy.cdouble</em></li><li><em>cupy.cfloat</em></li><li><em>cupy.disp</em></li><li><em>cupy.get_array_wrap</em></li><li><em>cupy.get_printoptions</em></li><li><em>cupy.index_exp</em></li><li><em>cupy.int0</em></li><li><em>cupy.iterable</em></li><li><em>cupy.ndindex</em></li><li><em>cupy.printoptions</em></li><li><em>cupy.s_</em></li><li><em>cupy.safe_eval</em></li><li><em>cupy.set_printoptions</em></li><li><em>cupy.set_string_function</em></li><li><em>cupy.singlecomplex</em></li><li><em>cupy.uint0</em></li><li><em>cupy.random.Generator.geometric</em></li><li><em>cupy.random.Generator.f</em></li><li><em>cupy.random.Generator.hypergeometric</em></li><li><em>cupy.random.Generator.logseries</em></li><li><em>cupy.random.Generator.power</em></li><li><em>cupy.random.Generator.chisquare</em></li><li><em>cupy.random.Generator.binomial</em></li><li><em>cupy.random.Generator.dirichlet</em></li><li><em>cupyx.scipy.fft.hfft2</em></li><li><em>cupyx.scipy.fft.hfftn</em></li><li><em>cupyx.scipy.fft.ihfft2</em></li><li><em>cupyx.scipy.fft.ihfftn</em></li><li><em>cupyx.scipy.sparse.kronsum</em></li><li><em>cupyx.scipy.sparse.linalg.cgs</em></li><li><em>cupyx.scipy.sparse.linalg.lsmr</em></li><li><em>cupyx.scipy.sparse.linalg.minres</em></li><li><em>cupyx.scipy.sparse.coo_matrix.reshape</em></li><li><em>cupyx.scipy.sparse.csr_matrix.reshape</em></li><li><em>cupyx.scipy.sparse.csc_matrix.reshape</em></li><li><em>cupyx.scipy.stats.trim_mean</em></li></ul><p>The development of new distributions in <em>cupy.random.Generator</em> and sparse matrix routines are done by <a href="https://github.com/povinsahu1909">Praveen Sahu</a> through <a href="https://summerofcode.withgoogle.com/archive/2021/projects/5686473654796288/">Google Summer of Code 2021</a>.</p><h3>Adopting the Python Array API Standard</h3><p><a href="https://data-apis.org/blog/array_api_standard_release/">The Python array API Standard</a> is a community effort to define a standard API set for array libraries, making it easy for downstream packages to switch between or support multiple backend libraries. CuPy participates in and supports this standardization as we believe it will give freedom of choice and better interoperability for libraries and users.</p><p>In CuPy v10, <em>cupy.array_api</em>, a counterpart of <em>numpy.array_api</em> (<a href="https://numpy.org/neps/nep-0047-array-api-standard.html">NEP 47</a>, to be included in NumPy v1.22), has been added to provide an Array object compliant with the v2021 specification of the Array API Standard.</p><p>The implementation is based on <em>numpy.array_api</em> initially written by <a href="https://github.com/asmeurer">Aaron Meurer</a> from Quansight and modified for CuPy by <a href="https://github.com/leofang">Leo Fang</a> from Brookhaven National Lab (now NVIDIA). We would like to acknowledge their efforts here.</p><h3>Upgrading from v9</h3><p>We prepared an <a href="https://docs.cupy.dev/en/latest/upgrade.html">Upgrade Guide</a> that summarizes (possibly) breaking changes between major releases. Check it out, and get ready to dive into CuPy v10!</p><h3>Join the Growing Community!</h3><p>CuPy has a great and active community. During the v10 development, 22 out of 34 contributors were first-time participants in CuPy. We are always open to and welcome new contributors! Join <a href="https://gitter.im/cupy/community">Gitter</a> to talk with core developers and users, file an issue for feature request or bug report, and send a pull request to contribute code or documentation. If you are interested but not sure where to start, take a look at one of the <a href="https://github.com/cupy/cupy/labels/good%20first%20issue">good first issues</a>.</p><p>Finally, don’t forget to <a href="https://github.com/cupy/cupy/">star the repository on GitHub</a> and follow us on <a href="https://twitter.com/CuPy_Team">Twitter</a> and <a href="https://medium.com/cupy-team">Medium</a> to stay updated on the latest news!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4b0ed6f470a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cupy-team/announcing-cupy-v10-b4b0ed6f470a">Announcing CuPy v10</a> was originally published in <a href="https://medium.com/cupy-team">CuPy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CuPy v9 is here.]]></title>
            <link>https://medium.com/cupy-team/cupy-v9-is-here-27e9cbfbf7e5?source=rss-441c797d4ede------2</link>
            <guid isPermaLink="false">https://medium.com/p/27e9cbfbf7e5</guid>
            <category><![CDATA[releases]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[open-source-software]]></category>
            <dc:creator><![CDATA[Kenichi Maehashi]]></dc:creator>
            <pubDate>Thu, 22 Apr 2021 05:22:00 GMT</pubDate>
            <atom:updated>2021-05-01T18:00:13.649Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*I1YQqLqoDX55OyH_uubnCQ.png" /></figure><p>We are excited to announce the availability of CuPy v9.0.0. This release contains the effort of development in the past 7 months, including CUDA JIT to transpile Python code to CUDA, support for NVIDIA cuSPARSELt, AMD ROCm support through binary packages, and so on.</p><p>See <a href="https://github.com/cupy/cupy/releases/v9.0.0">here</a> for the full release note.</p><h3>CuPy v9 Highlights</h3><h4>JIT API</h4><p>CuPy v9 introduced the JIT API that allows you to define CUDA kernels in Python code. Here is how the code would look like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b92c3a22ea964f01566bf67572d80210/href">https://medium.com/media/b92c3a22ea964f01566bf67572d80210/href</a></iframe><p>This is an equivalent of a reduction code shown in <a href="https://developer.download.nvidia.com/assets/cuda/files/reduction.pdf">NVIDIA’s slide deck</a> (page 7). You can then execute the kernel like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/30663e3a04e1342b1fff98c6b9d0d5ba/href">https://medium.com/media/30663e3a04e1342b1fff98c6b9d0d5ba/href</a></iframe><p>The JIT API parses the Python code using AST and transpiles it to CUDA code on the fly depending on the dtype of input arrays. So kernels compiled through this API can achieve the same performance level as CUDA kernels directly written in C/C++. You can find the full Python code and transpiled CUDA code <a href="https://gist.github.com/asi1024/06b3481ec90fdd40c23e99ca97f410c0">here</a>.</p><p>Refer to the <a href="https://docs.cupy.dev/en/latest/user_guide/kernel.html#jit-kernel-definition">User Guide</a> for more information about the JIT API.</p><h4>NVIDIA cuSPARSELt Support</h4><p>CuPy now integrates the Python binding for the <a href="https://docs.nvidia.com/cuda/cusparselt/index.html">cuSPARSELt library</a> that accelerates sparse matrix multiplications on NVIDIA Ampere GPUs. We are planning to start using it in CuPy sparse APIs to transparently improve performance.</p><h4>AMD ROCm Binary Packages</h4><p>Support for <a href="https://rocmdocs.amd.com/en/latest/">AMD ROCm Platform</a> has been significantly improved in CuPy v9. You can now install CuPy for ROCm 4.0 via binary package (<em>`pip install </em><a href="https://pypi.org/project/cupy-rocm-4-0/"><em>cupy-rocm-4–0</em></a><em>`</em>). <a href="https://github.com/cupy/cupy/tree/master/docker/rocm">Docker images</a> are also available. See <a href="https://docs.cupy.dev/en/latest/install.html#using-cupy-on-amd-gpu-experimental">Using CuPy on AMD GPU</a> for the detailed instructions.</p><h4>New Random Generator API</h4><p>CuPy v9 implements the new <a href="https://docs.cupy.dev/en/latest/reference/random.html">Random Generator API</a> introduced in NumPy v1.17.</p><p>Since our implementation is based on cuRAND, we currently support the following BitGenerator objects: <em>XORWOW</em> (default), <em>MRG32k3a</em>, and <em>Philox4x3210</em>. Notice that they are different from NumPy ones.</p><p>The new random module is currently in development and <a href="https://github.com/cupy/cupy/issues/4557">more distributions</a> will be added in later releases.</p><h4>Refined Documentations</h4><p>Documentation has also been improved in this release.</p><ul><li>The <a href="https://docs.cupy.dev/en/latest/">documentation website</a> is now powered by a cleaner and widely adopted by the community <a href="https://github.com/pydata/pydata-sphinx-theme">pydata-sphinx-theme</a>.</li><li>The “Tutorial” chapter has been changed to the <a href="https://docs.cupy.dev/en/latest/user_guide/index.html">User Guide</a> so that we can cover more general topics than tutorials.</li><li>The <a href="https://docs.cupy.dev/en/latest/reference/index.html">API Reference</a> has been reorganized to follow the structure of the latest NumPy/SciPy API references to improve the browsing experience.</li></ul><h4>Dropping Support for Python 3.5 and CUDA 9.0</h4><p>Support for Python 3.5 and CUDA 9.0 has been removed in CuPy v9. Use Python 3.6+ and CUDA 9.2+. Please refer to the <a href="https://docs.cupy.dev/en/latest/upgrade.html">Upgrade Guide</a> for more information about the dependency changes.</p><h4>Other Enhancements</h4><p>Besides the major points presented above, there are several minor features in this release that we would like to briefly highlight.</p><ul><li>CuPy is starting to support Generalized Universal Functions on its codebase. This allows <em>`cupy.matmul`</em> to be invoked via NumPy ufunc dispatcher.</li><li>Several new functions added to <em>`cupyx.scipy.ndimage`</em> that became the base for NVIDIA’s newly released <a href="https://github.com/rapidsai/cucim">cuCIM</a> library.</li><li>Performance improvements by extending the use of cuTENSOR to routines such as prod/min/max/mean.</li><li><em>`cupyx.lapack`</em> now as a public interface to cuBLAS.</li><li><em>`cupyx.scipy.sparse`</em> coverage greatly improved.</li><li>Smaller binary packages by omitting cuDNN and NCCL libraries from the distribution. You can easily install these libraries via CuPy’s built-in tool after installing CuPy (`<em>python -m cupyx.tools.install_library</em>`).</li></ul><h3>Acknowledgments</h3><p>CuPy v9 features numerous contributions from the community. We would like to thank everyone involved in CuPy development, including NVIDIA Corporation and the U.S. Department of Energy <a href="https://www.bnl.gov/compsci/computational-lab.php">Brookhaven National Laboratory’s CSI-HPC group</a>.</p><p>We are also happy to <a href="https://groups.google.com/g/cupy/c/Qt5---bvmzw/m/WlqmWBPBDAAJ">welcome developers from AMD to the community</a>. We believe this will boost the development of ROCm support in CuPy.</p><h3>Join the CuPy community!</h3><p>Our community is open to everyone interested in CuPy. Anyone is welcome to join, ask for help, and contribute! Join <a href="https://gitter.im/cupy/community">Gitter</a> to talk with developers and other users, open an issue for feature requests or feedback, and submit a pull-request to contribute to the code and documentation.</p><p>Finally, don’t forget to <a href="https://github.com/cupy/cupy/">watch and star the repository</a> on GitHub and follow us on <a href="https://twitter.com/CuPy_Team">Twitter</a> and <a href="https://medium.com/cupy-team">Medium</a> to stay updated on the latest news!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27e9cbfbf7e5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cupy-team/cupy-v9-is-here-27e9cbfbf7e5">CuPy v9 is here.</a> was originally published in <a href="https://medium.com/cupy-team">CuPy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migration from Chainer to PyTorch]]></title>
            <link>https://medium.com/pytorch/migration-from-chainer-to-pytorch-8ed92c12c8?source=rss-441c797d4ede------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ed92c12c8</guid>
            <category><![CDATA[preferred-networks]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[chainer]]></category>
            <category><![CDATA[pytorch]]></category>
            <dc:creator><![CDATA[Kenichi Maehashi]]></dc:creator>
            <pubDate>Tue, 12 May 2020 01:05:20 GMT</pubDate>
            <atom:updated>2020-05-12T01:17:44.289Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Migration Guide from Chainer to PyTorch</h3><p><em>Authored by Preferred Networks</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*WzuN152uvyFULE5Eal8-oA.png" /></figure><p>Welcome to the migration guide from Chainer to PyTorch! As <a href="https://chainer.org/announcement/2019/12/05/released-v7.html">announced in December 2019</a>, the Chainer team has decided to shift our development efforts to the PyTorch ecosystem. Today we would like to introduce <a href="https://github.com/pfnet/pytorch-pfn-extras"><strong>pytorch-pfn-extras</strong></a> (<strong>PPE</strong>), which bridges the gap between Chainer and PyTorch, and guide you through how you can migrate from Chainer to PyTorch using PPE.</p><h3>What is pytorch-pfn-extras?</h3><p><a href="https://github.com/pfnet/pytorch-pfn-extras">pytorch-pfn-extras</a> is a pure Python library which implements supplementary components for PyTorch. The initial version of the library contains the following features:</p><ul><li><strong>Extensions Manager &amp; Reporter </strong>provides an interface to extend your training code. It is similar to Chainer’s <a href="https://docs.chainer.org/en/stable/reference/training.html">Training API</a>, but training loops are not managed by PPE so that you can use it with your manual training loops or training frameworks like Ignite. PPE is shipped with a variety of extensions for logging, progress bar, parameter/variable statistics, snapshot, etc., which are ported from Chainer.</li><li><strong>Lazy Modules</strong> provides Linear/ConvXd modules that infer the parameter shape so that you can define Linear/ConvXd layers without specifying input data size.</li><li><strong>Distributed Snapshot</strong> provides an extension to manage the generation of snapshot during training.</li></ul><h3>Migration from Chainer code</h3><p>The goal of this section is to illustrate how to translate a script written in Chainer to PyTorch + pytorch-pfn-extras, taking a simple MNIST MLP training script as an example.</p><p>You can see <a href="https://gist.github.com/asi1024/9ed419f652c1c81301ec70b895610a54/06a019bfa112c1903e48b679c2e455e6722ac9c6">the original Chainer code</a> and <a href="https://gist.github.com/asi1024/9ed419f652c1c81301ec70b895610a54">migrated PyTorch code</a> in full. You may notice from the <a href="https://gist.github.com/asi1024/9ed419f652c1c81301ec70b895610a54/revisions?diff=split">diff</a> that these codes are similar to each other.</p><h4>Training/Evaluation loops</h4><p>In the training loop, you can define Extensions Manager (ppe.training.ExtensionsManager) and inject Extensions to the manager to enrich your training loop. The manager has a role similar to the Trainer object in Chainer, but it does not manage the training loop itself.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc15f34bf8ae865db560524292ffa0a2/href">https://medium.com/media/fc15f34bf8ae865db560524292ffa0a2/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/52e09fae0c580e6c3639949518911e5e/href">https://medium.com/media/52e09fae0c580e6c3639949518911e5e/href</a></iframe><p>The manager object manages extensions registered and calls them accordingly.</p><p>manager counts up the number of iterations each time the context manager manager.run_iteration() is called. ppe.reporting.report is called len(train_iter) times during one epoch, and the average of them is displayed at the end of epoch.</p><pre><em># Chainer<br></em>trainer.run()</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/84f3e0d710b1ecac569b02c059da32dc/href">https://medium.com/media/84f3e0d710b1ecac569b02c059da32dc/href</a></iframe><p>The evaluation function can be specified to extensions.Evaluator as an argument eval_func. It will be called automatically at each end of the epochs. The argument passed to the evaluation function is a single unit of batch of test_iter.</p><h4>Models</h4><p>Most functions and links (“module” in PyTorch terms) in Chainer are available in PyTorch. Please refer to the <a href="https://docs.google.com/document/d/1EkUytcAUiw1NiU58jIwYx7oWgJE7jm7PZ_Ls2l2AcSo/edit#heading=h.mkuuagm60br0">mapping table</a> in the Framework Migration Guide.</p><p>The following example illustrates the difference of network definition in both frameworks:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff11d8dcb80574bf5162f92232a8cb99/href">https://medium.com/media/ff11d8dcb80574bf5162f92232a8cb99/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7bc6961caa84213a3937b64a12c0ba4/href">https://medium.com/media/e7bc6961caa84213a3937b64a12c0ba4/href</a></iframe><p>In the PyTorch code above, we use the LazyLinear module implemented in PPE. Unlike torch.nn.Linear module, it accepts None as an input size argument; in this case the size of inputs is inferred during the forward process. Note that you need to run a dummy forward call before registering parameters to the optimizer (see the full code for details).</p><h4>Snapshot</h4><p>You can take snapshots by using the snapshot extension.</p><pre><em># Chainer<br></em>trainer.extend(extensions.snapshot(n_retains=1, autoload=True), trigger=(frequency, &#39;<strong>epoch</strong>&#39;))</pre><pre><em># PyTorch<br></em>manager.extend(ppe.training.extensions.snapshot(), trigger=(frequency, &#39;<strong>epoch</strong>&#39;))</pre><p>All information used in a training loop (e.g., models, optimizers, updaters, iterators) are collected from the manager and serialized accordingly. When used in conjunction with torch.distributed, pass saver_rank keyword argument to the snapshot extension to tell the MPI rank which will write the actual snapshot.</p><p>All the ranks need to execute the extension due to synchronization happening inside. Otherwise, a deadlock will happen.</p><h3>Further Reading</h3><p>For further information, please see our <a href="https://chainer.github.io/migration-guide/">Framework Migration Guide</a> and <a href="https://github.com/pfnet/pytorch-pfn-extras/tree/master/example">examples</a> in pytorch-pfn-extras repository.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ed92c12c8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pytorch/migration-from-chainer-to-pytorch-8ed92c12c8">Migration from Chainer to PyTorch</a> was originally published in <a href="https://medium.com/pytorch">PyTorch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>