pypi cupy 5.0.0b4
v5.0.0b4

latest releases: 14.2.0, 14.1.1, 14.1.0...
8 years ago

This is the release note of v5.0.0b4. See here for the complete list of solved issues and merged PRs.

Highlights

  • CuPy starts supporting __cuda_array_interface__, which is the CUDA array interchange interface compatible with Numba>=0.39.0. It means you can now pass CuPy arrays to kernels JITed with Numba. The folowing is a simple example code borrowed from numba/numba#2860:
import cupy
from numba import cuda

@cuda.jit
def add(x, y, out):
    start = cuda.grid(1)
    stride = cuda.gridsize(1)
    for i in range(start, x.shape[0], stride):
        out[i] = x[i] + y[i]

a = cupy.arange(10)
b = a * 2
out = cupy.zeros_like(a)

print(out)  # => [0 0 0 0 0 0 0 0 0 0]

add[1, 32](a, b, out)

print(out)  # => [ 0  3  6  9 12 15 18 21 24 27]
  • Improved performance.
  • Implemented cumsum and cumprod to ndarray.
  • Implemented cupy.allclose
  • Enhanced cuDNN RNN functionality including FP16 support.

New Features

  • Implement __cuda_array_interface__ (#1144, thanks @seibert!)
  • Support FP16 and FP64 in cuDNN RNN related functions (#1471)
  • Implement <t>tpttr and <t>trttp of cuBLAS (#1492)
  • Add cumsum and cumprod to ndarray (#1500)
  • Add cupyx.scipy.get_array_module (#1513)
  • Implement cupy.allclose (#1522, thanks @tsurumeso!)
  • Add mem_info to Device (#1538, thanks @larsoner!)

Enhancements

  • Avoid keeping Device object in Memory and MemoryPointer (#946)
  • Speed up ElementwiseKernel launch (#1318)
  • Improve memory allocation performance (#1343)
  • Fix styles for latest autopep8 (#1352)
  • Use CScalar in elementwise and reduction (#1447)
  • Define ndarray.__iter__ (#1449)
  • Move cupy.sparse to cupyx.scipy.sparse (#1451)
  • Support negative indices in array_split (#1454)
  • Avoid collections.sequence (#1456)
  • Avoid variable name l to follow pep8 (#1460)
  • Simplify nonzero function (#1487)
  • Use TensorCore for matmul with fp32 matrixes (#1493)
  • Support nonzero for complex types (#1501)
  • Change type checking rules of Fusion ufuncs (#1507)
  • Fix minor issues on coding style (#1509)
  • Fix errors in NumPy 1.15 (#1514)
  • Use collections.abc to avoid DeprecationWarning in Python 3.7 (#1515)
  • Support loop_prep in ufunc (#1537)
  • Add _has_memory_hooks to avoid thread local dictionary operation (#1540)
  • Add specialized CUDA kernel for fill function (#1541)
  • Improve ndarray creation performance (#1542)
  • Use xorshift128 to reduce global memory access (#1546)
  • Add cdef and cpdef for better cythonize core.pyx (#1548)

Bug Fixes

  • Fix errors on 0-sized inputs (#1459)
  • Use cython.no_gc to avoid memory leak (#1463)
  • Fix cupy.random.dirichlet to behave same as numpy.random.dirichlet (#1468)
  • Fix indexing behavior when input is zero-sized array (#1503)
  • Fix cupy.real and cupy.imag (#1504)
  • Avoid compile error in old GCC (CentOS 6) (#1506)
  • Fix thrust memory allocation problem (#1511)
  • Fix dtype order of create_comparison (#1551)
  • Raise error when trying to broadcast out_params in ElementwiseKernel (#1552)

Documentation

  • Add upgrade guide for cupyx namespaces (#1467)
  • Fix docstring about free_all_free (#1519)
  • Update agnostic code tutorial (#1521, thanks @w-m!)

Tests

  • Fix sparse test (#1452)
  • Avoid hacking: Use the same test settings as Chainer (#1477)

Don't miss a new cupy release

NewReleases is sending notifications on new releases.