/DietCode

DietCode Code Release

Primary LanguageCuda

DietCode

☝️ Please refer to the top-left corner of the README for the table of contents.

Daily Status Check (Build + Test) Documentation
RTX 3090 desktop RTX 2080 Ti server website

Thank you so much for your interest in the DietCode project. The key objective of DietCode is to deliver high-performance programs for dynamic-shape tensor programs. Please kindly go through the documentation below that guides you on how to build and use the DietCode auto-scheduler framework.

News

We are actively working on the RFC for upstreaming the codebase to TVM, and will post the latest updates here.

Prerequisites

  • Minimum Requirement: A machine with a modern NVIDIA GPU and GPU driver version >= 465.19.01 (for CUDA 11.3 in the Dockerfile) [1].

  • Docker & Docker-Compose [2, 3]:

    # Docker
    curl https://get.docker.com | sh && sudo systemctl --now enable docker
    # Docker Post-Installation
    sudo groupadd docker
    sudo usermod -aG docker $USER
    newgrp docker
    # NVIDIA Docker
    ./scripts/0-install_nvidia_docker.sh
    # Docker-Compose
    sudo -H pip3 install docker-compose

Code Organization

  • tests: Contains tutorial examples (as well as test cases) for testing key features (i.e., local padding, auto-scheduling, and decision-tree dispatching) in terms of correctness and runtime performance. Please click on the folder for more details.

  • tvm: DietCode that is built on top of TVM. Please refer to this page for the changes made at this branch.

  • tvm_base: A clean TVM branch (denoted as Base) that has only a few changes (for performance benchmarking only). Please refer to this page for the changes made at this branch.

  • environ: Script files that can be activated to select different TVM branches (DietCode or Base). Note that at least one of the scripts MUST be activated before running the tests (some require the DietCode branch while others require Base):

    # DietCode
    source environ/activate_dietcode.sh
    # Base
    source environ/activate_base.sh

Build Instructions

  • Build and Run the Docker image:

    docker-compose run --rm tvm-dev
  • Build DietCode and Base:

    # DietCode
    ./scripts/1-build.sh tvm
    # Base
    ./scripts/1-build.sh tvm_base

How To?

  • Get started with DietCode?

    • Please refer to the tests folder that contains examples demonstrating the code generation optimizations and the auto-scheduler frontend interface of DietCode.
  • Know the implementation details of DietCode?

    • Please refer to the tvm submodule and this page for the changes made at this branch. We did our best to document the code thoroughly, with the key changes highlighted using the <DietCode> tag.

References