Skip to content

Don't build SPIRV translator tools #4153

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

Merged
merged 3 commits into from
May 12, 2025
Merged

Don't build SPIRV translator tools #4153

merged 3 commits into from
May 12, 2025

Conversation

anmyachev
Copy link
Contributor

@anmyachev anmyachev commented May 9, 2025

This file is one of the last linked files, after which the build Triton in PyTorch breaks due to memory overuse:

[453/472] Linking CXX executable unittest/Dialect/TritonGPU/LinearLayoutConversions
[454/472] Linking CXX executable _deps/spirv-llvm-translator-build/tools/llvm-spirv/llvm-spirv
/home/ec2-user/actions-runner/_work/_temp/8accc893-15cc-417e-90fb-c5f26d9ef661.sh: line 58: 38771 Killed                  docker exec -t "${container_name}" bash -c "source /opt/rh/gcc-toolset-13/enable && ${PYTHON_EXECUTABLE} /pytorch/.github/scripts/build_triton_wheel.py --device=$BUILD_DEVICE $RELEASE"
[454/472] Linking CXX executable unittest/Dialect/TritonGPU/DumpLayoutTest

PyTorch CI: https://github.com/pytorch/pytorch/actions/runs/14910976516/job/41910654750?pr=153096

How much do we need it?

Relates to #3521

Signed-off-by: Anatoly Myachev <[email protected]>
@anmyachev anmyachev marked this pull request as ready for review May 9, 2025 19:38


add_subdirectory(lib/SPIRV)
-add_subdirectory(tools/llvm-spirv)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This disables building the executable, the library we need is still built.

@anmyachev anmyachev requested review from etiotto and chengjunlu May 10, 2025 11:55
@chengjunlu
Copy link
Contributor

Using patching is too hacky.

Can we update the setup.py to just build the components on demand not to build all components? or maybe add the spirv tools to excluded from all target.

@anmyachev
Copy link
Contributor Author

Using patching is too hacky.

I agree

Can we update the setup.py to just build the components on demand not to build all components? or maybe add the spirv tools to excluded from all target.

I don't know how to do this on our side but can imagine how to do it on SPIRV-LLVM Translator side.

@chengjunlu
Copy link
Contributor

The Triton python setup.py build all target here:

subprocess.check_call(["cmake", "--build", "."] + build_args, cwd=cmake_dir)

Maybe we can change this. Or maybe use this CMake options https://cmake.org/cmake/help/latest/prop_tgt/EXCLUDE_FROM_ALL.html

@anmyachev
Copy link
Contributor Author

The Triton python setup.py build all target here:

subprocess.check_call(["cmake", "--build", "."] + build_args, cwd=cmake_dir)

Maybe we can change this. Or maybe use this CMake options https://cmake.org/cmake/help/latest/prop_tgt/EXCLUDE_FROM_ALL.html

thanks @chengjunlu! Will try

@anmyachev
Copy link
Contributor Author

@chengjunlu done

@anmyachev anmyachev merged commit 7a9efca into main May 12, 2025
15 checks passed
@anmyachev anmyachev deleted the amyachev/spirv-tools branch May 12, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants