---
title: "serialize(package:descriptor:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraphexecutable/serialize(package:descriptor:)"
---

# serialize(package:descriptor:)

Serialize the MPSGraph executable at the provided url.

## Declaration

```swift
func serialize(package url: URL, descriptor: MPSGraphExecutableSerializationDescriptor?)
```

## Parameters

- `url`: The URL where to serialize the MPSGraph executable.
- `descriptor`: The descriptor to be used to serialize the graph.
