Tutorials

SOL is a machine learning compiler for deep learning applications. It optimizes deep learning models from popular frameworks for inference and training. This tutorial will guide you through the basics of using SOL first and then present some advanced options for a finer grained control of its behavior. This tutorial consists of four sections:

  • Preparation gives you some simple examples on how to create a model in a framework of your choice. If you are familiar with your chosen framework you can skip this section.

    • Creating a simple neural network model (or loading a pre-trained one)
  • Basics will guide you through the basics of SOL usage, including:

    • Optimizing a model with SOL
    • Running inference with the optimized model
    • Training the optimized model
  • Advanced shows further possibilities to control SOL’s settings and behavior, as well as showcasing some features that are enabled by SOL:

    • Understanding and controlling console output
    • Running on a separate device
    • Using an unsupported device
    • Cross Framework Execution
  • Deployment is an advanced feature of SOL that allows you to compile neural networks into standalone binaries. This section explains:

    • SOL deployment’s python API and its options
    • How to compile a simple example
    • How to package the output

Installing SOL

To use SOL you need a user account. (For details, see SOL Installation) If you have an account, you can install it simply using pip:

pip install --upgrade nec-sol
nec-sol install

Quick Start

SOL is meant to be easily used without extensive changes to existing code and has no complicated parameters to learn. You only need two lines of code to optimize a model. Add SOL to your imports in your python script and call sol.optimize() on your model.

import sol
...
model = sol.optimize(model)

No further changes to your script are needed.

If you are looking for examples or a more detailed understanding of SOL you can explore the rest of this tutorial.