Skip to main content

Hidet: a compilation-based DNN inference framework.

Project description

Hidet: A compilation-based deep learning framework

Documentation

GitHub GitHub Workflow Status

Hidet is an open-source DNN inference framework based on compilation. 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.

Getting Started

Installation

pip install hidet

See here for building from source.

Usage

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

import torch
import hidet

# Register hidet backends for pytorch dynamo, can be omitted if you import torch before hidet
hidet.torch.register_dynamo_backends()  

# 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
model_opt = torch.compile(model, backend='hidet')  

# Run the optimized model
y = model_opt(x)

See the following tutorials to learn other usgae:

Publication

Hidet originates from the following research work. If you used Hidet in your research, welcome to cite our paper.

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

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.0-py3-none-any.whl (507.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hidet-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a962c7b22293511b66b2190562c51865d43a694a1be1a8772990bf4b61dd7571
MD5 f4ed4d4e77f2e15e9c01f5b97bb54765
BLAKE2b-256 5e392210e05084f5e9965eb0f15b9630a784039557884feef880f462c278483f

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