Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable building C++ unittests, convert to rattler-build, remove pytorch dependency #29

Merged
merged 27 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
32cae2e
MNT: Re-rendered with conda-build 24.9.0, conda-smithy 3.44.7, and co…
mgorny Nov 25, 2024
73cb998
Disable building C++ unittests (NFC)
mgorny Dec 16, 2024
20a6fb1
Convert the recipe to rattler-build
mgorny Dec 16, 2024
4b18a30
MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.0, and c…
mgorny Dec 16, 2024
f60be60
Bump build number
mgorny Dec 16, 2024
3d48646
Remove schema_version
mgorny Dec 18, 2024
872facf
Fix build string
mgorny Dec 18, 2024
a1affdb
Enable Azure disk space freeing
mgorny Dec 19, 2024
8764155
MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.1, and c…
Dec 20, 2024
9278eb5
Remove the dependency on pytorch
mgorny Dec 27, 2024
7718a26
Add setuptools dependency
mgorny Dec 28, 2024
d5faf7a
Remove run dependency on lit
mgorny Dec 28, 2024
73cf431
Attempt building for Windows
mgorny Dec 28, 2024
7fdc427
MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.1, and c…
mgorny Dec 28, 2024
ec87169
Add a dependency on sed
mgorny Dec 28, 2024
df1f869
Make that m2-sed for win
mgorny Dec 28, 2024
316da3b
Use rattler syntax for conditionals
mgorny Dec 28, 2024
ee68991
Backport a patch for building on Windows
mgorny Dec 28, 2024
e13f21a
Sed flags causing command-line error with MSVC
mgorny Dec 28, 2024
9c83f16
Revert "Sed flags causing command-line error with MSVC"
mgorny Dec 28, 2024
8b2b8e5
Try forcing clang on Windows
mgorny Dec 28, 2024
8aa919e
MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.1, and c…
mgorny Dec 28, 2024
be327ab
Disable Windows again
mgorny Dec 28, 2024
ce8e684
MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.1, and c…
mgorny Dec 28, 2024
8742d13
Remove dependency on filelock
mgorny Dec 28, 2024
28fb36b
Restore env markers over CUDA version
mgorny Dec 28, 2024
6cf03d3
MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.1, and c…
mgorny Dec 28, 2024
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
21 changes: 21 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 10 additions & 14 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions conda-forge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
azure:
free_disk_space: true
github:
branch_name: main
tooling_branch_name: main
conda_forge_output_validation: true
conda_build:
pkg_format: '2'
conda_build_tool: rattler-build
23 changes: 23 additions & 0 deletions recipe/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
rem remove outdated vendored headers
del /s %SRC_DIR%/python/triton/third_party

set JSON_SYSPATH=%PREFIX%
set LLVM_SYSPATH=%PREFIX%
set PYBIND11_SYSPATH=%SP_DIR%/pybind11

rem these don't seem to be actually used, but they prevent downloads
set TRITON_PTXAS_PATH=%PREFIX%/bin/ptxas
set TRITON_CUOBJDUMP_PATH=%PREFIX%/bin/cuobjdump
set TRITON_NVDISASM_PATH=%PREFIX%/bin/nvdisasm
set TRITON_CUDACRT_PATH=%PREFIX%
set TRITON_CUDART_PATH=%PREFIX%
set TRITON_CUPTI_PATH=%PREFIX%

set MAX_JOBS=%CPU_COUNT%

rem the build does not run C++ unittests, and they implicitly fetch gtest
rem no easy way of passing this, not really worth a whole patch
sed -i -e '/TRITON_BUILD_UT/s:\bON:OFF:' CMakeLists.txt

cd python
%PYTHON% -m pip install . -vv
4 changes: 4 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ export TRITON_CUPTI_PATH=$PREFIX

export MAX_JOBS=$CPU_COUNT

# the build does not run C++ unittests, and they implicitly fetch gtest
# no easy way of passing this, not really worth a whole patch
sed -i -e '/TRITON_BUILD_UT/s:\bON:OFF:' CMakeLists.txt

cd python
$PYTHON -m pip install . -vv
12 changes: 8 additions & 4 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ fortran_compiler_version: # [linux64]
- 13 # [linux64]
cdt_name: # [linux64]
- cos7 # [linux64]
cuda_compiler: # [linux64]
- cuda-nvcc # [linux64]
cuda_compiler_version: # [linux64]
- 12.6 # [linux64]
cuda_compiler: # [linux64 or win]
- cuda-nvcc # [linux64 or win]
cuda_compiler_version: # [linux64 or win]
- 12.6 # [linux64 or win]
c_compiler: # [win]
- clang # [win]
cxx_compiler: # [win]
- clangxx # [win]
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 95b7ae2159e6a61cf960c8d9efd631ab2e0b6e35 Mon Sep 17 00:00:00 2001
From: Anatoly Myachev <[email protected]>
Date: Wed, 30 Oct 2024 14:56:52 +0100
Subject: [PATCH 11/11] Don't specify `-A x64` option and reuse cmake build
type config for Windows (#5014)

The `-A` argument is not compatible with the Ninja generator.

Signed-off-by: Anatoly Myachev <[email protected]>
---
python/setup.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/python/setup.py b/python/setup.py
index c60dc6158..da924502b 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -378,12 +378,10 @@ class CMakeBuild(build_ext):
cfg = get_build_type()
build_args = ["--config", cfg]

+ cmake_args += [f"-DCMAKE_BUILD_TYPE={cfg}"]
if platform.system() == "Windows":
cmake_args += [f"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_{cfg.upper()}={extdir}"]
- if sys.maxsize > 2**32:
- cmake_args += ["-A", "x64"]
else:
- cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg]
max_jobs = os.getenv("MAX_JOBS", str(2 * os.cpu_count()))
build_args += ['-j' + max_jobs]

--
2.47.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
From 4c4c6a4327508db8ca6adc0fb01fdb6ec16572ff Mon Sep 17 00:00:00 2001
From: Cunshun Xia <[email protected]>
Date: Fri, 19 Jul 2024 23:11:15 +0800
Subject: [PATCH 12/12] remove unused requirement 'filelock' (#4356)

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.

- [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 `FILL THIS IN`.

- 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.)

Signed-off-by: cunshunxia <[email protected]>
---
python/setup.py | 6 ------
1 file changed, 6 deletions(-)

diff --git a/python/setup.py b/python/setup.py
index da924502b..30c317328 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -572,11 +572,6 @@ def get_entry_points():
return entry_points


-def get_install_requires():
- install_requires = ["filelock"]
- return install_requires
-
-
setup(
name=os.environ.get("TRITON_WHEEL_NAME", "triton"),
version="3.1.0" + os.environ.get("TRITON_WHEEL_VERSION_SUFFIX", ""),
@@ -586,7 +581,6 @@ setup(
long_description="",
packages=get_packages(),
entry_points=get_entry_points(),
- install_requires=get_install_requires(),
package_data=package_data,
include_package_data=True,
ext_modules=[CMakeExtension("triton", "triton/_C/")],
--
2.47.1

Loading