Previous | Next --- Slide 40 of 56
Back to Lecture Thumbnails
Arnie

In our assignments, optimizing involved fine-tuning our algorithm to the particular piece of hardware we were using. For example, in Assignment 4, the number of threads we created in the workers was based on the number of cores in our worker computers.

Halide and other DSL's take a different approach. Instead of having to rewrite your code every time you switch machines, you identify dependencies and opportunities for parallelization, and Halide creates code which will be efficient for whatever machine it's running on. This is called decoupling of algorithm and schedule, since the algorithm (the code you write) stays the same regardless of the platform, and the schedule is decided by Halide based on the platform.