Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ jobs:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib # to avoid libascend_hal.so issue
pip3 install pyyaml setuptools pytest packaging pybind11[global]
pip3 install -r requirements.txt
pip3 install torch-npu==2.8.0.post2 --extra-index-url https://download.pytorch.org/whl/cpu
make clean build_cmake

build_wheel_docker:
Expand Down Expand Up @@ -122,5 +121,4 @@ jobs:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib # to avoid libascend_hal.so issue
pip3 install pyyaml setuptools pytest packaging pybind11[global]
pip3 install -r requirements.txt
pip3 install torch-npu==2.8.0.post2 --extra-index-url https://download.pytorch.org/whl/cpu
make clean build_wheel
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ clean:

setup_once:
pip3 install -r requirements.txt
pip3 install torch-npu==2.8.0.post2 --extra-index-url https://download.pytorch.org/whl/cpu

build_cmake: clean
bash scripts/build.sh

build_wheel:
export CMAKE_GENERATOR="Unix Makefiles" && pip wheel -v . --extra-index-url https://download.pytorch.org/whl/cpu
export CMAKE_GENERATOR="Unix Makefiles" && pip wheel -v .

install: build_wheel
bash scripts/install-wheel.sh
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ make setup_once

---

## Install repository using pip

The repository is "pip installable", i.e.,

```bash
export CMAKE_GENERATOR="Unix Makefiles" && pip install -v git+https://github.com/huawei-csl/pto-dsl.git
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pto-dsl -> pto-kernels!

```

## Build

```bash
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ requires = [
"psutil==6.1.0",
"PyYAML==6.0.2",
"attrs==24.2.0",
"torch",
"torch-npu==2.8.0.post2",
]
build-backend = "scikit_build_core.build"
Expand Down Expand Up @@ -50,9 +51,12 @@ dependencies = [

[project.optional-dependencies]
torch = [
"torch-npu==2.8.0.post2",
"torch-npu",
]

[tool.pip]
extra-index-url = ["https://download.pytorch.org/whl/cpu"]

[tool.scikit-build]
build-dir = "build/{wheel_tag}"
wheel.packages = ["python/pto_kernels"]
Expand Down
Loading