Skip to content

Tint sets Werror and then fails to build with gcc #11394

Open

Description

@GMNGeoffrey

https://github.com/iree-org/iree/actions/runs/3595282807/jobs/6054591644 from #11391

We don't set Werror for gcc (yet):

# TODO(#6959): Enable -Werror once we have a presubmit CI.

but Tint sets it itself specifically for GCC: https://dawn.googlesource.com/tint/+/refs/heads/main/CMakeLists.txt#330

I'm not sure why we don't hit this in Clang where we do hit Werror. Maybe we only set -Werror for our own builds. I think this is likely something to file upstream with Tint. For now I'm disabling Web GPU for the GCC build.

Activity

  1. added
    infrastructure
    hal/webgpu
    on Dec 1, 2022
  2. moved this from Not Started to Backlog in (Deprecated) IREEon Apr 5, 2023
  3. GMNGeoffrey commented on Apr 19, 2023

    @GMNGeoffrey
    MemberAuthor

    Unassigning myself from issues that I'm not actively working on

  4. removed their assignment
    on Apr 19, 2023
  5. GMNGeoffrey commented on May 25, 2023

    @GMNGeoffrey
    MemberAuthor

    This still repros: https://github.com/openxla/iree/actions/runs/5084434710/jobs/9136728929?pr=13790

    I did a rerun because the logs had expired. Copy-pasting them so we can actually remember what the error is:

    /usr/bin/ccache /usr/bin/g++-9 -DTINT_BUILD_GLSL_WRITER=0 -DTINT_BUILD_HLSL_WRITER=1 -DTINT_BUILD_IR=1 -DTINT_BUILD_MSL_WRITER=1 -DTINT_BUILD_SPV_READER=1 -DTINT_BUILD_SPV_WRITER=1 -DTINT_BUILD_WGSL_READER=1 -DTINT_BUILD_WGSL_WRITER=1 -I/work/build-gcc/_deps/tint-src/third_party/vulkan-deps/spirv-tools/src/include -I/work/build-gcc/_deps/tint-src -I/work/build-gcc/_deps/tint-src/include -I/work/build-gcc/_deps/tint-src/third_party/vulkan-deps/spirv-headers/src/include -I/work/build-gcc/_deps/spirv-tools-src -I/work/build-gcc/_deps/spirv-tools-build -I/work/build-gcc/_deps/spirv-tools-src/include -I/work/third_party/spirv_headers/include -O3  -fPIC -std=c++17 -fno-exceptions -fno-rtti -pedantic-errors -Wall -Werror -Wextra -Wno-documentation-unknown-command -Wno-padded -Wno-switch-enum -Wno-unknown-pragmas -std=gnu++17 -MD -MT _deps/tint-build/src/tint/CMakeFiles/libtint.dir/resolver/const_eval.cc.o -MF _deps/tint-build/src/tint/CMakeFiles/libtint.dir/resolver/const_eval.cc.o.d -o _deps/tint-build/src/tint/CMakeFiles/libtint.dir/resolver/const_eval.cc.o -c /work/build-gcc/_deps/tint-src/src/tint/resolver/const_eval.cc
    /work/build-gcc/_deps/tint-src/src/tint/resolver/const_eval.cc: In instantiation of 'tint::resolver::ConstEval::OpShiftRight(const tint::type::Type*, tint::utils::VectorRef<const tint::constant::Value*>, const tint::Source&)::<lambda(const tint::constant::Value*, const tint::constant::Value*)>::<lambda(auto:116, auto:117)> [with auto:116 = tint::Number<unsigned int>; auto:117 = tint::Number<unsigned int>; tint::resolver::ConstEval::Result = tint::utils::Result<const tint::constant::Value*>]':
    /work/build-gcc/_deps/tint-src/src/tint/resolver/const_eval.cc:91:41:   required from 'auto tint::resolver::{anonymous}::Dispatch_ia_iu32(F&&, CONSTANTS&& ...) [with F = tint::resolver::ConstEval::OpShiftRight(const tint::type::Type*, tint::utils::VectorRef<const tint::constant::Value*>, const tint::Source&)::<lambda(const tint::constant::Value*, const tint::constant::Value*)>::<lambda(auto:116, auto:117)>&; CONSTANTS = {const tint::constant::Value*&, const tint::constant::Value*&}]'
    /work/build-gcc/_deps/tint-src/src/tint/resolver/const_eval.cc:1976:47:   required from here
    /work/build-gcc/_deps/tint-src/src/tint/resolver/const_eval.cc:1932:18: error: variable 'signed_shift_right' set but not used [-Werror=unused-but-set-variable]
     1932 |             auto signed_shift_right = [&] {
          |                  ^~~~~~~~~~~~~~~~~~
    cc1plus: error: unrecognized command line option '-Wno-documentation-unknown-command' [-Werror]
    cc1plus: all warnings being treated as errors
    [6871/7186] Building CXX object compiler/src/iree/compiler/Dialect/HAL/Target/WebGPU/CMakeFiles/iree_compiler_Dialect_HAL_Target_WebGPU_WebGPU.objects.dir/WebGPUTarget.cpp.o
    
  6. GMNGeoffrey commented on May 25, 2023

    @GMNGeoffrey
    MemberAuthor

    Additional context: this is the same parent team as Amber. Basically, they're turning on a bunch of warnings and -Werror, but new warnings come in with new compiler versions and they aren't clean for those. Related issue from Amber: google/amber#1009, which they resolved by adding a flag to turn this behavior off: google/amber#1013. We may need to upstream a similar option. But the option I really want is to turn off the warnings, not turn off the errors. I also don't want log spam because Tint isn't clean for the latest diagnostics

  7. GMNGeoffrey commented on May 25, 2023

    @GMNGeoffrey
    MemberAuthor

    This is where I tried turning this back on, so things are cross-linked: #13790

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

hal/webgpuinfrastructure

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions