Zhixun Tan

Software Engineer at Google

San Francisco Bay Area

       

Work Exp
  • Google
    Software Engineer
    March 5, 2018 -

  • NVIDIA
    Software Intern
    May 30, 2017 - Aug 11, 2017

Education
Projects

OpenGL/WebGL Backend for TVM

I added an OpenGL/WebGL backend for the tensor IR stack. My major work involves:

  • Compiling a variation of Halide IR into OpenGL fragment shaders;
  • Creating a runtime system to load and run OpenGL fragment shaders;
  • Enhancing the TVM JavaScript runtime system to support execution in WebGL;
  • Resolving many issues on the way.

Now you can

  • Load a resnet18 neural network definition from MXNet (or other machine learning frameworks) into NNVM,
  • Compile the OpKernels of that model into OpenGL fragment shaders, and
  • Run it locally or within a browser.


↑ This resnet18 model is running with WebGL, compiled with TVM. Demo code here.


LLVM Query Compilation in Peloton

I worded on Peloton, a database system developed at Carnegie Mellon.

I led a team of 4 students to extend the LLVM query compilation component in Peloton, to support INSERT, UPDATE and DELETE queries, in addition to the already-supported SCAN query.

Think of the traditional database execution engine as an “interpreter”, where the user query is parsed into an AST, and executed directly. With query compilation, we utilize the additional information such as types and table schemas to generate blazingly-fast specialized code before execution.

We also implemented MemSQL-style parameterization and compiled query caching, in order to reduce compilation overhead.


Arrow: Constructing Dataflow Graphs with Function Composition Style

I’ve built a domain-specific language that fits parallel iterative algorithms well. With the DSL, a machine learning algorithm designer doesn’t have to turn to large frameworks like Hadoop, Spark, and Parameter Server to test their new algorithms, while still get his / her program parallelized. With ideas borrowed from streaming and modified, the DSL is expressive, and the user would not be limited by any fixed paradigm like MapReduce.


C Compiler from scratch

I’ve built a complete C compiler from scratch! It is written in C#, and it supports all features in C89, except for bit-fields in structs and the obsolete function declaration syntax.

I didn’t use any automatic lexer / parser generator (lex, yacc, antlr…). Instead, I coded the lexer and parser from the ground up all by my self. Having experienced all the verboseness of the handwritten recursive descent parser, I re-wrote it with parser combinators - yay, functional programming is the best!

I performed semantic analysis - figuring out the type of each expression, analysing the symbol declarations, recognizing semantic errors… all these kinds of stuff.

Finally, I generated code into x86 assembly, which can be directly used by gcc’s assembler and linker. In this way, I’m able to compare the output with gcc’s.


MicroPython on FPGA

In summer 2015, I went to Imperial College London with Sean, as a research assistant under the supervision of Prof Peter Cheung.

We ported the MicroPython, an interpreter specially designed for memory-contrained embedded systems, to an SoC FPGA platform - Altera De0 Nano SoC. This interpreter can now run not only on ARM Linux, but also on bare-metal (without any OS support).

We also extended the interpreter with some modules to support peripherals on the board, and perform communication between HPS and FPGA. From the examples we’ve built, we found that writing python on this chip could be such an enjoyable experience compared to C!


Sketch-based shape retrieval

I worked at the CG lab of the CS department on a project to use human-drawn sketches to query 3D models from a database. My contributions to this project include:

  • I implemented the real-time curve fitting algorithm: as the user draws the sketch, I recognize lines and bezier curves. The user might draw a corner, and I must correctly cut the curve into different segments.

  • I recognized lines and ellipses in rendered pictures of models.

  • Based on lines and ellipses, I recognized polygon primitives.


Mirror: an AI contest platform

There is an anual departmental programming contest, where competitors write AI programs to fight against each other in a game. I was in the platform developing team for the fall 2013 contest. I built the 3D game scene using OpenGL in C++ from the ground up, without using any game engines.

Without the help of a game engine, I had to solve a lot of problems: load model and image files by reading bits and bytes (yes, I even didn’t use a image library, and loaded bmp files just in C++), set up the skybox, set up lighting effects, figure out all those transformation matrices, and implement animations. I also built a simple UI.

I built a lot of wheels in this projects - great practicing experience, though not necessarily the best choice in production.

Later, I recruited the best students in our department to form a group for developing the platform for the competition in the next year, and suggested that they use Unity3D. They did so, and the visual effects improved dramatically!

↑ This is completely built with OpenGL

MOOC's