---
title: "init(_:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Initializer
path: "metalperformanceshadersgraph/mpsgraphtensordata/init(_:)-9kgoe"
---

# init(_:)

Initializes a tensor data with an MPS vector.

## Declaration

```swift
init(_ vector: MPSVector)
```

## Parameters

- `vector`: MPSVector to be used within the MPSGraphTensorData

## Return Value

Return Value A valid MPSGraphTensorData, or nil if allocation failure.

## Discussion

Discussion The device of the MPSVector will be used to get the MPSDevice for this MPSGraphTensorData.
