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

2.1.0 h82d3c5 #19

Closed
wants to merge 9 commits into from
Closed

Conversation

RaulPPelaez
Copy link
Contributor

@RaulPPelaez RaulPPelaez commented Dec 7, 2023

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Closes #17
Closes #18

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@RaulPPelaez
Copy link
Contributor Author

There is a compilation error:

[ 71%] Building CXX object lib/Conversion/TritonGPUToLLVM/CMakeFiles/obj.TritonGPUToLLVM.dir/DotOpToLLVM/FMA.cpp.o
  cd /home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/python/build/cmake.linux-x86_64-cpython-3.11/lib/Conversion/TritonGPUToLLVM && /home/conda/feedstock_root/build_artifacts/triton_1701941457682/_build_env/bin/x86_64-conda-linux-gnu-c++ -DGTEST_HAS_RTTI=0 -I/home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/python/build/cmake.linux-x86_64-cpython-3.11/lib/Conversion/TritonGPUToLLVM -I/home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/lib/Conversion/TritonGPUToLLVM -I/home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/include -I/home/conda/.triton/pybind11/pybind11-2.10.0/include -I/home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/. -I/home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/python/src -I/home/conda/feedstock_root/build_artifacts/triton_1701941457682/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/python3.11 -I/home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include -I/home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/python/build/cmake.linux-x86_64-cpython-3.11/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/conda/feedstock_root/build_artifacts/triton_1701941457682/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/triton_1701941457682/work=/usr/local/src/conda/triton-2.1.0 -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/triton_1701941457682/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac=/usr/local/src/conda-prefix  -I/home/conda/feedstock_root/build_artifacts/triton_1701941457682/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/targets/x86_64-linux/include -I/home/conda/feedstock_root/build_artifacts/triton_1701941457682/_build_env/targets/x86_64-linux/include  -L/home/conda/feedstock_root/build_artifacts/triton_1701941457682/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/targets/x86_64-linux/lib -L/home/conda/feedstock_root/build_artifacts/triton_1701941457682/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/targets/x86_64-linux/lib/stubs -L/home/conda/feedstock_root/build_artifacts/triton_1701941457682/_build_env/targets/x86_64-linux/lib -L/home/conda/feedstock_root/build_artifacts/triton_1701941457682/_build_env/targets/x86_64-linux/lib/stubs -D__STDC_FORMAT_MACROS  -fPIC -std=gnu++17 -fvisibility=hidden -fvisibility-inlines-hidden -Werror -Wno-covered-switch-default -O2 -g -std=gnu++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Conversion/TritonGPUToLLVM/CMakeFiles/obj.TritonGPUToLLVM.dir/DotOpToLLVM/FMA.cpp.o -MF CMakeFiles/obj.TritonGPUToLLVM.dir/DotOpToLLVM/FMA.cpp.o.d -o CMakeFiles/obj.TritonGPUToLLVM.dir/DotOpToLLVM/FMA.cpp.o -c /home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/lib/Conversion/TritonGPUToLLVM/DotOpToLLVM/FMA.cpp
  In file included from /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/mlir/IR/BlockSupport.h:16,
                   from /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/mlir/IR/Block.h:16,
                   from /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/mlir/IR/Operation.h:16,
                   from /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/mlir/Analysis/DataFlowFramework.h:19,
                   from /home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/include/triton/Analysis/Utility.h:4,
                   from /home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/include/triton/Analysis/Allocation.h:4,
                   from /home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/lib/Conversion/TritonGPUToLLVM/ConvertLayoutOpToLLVM/../TritonGPUToLLVMBase.h:7,
                   from /home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/lib/Conversion/TritonGPUToLLVM/ConvertLayoutOpToLLVM/../ConvertLayoutOpToLLVM.h:4,
                   from /home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/lib/Conversion/TritonGPUToLLVM/ConvertLayoutOpToLLVM/SharedToDotOperandMMAv2.cpp:1:
  In constructor 'constexpr mlir::Value::Value(mlir::detail::ValueImpl*)',
      inlined from 'void llvm::SmallVectorImpl<T>::resizeImpl(size_type) [with bool ForOverwrite = false; T = mlir::Value]' at /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/llvm/ADT/SmallVector.h:637:9,
      inlined from 'void llvm::SmallVectorImpl<T>::resizeImpl(size_type) [with bool ForOverwrite = false; T = mlir::Value]' at /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/llvm/ADT/SmallVector.h:623:37,
      inlined from 'void llvm::SmallVectorImpl<T>::resize(size_type) [with T = mlir::Value]' at /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/llvm/ADT/SmallVector.h:642:47,
      inlined from 'llvm::SmallVector<T, N>::SmallVector(size_t) [with T = mlir::Value; unsigned int N = 6]' at /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/llvm/ADT/SmallVector.h:1211:17,
      inlined from 'std::tuple<mlir::Value, mlir::Value, mlir::Value, mlir::Value> MMA16816SmemLoader::loadX4(int, int, llvm::ArrayRef<mlir::Value>, mlir::Type, mlir::Type) const' at /home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/lib/Conversion/TritonGPUToLLVM/ConvertLayoutOpToLLVM/SharedToDotOperandMMAv2.cpp:347:46:
  /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/mlir/IR/Value.h:95:56: error: 'void* __builtin_memset(void*, int, long unsigned int)' specified size between 18446744039349813224 and 18446744073709551608 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
     95 |   constexpr Value(detail::ValueImpl *impl = nullptr) : impl(impl) {}
        |                                                        ^~~~~~~~~~
  In file included from /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/llvm/Support/Allocator.h:20,
                   from /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/mlir/Support/TypeID.h:21,
                   from /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/mlir/IR/MLIRContext.h:13,
                   from /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/mlir/IR/TypeSupport.h:16,
                   from /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/mlir/IR/Types.h:12,
                   from /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/mlir/IR/Value.h:16:
  In member function 'T* llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::begin() [with T = mlir::Value; <template-parameter-1-2> = void]',
      inlined from 'T* llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::end() [with T = mlir::Value; <template-parameter-1-2> = void]' at /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/llvm/ADT/SmallVector.h:272:32,
      inlined from 'void llvm::SmallVectorImpl<T>::resizeImpl(size_type) [with bool ForOverwrite = false; T = mlir::Value]' at /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/llvm/ADT/SmallVector.h:633:28,
      inlined from 'void llvm::SmallVectorImpl<T>::resizeImpl(size_type) [with bool ForOverwrite = false; T = mlir::Value]' at /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/llvm/ADT/SmallVector.h:623:37,
      inlined from 'void llvm::SmallVectorImpl<T>::resize(size_type) [with T = mlir::Value]' at /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/llvm/ADT/SmallVector.h:642:47,
      inlined from 'llvm::SmallVector<T, N>::SmallVector(size_t) [with T = mlir::Value; unsigned int N = 6]' at /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/llvm/ADT/SmallVector.h:1211:17,
      inlined from 'std::tuple<mlir::Value, mlir::Value, mlir::Value, mlir::Value> MMA16816SmemLoader::loadX4(int, int, llvm::ArrayRef<mlir::Value>, mlir::Type, mlir::Type) const' at /home/conda/feedstock_root/build_artifacts/triton_1701941457682/work/lib/Conversion/TritonGPUToLLVM/ConvertLayoutOpToLLVM/SharedToDotOperandMMAv2.cpp:347:46:
  /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/llvm/ADT/SmallVector.h:270:45: note: destination object allocated here
    270 |   iterator begin() { return (iterator)this->BeginX; }
        |                                       ~~~~~~^~~~~~

Being this the culprit:

  /home/conda/.triton/llvm/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release/include/mlir/IR/Value.h:95:56: error: 'void* __builtin_memset(void*, int, long unsigned int)' specified size between 18446744039349813224 and 18446744073709551608 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]

This is solved by adding -Wno-stringop-overflow as a cxx flag, not sure how to convince pip to set it in cmake.

@RaulPPelaez
Copy link
Contributor Author

Now there are a bunch of undefined references related to mlir:

 [ 91%] Built target obj.TritonLLVMIR
  /home/conda/feedstock_root/build_artifacts/triton_1701944630577/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/feedstock_root/build_artifacts/triton_1701944630577/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: ../lib/Dialect/TritonGPU/Transforms/libTritonGPUTransforms.a(RemoveLayoutConversions.cpp.o): in function `TritonGPURemoveLayoutConversionsPass::runOnOperation()':
  /usr/local/src/conda/triton-2.1.0/lib/Dialect/TritonGPU/Transforms/RemoveLayoutConversions.cpp:609: undefined reference to `mlir::FrozenRewritePatternSet::FrozenRewritePatternSet(mlir::RewritePatternSet&&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >)'
  ../lib/Dialect/TritonGPU/Transforms/libTritonGPUTransforms.a(RemoveLayoutConversions.cpp.o): in function `TritonGPURemoveLayoutConversionsPass::runOnOperation()':

@RaulPPelaez
Copy link
Contributor Author

It seems like each triton commit is tied to a very specific llvm commit. The setup.py takes care of downloading it, etc. AFAIK triton will try to ignore the local llvm installation. Installing llvm and mlir as dependencies is messing with this process.
A local build succeeds when removing them as deps, lets try here.

@RaulPPelaez
Copy link
Contributor Author

The undefined references remain, but I can build just fine with a really barebones env in my machine.
This works for me:

mamba create -n triton cuda-version==12.* gxx pip
pip install . 

@RaulPPelaez
Copy link
Contributor Author

Only difference I can see is that my machine is fetching the ubuntu version of llvm+mlir but the runner here is getting:
https://github.com/ptillet/triton-llvm-releases/releases/download/llvm-17.0.0-c5dede880d17/llvm+mlir-17.0.0-x86_64-linux-gnu-centos-7-release.tar.xz

Down the line this is because of this line in triton's setup.py: linux_suffix = 'ubuntu-18.04' if vglibc > 217 else 'centos-7'.

Which makes me think the problem here is with the glibc version being used (2.31 in my machine and 2.17 in the runner)

@RaulPPelaez
Copy link
Contributor Author

@conda-forge-admin, please rerender

@hmaarrfk
Copy link
Contributor

can be closed right?

@h-vetinari h-vetinari closed this Jan 12, 2025
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.

Triton 2.1.0
4 participants