METAL-PACK(1) | Metal | METAL-PACK(1) |
metal-pack - Metal binary optimizing packer
metal-pack [filenames...] [options]
metal-pack combines a list of metallibs, machos, or universal binaries into a single output file.
The format of the output file depends on the input files. If all input files share the same architecture, a thin binary is generated. Otherwise a universal binary is emitted.
Inputs files can contain different kinds of resources: metallibs, descriptors, reflections, and sources. How to optimize each kind of resource can be controlled using the -pack-metallibs, -pack-descriptors, -pack-reflections, and -pack-sources options.
There are three different packing policies.
The none policy just copies the resources from the input files into the output file. If a referenced resource is not directly stored into the input file -- e.g. a temporary file -- just the reference to the resource is copied -- e.g. the path to the temporary file.
The internal policy embeds each resource referenced by each slice into the slice itself. So, for instance, if the foo.airr reflection is referenced by the amdgpu_gfx600 slice, the reflection is inlined into the amdgpu_gfx600 slice itself. If the same reflection is referenced by multiple slices, it will be stored multiple times into each slice.
The external policy is an experimental policy where common resources referenced by multiple slices are stored in a common slice in the output file.
The -pack-metallibs and -pack-descriptors options only supports the internal packing policy.
metal-pack supports the following options:
To report bugs, please visit <https://developer.apple.com/bug-reporting/>.
Metal Shading Language Specification: <https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf>
2014-2024, The Metal Team
April 30, 2024 | 32023 |