I just came across Glow which seems to do what I’m after?

  
      github.com
  
  
    pytorch/glow/blob/master/docs/AOT.md 18
# Creating standalone executable bundles

This document provides a short description about producing ahead-of-time
compiled executable bundles. The motivation for this work is to remove the cost
of compile time by allowing the users of Glow to compile the package ahead of
time.

## Overview

A bundle is a self-contained compiled network model that can be used to execute
the model in a standalone mode. After following the instructions in this
document and the [Makefile](../examples/bundles/resnet50) in the example
directory you will be able to compile convolutional neural networks into small
executables. Example:

```
  $make
  ...

  $cd build


  This file has been truncated. show original