MCPcopy Create free account
hub / github.com/dmlc/xgboost / cuda_array_interface

Function cuda_array_interface

python-package/xgboost/_data_utils.py:116–120  ·  view source on GitHub ↗

Make cuda array interface str.

(data: _CudaArrayLikeArg)

Source from the content-addressed store, hash-verified

114
115
116def cuda_array_interface(data: _CudaArrayLikeArg) -> bytes:
117 """Make cuda array interface str."""
118 interface = cuda_array_interface_dict(data)
119 interface_str = bytes(json.dumps(interface), "utf-8")
120 return interface_str
121
122
123def from_array_interface(interface: ArrayInf, zero_copy: bool = False) -> NumpyOrCupy:

Callers 7

inplace_predictMethod · 0.85
_grad_arrinfFunction · 0.85
_from_cupy_arrayFunction · 0.85
_meta_from_cudf_dfFunction · 0.85
_meta_from_cudf_seriesFunction · 0.85
_meta_from_cupy_arrayFunction · 0.85

Calls 1

Tested by

no test coverage detected