Previous | Next --- Slide 34 of 73
Back to Lecture Thumbnails
mvpatel2000

In this lecture, we talked a lot about how using a higher level language can lead to increased programming efficiency which likely supersedes benefits of low level control as the programmer can try more ideas faster and not get stuck debugging. Unfortunately, a language abstraction likely has some loss of peak performance due to lack of granularity in control. I wonder if there's a way to build language abstractions for internal DSLs that "compile" to the base language. In this case, we could write Halide code and spit out this code. This would let a programmer iterate fast and try many ideas but still optimize the final version for production later on. Is the reason we don't do this just that this use case isn't that common? Or is it too hard to implement?

jchen

@mvpatel2000 I would guess that because one of the big benefits of a DSL is that the functionality it provides is so specific to a given domain, so it would be able to implement those fine-grained optimizations under the hood. As a result, you probably wouldn't be able to make significant improvements at a finer-grained level even if you compiled DSL code into the base language.

haiyuem

To add on @jchen, I think DSLs like Halide are only capable of performing a certain set of operations, and it's hard for them to know that you want to split data into chunks, for example.

Please log in to leave a comment.