9408ebcb3f9ef1420640febf67b48c48fdcd2dd8,distributed/protocol/cupy.py,,serialize_cupy_ndarray,#Any#,40

Before Change


        x = cupy.array(x, copy=True)

    header = x.__cuda_array_interface__.copy()
    return header, [x]


@cuda_deserialize.register(cupy.ndarray)
def deserialize_cupy_array(header, frames):

After Change



    header = x.__cuda_array_interface__.copy()
    header["strides"] = tuple(x.strides)
    frames = [
        cupy.ndarray(
            shape=(x.nbytes,), dtype=cupy.dtype("u1"), memptr=x.data, strides=(1,)
        )
    ]

    return header, frames

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dask/distributed
Commit Name: 9408ebcb3f9ef1420640febf67b48c48fdcd2dd8
Time: 2020-02-16
Author: jakirkham@gmail.com
File Name: distributed/protocol/cupy.py
Class Name:
Method Name: serialize_cupy_ndarray


Project Name: ChrisCummins/clgen
Commit Name: 25c56ac402a4dfbfbc0e8b356151d7d13a23b6f9
Time: 2018-05-28
Author: chrisc.101@gmail.com
File Name: deeplearning/clgen/models/data_generators.py
Class Name: LazyVectorizingGenerator
Method Name: __next__


Project Name: hpclab/rankeval
Commit Name: f4cd8c9096ea0d0baaf5e7f26effb1e438b14f2a
Time: 2017-12-14
Author: trani.salvatore@gmail.com
File Name: rankeval/dataset/svmlight_format.py
Class Name:
Method Name: dump_svmlight_file