Skip to content

Commit

Permalink
[Release] Prepare to release the first version of hidet to public (#59)
Browse files Browse the repository at this point in the history
* bump version & update doc

* .

* .
  • Loading branch information
yaoyaoding committed Jan 6, 2023
1 parent 9c26d88 commit 001c438
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 27 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Expand Up @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.19)

project(hidet C CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# config hidet
if(EXISTS "${CMAKE_BINARY_DIR}/config.cmake")
include(${CMAKE_BINARY_DIR}/config.cmake)
Expand Down
12 changes: 6 additions & 6 deletions README.md
@@ -1,5 +1,5 @@
# Hidet: A compilation-based deep learning framework
[**Documentation**](http://docs.hidet.org:9000/)
[**Documentation**](http://docs.hidet.org/)

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.
Expand All @@ -11,7 +11,7 @@ A series of graph-level and operator-level optimizations are applied to optimize
```bash
pip install hidet
```
See [here](http://docs.hidet.org:9000/) for building from source.
See [here](http://docs.hidet.org/) for building from source.

### Usage

Expand All @@ -34,9 +34,9 @@ model_opt = torch.compile(model, backend='hidet')
y = model_opt(x)
```
See the following tutorials to learn other usgae:
- [Quick Start](http://docs.hidet.org:9000/gallery/getting-started/quick-start.html)
- [Optimize PyTorch models](http://docs.hidet.org:9000/gallery/tutorials/optimize-pytorch-model.html)
- [Optimize ONNX models](http://docs.hidet.org:9000/gallery/tutorials/run-onnx-model.html)
- [Quick Start](http://docs.hidet.org/gallery/getting-started/quick-start.html)
- [Optimize PyTorch models](http://docs.hidet.org/gallery/tutorials/optimize-pytorch-model.html)
- [Optimize ONNX models](http://docs.hidet.org/gallery/tutorials/run-onnx-model.html)

## Publication
Hidet originates from the following research work. If you used **Hidet** in your research, welcome to cite our
Expand All @@ -50,7 +50,7 @@ Hidet is currently under active development by a team at [CentML Inc](https://ce

## Contributing
We welcome contributions from the community. Please see
[contribution guide](http://docs.hidet.org:9000/hidet/docs/build/html/developer-guides/contributing.html)
[contribution guide](http://docs.hidet.org/hidet/docs/build/html/developer-guides/contributing.html)
for more details.

## License
Expand Down
10 changes: 7 additions & 3 deletions gallery/developer-guides/hidet-script-dynamic-kernel.py
Expand Up @@ -2,7 +2,9 @@
Writing Dynamic kernel
======================
In this article, we will show how to write a matrix multiplication kernel in Hidet Script.
.. todo::
More details about hidet script and how to write dynamic kernel are coming soon.
"""
import numpy.testing
Expand Down Expand Up @@ -160,5 +162,7 @@ def main():
print(f'{m}x{k}x{n}: hidet takes {hidet_latency:.2f} ms')


if __name__ == '__main__':
main()
# %%
#

main()
2 changes: 1 addition & 1 deletion python/hidet/version.py
Expand Up @@ -9,4 +9,4 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = "0.1.dev0"
__version__ = "0.1"
9 changes: 9 additions & 0 deletions scripts/build_wheel.sh
@@ -1,4 +1,11 @@
#!/bin/bash
#
# Build a wheel:
#
# $ bash scripts/build_wheel.sh
#
# would generate a .whl file in the scripts directory.
#

set -e # exit immediately if a command exits with a non-zero status.

Expand All @@ -19,6 +26,7 @@ cd build; cmake ../..; make -j4; cd ..
# copy the built libraries and headers to python module
cp ../setup.py ./setup.py
cp ../MANIFEST.in ./MANIFEST.in
cp ../README.md ./README.md
cp -r ../python ./
cp -r ./build/lib ./python/hidet
cp -r ../include ./python/hidet
Expand All @@ -31,3 +39,4 @@ rm -rf ./python
rm -rf ./build
rm ./setup.py
rm ./MANIFEST.in
rm ./README.md
16 changes: 16 additions & 0 deletions scripts/ci/build_wheel_manylinux1.sh
@@ -0,0 +1,16 @@
#!/bin/bash

# work in the same directory of this script
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
cd $SCRIPT_DIR

# get the root directory of the project
HIDET_DIR=$(cd -- "$SCRIPT_DIR/../.." &> /dev/null && pwd)

# build the docker image
bash ./dockerfiles/manylinux1/build_image.sh

echo $HIDET_DIR

# run the docker image
docker run --rm -v $HIDET_DIR:/io hidet-manylinux1-build bash /io/scripts/build_wheel.sh
7 changes: 7 additions & 0 deletions scripts/ci/dockerfiles/manylinux1/Dockerfile
@@ -0,0 +1,7 @@
FROM quay.io/pypa/manylinux1_x86_64 as base

RUN yum install -y vim htop

ENV PATH=$PATH:/opt/python/cp38-cp38/bin

RUN PIP_ONLY_BINARY=cmake python3 -m pip install cmake
7 changes: 7 additions & 0 deletions scripts/ci/dockerfiles/manylinux1/build_image.sh
@@ -0,0 +1,7 @@
#!/bin/bash

# work in the same directory of this script
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
cd $SCRIPT_DIR

docker build -t hidet-manylinux1-build .
1 change: 1 addition & 0 deletions scripts/update_version.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/python3
"""
Update the version string in setup.py and python/hidet/version.py
Expand Down
8 changes: 8 additions & 0 deletions scripts/upload_wheel.sh
@@ -0,0 +1,8 @@
#!/bin/bash

WHEEL=$1

set -e # exit immediately if a command exits with a non-zero status.

twine upload --repository testpypi $WHEEL

25 changes: 8 additions & 17 deletions setup.py
Expand Up @@ -9,21 +9,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from setuptools import setup, find_packages, Distribution


class BinaryDistribution(Distribution):
def has_ext_modules(self):
return True

def is_pure(self):
return False
from setuptools import setup, find_packages


setup(
name="hidet",
version="0.1.dev0",
version="0.1",
description="Hidet: a compilation-based DNN inference framework.",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
python_requires='>=3.8',
packages=find_packages(where='python'),
package_dir={"": "python"},
Expand All @@ -36,15 +30,16 @@ def is_pure(self):
"tabulate",
"astunparse",
"click",
"cuda-python"
"packaging",
"cuda-python",
],
distclass=BinaryDistribution,
platforms=["linux"],
entry_points={
'console_scripts': [
'hidet = hidet.cli.main:main',
],
},
url="docs.hidet.org",
url="https://docs.hidet.org",
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand All @@ -59,10 +54,6 @@ def is_pure(self):
'Topic :: Software Development :: Libraries :: Python Modules',
'Programming Language :: C++',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
license='Apache-2.0',
keywords='deep learning, machine learning, neural network, inference, compiler',
Expand Down

0 comments on commit 001c438

Please sign in to comment.