-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
352 lines (300 loc) · 18.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Halide</title>
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
<meta name="description" content="">
<meta name="author" content="Jonathan Ragan-Kelley">
<!-- Le styles -->
<link href="../assets/css/bootstrap.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 40px;
padding-bottom: 40px;
}
</style>
<!-- Font Awesome icons -->
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="../assets/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
<link href="../assets/css/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../assets/js/prettify.js"></script>
<link href="../assets/css/prettify-sunburst.css" type="text/css" rel="stylesheet" />
</head>
<body onload="prettyPrint()" >
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="nav-collapse">
<ul class="nav">
<li><a href="#gettingstarted">Getting Started</a></li>
<li><a href="/tutorials/tutorial_introduction.html">Tutorials</a></li>
<li><a href="#publications">Publications</a></li>
<li><a href="#resources">Resources</a></li>
<li class="divider-vertical"></li>
<li><a href="/docs">Docs</a></li>
<li><a href="http://github.com/halide/Halide/issues">Bugs</a></li>
<li><a href="https://buildbot.halide-lang.org/master/#/builders?tags=%2Bmain">Build bots</a></li>
<!-- <li><a href="http://github.com/halide/Halide/wiki">Wiki</a></li> -->
<li class="divider-vertical"></li>
<li><a href="http://stackoverflow.com/questions/tagged/halide"><i class="fa fa-stack-overflow"></i>/#halide</a></li>
<!--
<li class="divider-vertical"></li>
<li><a href="demo">Demo</a></li>
-->
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<a href="https://github.com/halide/Halide"><img style="position: fixed; top: 0; right: 0; border: 0; z-index: 1031;"
decoding="async" width="149" height="149"
src="https://github.blog/wp-content/uploads/2008/12/forkme_right_red_aa0000.png?resize=149%2C149"
alt="Fork me on GitHub" loading="lazy" data-recalc-dims="1"></a>
<!-- Main hero unit for a primary marketing message or call to action -->
<header class="hero-unit">
<div class="container">
<h1>Halide</h1>
<p>a language for fast, portable computation on images and <a style="color: #000" href="https://twitter.com/jrk/status/837788386718994432">tensors</a></p>
</div>
</header>
<div class="container" data-spy="scroll" data-target=".nav-collapse" data-offset="15">
<section id="overview">
<div class="page-header">
<h1>Overview</h1>
</div>
<p>
Halide is a programming language designed to make it easier to write high-performance image and array processing code on modern machines. Halide currently targets:
</p>
<ul>
<li>CPU architectures: X86, ARM, MIPS, Hexagon, PowerPC, RISC-V</li>
<li>Operating systems: Linux, Windows, macOS, Android, iOS, Qualcomm QuRT</li>
<li>GPU Compute APIs: CUDA, OpenCL, OpenGL Compute Shaders, Apple Metal, Microsoft Direct X 12</li>
</ul>
<p>
Rather than being a standalone programming language, Halide is embedded in C++. This means you write C++ code that builds an in-memory representation of a Halide pipeline using Halide's C++ API. You can then compile this representation to an object file, or JIT-compile it and run it in the same process.
</p>
<!-- TODO big idea: separate schedule -->
<p>The following function defines and sets the schedule for a 3x3 box filter defined as a series of two 3x1 passes:
<pre class="prettyprint lang-cpp">Func blur_3x3(Func input) {
Func blur_x, blur_y;
Var x, y, xi, yi;
// The algorithm - no storage or order
blur_x(x, y) = (input(x-1, y) + input(x, y) + input(x+1, y))/3;
blur_y(x, y) = (blur_x(x, y-1) + blur_x(x, y) + blur_x(x, y+1))/3;
// The schedule - defines order, locality; implies storage
blur_y.tile(x, y, xi, yi, 256, 32)
.vectorize(xi, 8).parallel(y);
blur_x.compute_at(blur_y, x).vectorize(x, 8);
return blur_y;
}
</pre></p>
</section>
<section id="gettingstarted">
<div class="page-header">
<h1>Getting Started</h1>
</div>
<p>First, install Halide. Even if you only intend to use Halide from C++, pip may be the easiest way to get a binary build of Halide. Full releases may be installed from <a href="https://pypi.org/project/halide">PyPI</a> like so:</p>
<p><pre class="prettyprint">$ pip install halide</pre></p>
<p>Every commit to main is published to <a href="https://test.pypi.org/project/halide">Test PyPI</a> as a development version and these may be installed with a few extra flags:</p>
<p><pre class="prettyprint">$ pip install halide --pre --extra-index-url https://test.pypi.org/simple</pre></p>
<p>We also provide binary tarballs on <a href="https://github.com/halide/Halide/releases">GitHub</a>.</p>
<p>For the freshest builds, see the <a href="https://buildbot.halide-lang.org/">continuous build server</a>. The status of the build on each platform is <a href="https://buildbot.halide-lang.org/master/#/builders?tags=%2Bmain">here</a>. If it's green, then it has passed all of our internal tests.</p>
<p>If you would prefer to build Halide from source, see <a href="https://github.com/halide/Halide/tree/main/README.md">README</a> for instructions.</p>
<p>To get started writing code, look through the <a href="/tutorials/tutorial_introduction.html">tutorials</a>, and the <a href="https://github.com/halide/Halide/tree/main/apps">example apps</a>. The <a href="https://github.com/halide/Halide/tree/main/test">tests</a> are small self-contained programs that cover all corners of the language, so they can also be instructive. However they're not designed to teach, so you may find them cryptic.</p>
<p>If you have a question, post on our <a href="https://github.com/halide/Halide/discussions">GitHub Discussions</a> board.</p>
<!-- TODO explain main data types, usage -->
<!-- TODO explain, show JIT vs. static compilation -->
<h2>Videos</h2>
<p>We gave a talk on Halide at CppCon 2020 that serves as a good overview of what the language is all about.</p>
<iframe width="800" height="450" src="https://www.youtube.com/embed/1ir_nEfKQ7A?start=15" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br/>
<p>To go deeper, here's how an expert actually uses Halide, scheduling the same algorithm described in the talk above.</p>
<iframe width="800" height="450" src="https://www.youtube.com/embed/UeyWo42_PS8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br/>
<h2>Course Notes</h2>
<p>We taught a <a href="cvpr2015.html">course on Halide</a> at CVPR 2015. The course notes are a useful introduction to Halide.</p>
<p>Frédo Durand also taught an introduction to Halide in his <a href="https://stellar.mit.edu/S/course/6/sp15/6.815/index.html">6.815/6.865</a> computational photography course at MIT.</p>
<ul>
<li><a href="http://stellar.mit.edu/S/course/6/sp15/6.815/courseMaterial/topics/topic2/lectureNotes/14_Halide_print/14_Halide_print.pdf">Lecture 1</a></li>
<li><a href="http://stellar.mit.edu/S/course/6/sp15/6.815/courseMaterial/topics/topic2/lectureNotes/15_Halide2/15_Halide2.pdf">Lecture 2</a></li>
<li><a href="http://stellar.mit.edu/S/course/6/sp15/6.815/courseMaterial/topics/topic2/lectureNotes/16_Halide_3/16_Halide_3.pdf">Lecture 3</a></li>
<li><a href="http://stellar.mit.edu/S/course/6/sp15/6.815/courseMaterial/topics/topic2/lectureNotes/17_Halide4/17_Halide4.pdf">Lecture 4</a></li>
</ul>
</section>
<section id="publications">
<div class="page-header">
<h1>Publications</h1>
</div>
<p>
These academic publications describe the ideas behind Halide
and its scheduling model. Halide syntax changes over time,
so don't rely on them for correct syntax.
The <a href="/tutorials/tutorial_introduction.html">tutorials</a>
are a better introduction to Halide's syntax.
</p>
<p>
<strong><a href="https://dl.acm.org/doi/10.1145/3150211">Halide: decoupling algorithms from schedules for high-performance image processing</a></strong>
<br/>
<a href="http://people.csail.mit.edu/jrk">Jonathan Ragan-Kelley</a>,
<a href="https://andrew.adams.pub/">Andrew Adams</a>,
<a href="http://www.dsharlet.com">Dillon Sharlet</a>,
<a href="http://www.connellybarnes.com/work/">Connelly Barnes</a>,
<a href="http://people.csail.mit.edu/sparis">Sylvain Paris</a>,
<a href="http://graphics.stanford.edu/~levoy">Marc Levoy</a>,
<a href="http://people.csail.mit.edu/saman">Saman Amarasinghe</a>,
<a href="http://people.csail.mit.edu/fredo">Frédo Durand</a>.
<br/>
<em>Communications of the ACM (Research Highlights)</em>
</p>
<p>
<strong><a href="papers/autoscheduler2019.html">Learning to Optimize Halide with Tree Search and Random Programs</a></strong>
<br/>
<a href="https://andrew.adams.pub/">Andrew Adams</a>,
<a href="http://github.com/karimama/">Karima Ma</a>,
<a href="https://people.csail.mit.edu/lukea/">Luke Anderson</a>,
<a href="https://people.csail.mit.edu/baghdadi/">Riyadh Baghdadi</a>,
<a href="https://people.csail.mit.edu/tzumao">Tzu-Mao Li</a>,
<a href="http://mgharbi.com">Michaël Gharbi</a>,
<a href="http://bsteiner.info/">Benoit Steiner</a>,
<a href="http://github.com/steven-johnson/">Steven Johnson</a>,
<a href="http://graphics.stanford.edu/~kayvonf/">Kayvon Fatahalian</a>,
<a href="https://people.csail.mit.edu/fredo">Frédo Durand</a>,
<a href="http://people.csail.mit.edu/jrk">Jonathan Ragan-Kelley</a>.
<br/>
<em>SIGGRAPH 2019</em>
</p>
<p>
<strong><a href="http://gradients.halide-lang.org/">Differentiable Programming for Image Processing and Deep Learning in Halide</a></strong>
<br/>
<a href="https://people.csail.mit.edu/tzumao">Tzu-Mao Li</a>,
<a href="http://mgharbi.com">Michaël Gharbi</a>,
<a href="https://andrew.adams.pub/">Andrew Adams</a>,
<a href="https://people.csail.mit.edu/fredo">Frédo Durand</a>,
<a href="http://people.csail.mit.edu/jrk">Jonathan Ragan-Kelley</a>.
<br/>
<em>SIGGRAPH 2018</em>
</p>
<p>
<strong><a href="http://graphics.cs.cmu.edu/projects/halidesched/">Automatically Scheduling Halide Image Processing Pipelines</a></strong>
<br/>
<a href="http://rmullapudi.bitbucket.org/">Ravi Teja Mullapudi</a>,
<a href="https://andrew.adams.pub/">Andrew Adams</a>,
<a href="http://www.dsharlet.com">Dillon Sharlet</a>,
<a href="http://people.csail.mit.edu/jrk">Jonathan Ragan-Kelley</a>,
<a href="http://www.cs.cmu.edu/~kayvonf/">Kayvon Fatahalian</a>.
<br/>
<em>SIGGRAPH 2016</em>
</p>
<p>
<strong><a href="http://people.csail.mit.edu/jrk/jrkthesis.pdf">Decoupling Algorithms from the Organization of Computation for High Performance Image Processing</a></strong>:
The design and implementation of the Halide language and compiler<br/>
<a href="http://people.csail.mit.edu/jrk">Jonathan Ragan-Kelley</a><br/>
Ph.D. dissertation, MIT, May 2014.
</p>
<p>
<strong><a href="http://people.csail.mit.edu/jrk/halide-pldi13.pdf">Halide: A Language and Compiler for Optimizing Parallelism, Locality, and Recomputation in Image Processing Pipelines</a></strong>
<br/>
<a href="http://people.csail.mit.edu/jrk">Jonathan Ragan-Kelley</a>,
<a href="http://www.connellybarnes.com/work/">Connelly Barnes</a>,
<a href="https://andrew.adams.pub/">Andrew Adams</a>,
<a href="http://people.csail.mit.edu/sparis">Sylvain Paris</a>,
<a href="http://people.csail.mit.edu/fredo">Frédo Durand</a>,
<a href="http://people.csail.mit.edu/saman">Saman Amarasinghe</a>.
<br/>
<em>PLDI 2013</em>
</p>
<p>
<strong><a href="http://people.csail.mit.edu/jrk/halide12">Decoupling Algorithms from Schedules for Easy Optimization of Image Processing Pipelines</a></strong>
<br/>
<a href="http://people.csail.mit.edu/jrk">Jonathan Ragan-Kelley</a>,
<a href="https://andrew.adams.pub/">Andrew Adams</a>,
<a href="http://people.csail.mit.edu/sparis">Sylvain Paris</a>,
<a href="http://graphics.stanford.edu/~levoy">Marc Levoy</a>,
<a href="http://people.csail.mit.edu/saman">Saman Amarasinghe</a>,
<a href="http://people.csail.mit.edu/fredo">Frédo Durand</a>.
<br/>
<em>SIGGRAPH 2012</em>
</p>
<p>
<iframe width="800" height="450" src="https://www.youtube.com/embed/3uiEyEKji0M" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br/>
This older talk is a companion to the papers. It describes the
philosophy of Halide, and the ideas behind the scheduling
model.
</p>
</section>
<section id="resources">
<div class="page-header">
<h1>Resources</h1>
</div>
<dl>
<dt><i class="fa fa-github"></i> Development</dt>
<dd><a href="/tutorials/tutorial_introduction.html">tutorials</a></dd>
<dd><a href="/docs">docs</a></dd>
<dd><a href="https://github.com/halide/Halide/wiki">wiki</a></dd>
<dd><a href="https://github.com/halide/Halide/issues">issues</a></dd>
<dd><a href="https://github.com/halide/Halide">code</a></dd>
<dt><i class="fa fa-envelope"></i> Mailing Lists</dt>
<dd>
<a href="https://lists.csail.mit.edu/mailman/listinfo/halide-announce">halide-announce</a>
- announcement of releases and other news.
</dd>
<dd>
<a href="https://lists.csail.mit.edu/mailman/listinfo/halide-dev">halide-dev</a>
- technical discussion on the development and use of Halide. When in doubt, ask here for help.
</dd>
<dt><i class="fa fa-stack-overflow"></i> Stack Overflow</dt>
<dd>
<a href="http://stackoverflow.com/questions/tagged/halide">#halide</a>
</dd>
<dt><i class="fa fa-legal"></i> License</dt>
<dd>Halide is open source, under a <a href="https://github.com/halide/Halide/blob/main/LICENSE.txt">commercially permissive MIT license</a>. We encourage you to use it in other projects, open source or commercial!</dd>
</dl>
</section>
</div> <!-- /container -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../assets/js/jquery.js"></script>
<script src="../assets/js/bootstrap-transition.js"></script>
<script src="../assets/js/bootstrap-alert.js"></script>
<script src="../assets/js/bootstrap-modal.js"></script>
<script src="../assets/js/bootstrap-dropdown.js"></script>
<script src="../assets/js/bootstrap-scrollspy.js"></script>
<script src="../assets/js/bootstrap-tab.js"></script>
<script src="../assets/js/bootstrap-tooltip.js"></script>
<script src="../assets/js/bootstrap-popover.js"></script>
<script src="../assets/js/bootstrap-button.js"></script>
<script src="../assets/js/bootstrap-collapse.js"></script>
<script src="../assets/js/bootstrap-carousel.js"></script>
<script src="../assets/js/bootstrap-typeahead.js"></script>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33707859-1']);
_gaq.push(['_setDomainName', 'halide-lang.org']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>