Skip to content

Commit

Permalink
[BUILD] Several changes in wheel building (#392)
Browse files Browse the repository at this point in the history
- sync `requirement.txt` with requirement in `setup.py`
- add extras_require
- requirements is torch >= 2.3.0
  • Loading branch information
vadiklyutiy committed Dec 19, 2024
1 parent efe3569 commit 9d50fa2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 16 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,21 @@ Currently, hidet focuses on optimizing the inference workloads on NVIDIA GPUs, a
## Getting Started

### Installation
If you are going to use hidet's API
```bash
pip install hidet
```
You can also try the [nightly build version](https://hidet.org/docs/stable/getting-started/install.html) or [build from source](https://hidet.org/docs/stable/getting-started/build-from-source.html#).

If you are going to use hidet as PyTorch compiler
```bash
pip install hidet[torch]
```

You can also try the [nightly build version](https://docs.hidet.org/stable/getting-started/install.html) or [build from source](https://docs.hidet.org/stable/getting-started/build-from-source.html#).

### Usage

Optimize a PyTorch model through hidet (require PyTorch 2.0):
Optimize a PyTorch model through hidet (require PyTorch 2.3):
```python
import torch

Expand Down
2 changes: 1 addition & 1 deletion gallery/getting-started/quick-start.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# .. note::
# :class: margin
#
# ``torch.compile(...)`` requires PyTorch 2.0+.
# ``torch.compile(...)`` requires PyTorch 2.3+.
#
# The easiest way to use Hidet is to use the :func:`torch.compile` function with ``hidet`` as the backend, such as
#
Expand Down
15 changes: 6 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ psutil
# used for print table
tabulate

# python tests
pytest

# show progress bar
tqdm

Expand All @@ -29,20 +26,20 @@ click
# for package version check
packaging

# for cuda runtime api and runtime compilation api
cuda-python
requests

# for filestore
filelock

requests

# for configuration
tomlkit
# for cuda runtime api and runtime compilation api
cuda-python >= 11.6.1

# for parser
lark

# for configuration
tomlkit

# for performance measurements
scipy

13 changes: 9 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name="hidet",
version="0.5.0.dev",
version="0.4.1",
description="Hidet: a compilation-based DNN inference framework.",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
Expand All @@ -25,18 +25,23 @@
install_requires=[
"numpy>=1.23", # for from_dlpack
"psutil",
"tabulate",
"pytest",
"tqdm",
"nvtx",
"tabulate",
"astunparse",
"click",
"packaging",
"requests",
"filelock",
"cuda-python>=11.6.1; platform_system=='Linux'",
"cuda-python>=11.6.1",
"lark",
"tomlkit"
"tomlkit",
"scipy",
],
extras_require={
"torch": ["torch>=2.3.0"],
},
platforms=["linux"],
entry_points={
'console_scripts': [
Expand Down

0 comments on commit 9d50fa2

Please sign in to comment.