Hello, World!
Here is the quickest way to get started with Weco.
This tutorial demonstrates core features of Weco by speeding up a simple PyTorch module.
Prerequisites: You'll need a terminal and Python 3.8 or newer.
Run the optimization
Weco will now run 10 iterations to optimize module.py. At each iteration, it will:
- Generate an improved version of the module and update the file
- Run
evaluate.pyto measure the speedup - Use the results to propose the next optimization
After 10 iterations, module.py will contain the fastest version discovered.
Weco can optimize any code file, not just kernels. In the next page, you'll learn how to set up your own optimization.
Watch the optimization in action
In CLI
Watch Weco speed up the kernel in action:

In Browser
We also provide a dashboard that you can use to visualize and interact with the optimization process.
See the example optimization run here.

🎯 Next Step: Optimize Your Own Code
Great job! You've successfully run Weco on an example project. Now it's time to apply it to your own code.
In the next guide, you'll learn:
- ✅ How to create evaluation scripts for your code
- ✅ Step-by-step instructions to optimize your own projects
- ✅ Best practices for getting the best results from Weco