make_tensor#

nvmath.device.make_tensor(
array: ndarray,
layout: Layout,
) OpaqueTensor[source]#

make_tensor is a helper function for creating nvmath.device.OpaqueTensor objects.

Parameters:
  • array (np.ndarray) – The input array to be wrapped as an OpaqueTensor.

  • layout (Layout) – The layout of the tensor, which describes how the data is organized in memory.

Refer to the cuBLASDx documentation for more details on how to use this function: https://docs.nvidia.com/cuda/cublasdx/api/other_tensors.html#create-tensor-other-label