1. A method comprising: accessing, at a computing device, data descriptive of a graph representing a program, wherein the graph includes multiple nodes representing execution steps of the program and includes multiple edges representing data transfer steps; determining at least two heterogeneous hardware resources of the computing device that are available to execute code represented by one or more of the multiple nodes; determining one or more paths from a source node to a sink node based on a topology of the graph; determining cost functions associated with the one or more paths; and scheduling execution of code at the at least two heterogeneous hardware resources, wherein the code is represented by at least one of the multiple nodes, and wherein the execution of the code is scheduled based on the cost functions.