Skip to main content

Hidet: a compilation-based DNN inference framework.

Project description

Hidet: An Open-Source Deep Learning Compiler

Documentation | Research Paper | Releases | Contributing

GitHub GitHub Workflow Status

Hidet is an open-source deep learning compiler, written in Python. It supports end-to-end compilation of DNN models from PyTorch and ONNX to efficient cuda kernels. A series of graph-level and operator-level optimizations are applied to optimize the performance.

Currently, hidet focuses on optimizing the inference workloads on NVIDIA GPUs, and requires

  • Linux OS
  • CUDA Toolkit 11.6+
  • Python 3.8+

Getting Started

Installation

pip install hidet

You can also try the nightly build version or build from source.

Usage

Optimize a PyTorch model through hidet (require PyTorch 2.0):

import torch

# Define pytorch model
model = torch.hub.load('pytorch/vision:v0.6.0', 'resnet18', pretrained=True).cuda().eval()
x = torch.rand(1, 3, 224, 224).cuda()

# Compile the model through Hidet
# Optional: set optimization options (see our documentation for more details)
#   import hidet 
#   hidet.torch.dynamo_config.search_space(2)  # tune each tunable operator
#   hidet.torch.dynamo_config.use_fp16()       # use float16 for acceleration
model_opt = torch.compile(model, backend='hidet')  

# Run the optimized model
y = model_opt(x)

See the following tutorials to learn other usages:

Publication

Hidet originates from the following research work:

Hidet: Task-Mapping Programming Paradigm for Deep Learning Tensor Programs
Yaoyao Ding, Cody Hao Yu, Bojian Zheng, Yizhi Liu, Yida Wang, and Gennady Pekhimenko.
ASPLOS '23

If you used Hidet in your research, welcome to cite our paper.

Development

Hidet is currently under active development by a team at CentML Inc.

Contributing

We welcome contributions from the community. Please see contribution guide for more details.

License

Hidet is released under the Apache 2.0 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

hidet-0.2.4-py3-none-any.whl (682.1 kB view details)

Uploaded Python 3

File details

Details for the file hidet-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: hidet-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 682.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for hidet-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 246790e1ddf3e6981a00a20abc9b90c1e497c5a24211df873fef41269039ba66
MD5 48313630112f76be17a17ae20603e09f
BLAKE2b-256 b341ca756151dc5b3e7d9930364812e54191f2d477b4beb30e647d782ff3b7f7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page