init(_:)
Initializes an MPSGraphTensorData with an MTLTensor.
Declaration
init(_ tensor: any MTLTensor)Parameters
- tensor:
MTLTensor to be used within the MPSGraphTensorData
Return Value
A valid MPSGraphTensorData, or nil if allocation failure.
Discussion
The internal storage of the MTLTensor will be aliased. Requires tensor to support MTLTensorUsageMachineLearning.