Contents

makeTensor(descriptor:)

Creates a tensor with the specified descriptor.

Declaration

func makeTensor(descriptor: MTLTensorDescriptor) throws -> any MTLTensor

Parameters

  • descriptor:

    The tensor descriptor configuring the data plane and auxiliary planes.

Return Value

A tensor, or nil if validation fails.

Discussion

This method validates the constraints documented on MTLTensorDescriptor.