iree-org / iree-org/iree

matchAndSetCPUReductionTransformStrategy dropping LogicalResult

Open
#11,620 1 comment 0 reactions 1 assignee Claimed by @nicolasvasilache View on GitHub
cleanup 🧹 codegen
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
4d 16h
Merged PRs (30d)
47

Description

Getting this warning on MSVC indicating that createTransformRegion is dropping the LogicalResult that buildStrategy (SIC) is returning. I'm not sure how the error is intended to propagate from the createTransformRegion.

```
[3487/4025] Building CXX object compiler\src\iree\compiler\Codegen\Common\CMakeFiles\iree_compiler_Codegen_Common_TransformDialectJitterPass.objects.dir\TransformDialectStrategiesCPU.cpp.obj
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31721\include\functional(668): warning C4834: discarding return value of function with 'nodiscard' attribute
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31721\include\functional(830): note: see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx>::_Call<_Callable&,mlir::ImplicitLocOpBuilder&,_Ty>(_Fx,mlir::ImplicitLocOpBuilder &,_Ty &&) noexcept(false)' being compiled
with
[
_Rx=void,
_Callable=mlir::iree_compiler::matchAndSetCPUReductionTransformStrategy::,
_Ty=mlir::Value,
_Fx=mlir::iree_compiler::matchAndSetCPUReductionTransformStrategy:: &
]
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31721\include\functional(831): note: see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx>::_Call<_Callable&,mlir::ImplicitLocOpBuilder&,_Ty>(_Fx,mlir::ImplicitLocOpBuilder &,_Ty &&) noexcept(false)' being compiled
with
[
_Rx=void,
_Callable=mlir::iree_compiler::matchAndSetCPUReductionTransformStrategy::,
_Ty=mlir::Value,
_Fx=mlir::iree_compiler::matchAndSetCPUReductionTransformStrategy:: &
]
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31721\include\functional(830): note: while compiling class template member function '_Rx std::_Func_impl_no_alloc,_Rx,mlir::ImplicitLocOpBuilder &,mlir::Value>::_Do_call(mlir::ImplicitLocOpBuilder &,mlir::Value &&)'
with
[
_Rx=void
]
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31721\include\functional(728): note: see reference to class template instantiation 'std::_Func_impl_no_alloc,_Ret,mlir::ImplicitLocOpBuilder &,mlir::Value>' being compiled
with
[
_Ret=void
]
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31721\include\functional(920): note: see reference to variable template 'const bool _Is_large,void,mlir::ImplicitLocOpBuilder &,mlir::Value> >' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31721\include\functional(1051): note: see reference to function template instantiation 'void std::_Func_class<_Ret,mlir::ImplicitLocOpBuilder &,mlir::Value>::_Reset&>(_Fx)' being compiled
with
[
_Ret=void,
_Fx=mlir::iree_compiler::matchAndSetCPUReductionTransformStrategy:: &
]
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31721\include\functional(1051): note: see reference to function template instantiation 'void std::_Func_class<_Ret,mlir::ImplicitLocOpBuilder &,mlir::Value>::_Reset&>(_Fx)' being compiled
with
[
_Ret=void,
_Fx=mlir::iree_compiler::matchAndSetCPUReductionTransformStrategy:: &
]
D:\Dev\iree\compiler\src\iree\compiler\Codegen\Common\TransformDialectStrategiesCPU.cpp(176): note: see reference to function template instantiation 'std::function::function&,0>(_Fx)' being compiled
with
[
_Fx=mlir::iree_compiler::matchAndSetCPUReductionTransformStrategy:: &
]
D:\Dev\iree\compiler\src\iree\compiler\Codegen\Common\TransformDialectStrategiesCPU.cpp(176): note: see reference to function template instantiation 'std::function::function&,0>(_Fx)' being compiled
with
[
_Fx=mlir::iree_compiler::matchAndSetCPUReductionTransformStrategy:: &
]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.