Skip to content

Commit 948ba8f

Browse files
authored
[DOC] Update install instructions in docs (#7572)
I noticed the install commands on [the docs](https://triton-lang.org/main/getting-started/installation.html#python-package) are outdated (executing them as-is gives `triton/python does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.`). This PR updates those instructions to match those currently in the readme, specifically: - Install from `pip install -e python` to `pip install -e .` - Wheels from `CPython 3.8-3.12 and PyPy 3.8-3.9.` to `CPython 3.9-3.13.` (match readme) - Removes the nightly installation instruction - Tests to the new `make dev-install; make test; make test-nogpu` setup <!--- The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace `[ ]` with `[x]` to indicate you have done them. --> # New contributor declaration - [x] I am not making a trivial change, such as fixing a typo in a comment. - [x] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`. - Select one of the following. - [ ] I have added tests. - `/test` for `lit` tests - `/unittest` for C++ tests - `/python/test` for end-to-end tests - [x] This PR does not need a test because `it just fixes outdated installation instructions in the docs`. - Select one of the following. - [x] I have not added any `lit` tests. - [ ] The `lit` tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.)
1 parent db7170e commit 948ba8f

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

docs/getting-started/installation.rst

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,7 @@ You can install the latest stable release of Triton from pip:
1414
1515
pip install triton
1616
17-
Binary wheels are available for CPython 3.8-3.12 and PyPy 3.8-3.9.
18-
19-
And the latest nightly release:
20-
21-
.. code-block:: bash
22-
23-
pip install -U --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/ triton-nightly
24-
17+
Binary wheels are available for CPython 3.9-3.13.
2518

2619
-----------
2720
From Source
@@ -35,25 +28,25 @@ You can install the Python package from source by running the following commands
3528

3629
.. code-block:: bash
3730
38-
git clone https://github.com/triton-lang/triton.git;
39-
cd triton/python;
40-
pip install ninja cmake wheel; # build-time dependencies
31+
git clone https://github.com/triton-lang/triton.git
32+
cd triton
33+
34+
pip install -r python/requirements.txt # build-time dependencies
4135
pip install -e .
4236
4337
Note that, if llvm is not present on your system, the setup.py script will download the official LLVM static libraries and link against that.
4438

4539
For building with a custom LLVM, review the `Building with a custom LLVM <https://github.com/triton-lang/triton?tab=readme-ov-file#building-with-a-custom-llvm>`_ section on Github.
4640

47-
You can then test your installation by running the unit tests:
41+
You can then test your installation by running the tests:
4842

4943
.. code-block:: bash
5044
51-
pip install -e '.[tests]'
52-
pytest -vs test/unit/
45+
# One-time setup
46+
make dev-install
5347
54-
and the benchmarks
55-
56-
.. code-block:: bash
48+
# To run all tests (requires a GPU)
49+
make test
5750
58-
cd bench
59-
python -m run --with-plots --result-dir /tmp/triton-bench
51+
# Or, to run tests without a GPU
52+
make test-nogpu

0 commit comments

Comments
 (0)