Skip to content

Attempting to improve compiler error messages related to tag_invoke#6843

Open
hkaiser wants to merge 1 commit intomasterfrom
fixing_6718
Open

Attempting to improve compiler error messages related to tag_invoke#6843
hkaiser wants to merge 1 commit intomasterfrom
fixing_6718

Conversation

@hkaiser
Copy link
Copy Markdown
Contributor

@hkaiser hkaiser commented Jan 1, 2026

This is an experiment of how to best improve generated error messages if no appropriate tag_invoke overloads are being available.

The main idea is to add explicit operator()() overload(s) to the customization point object that concept-check all arguments. These operator()() overloads simply forward to the base-class dispatch logic. This has the additional benefit of centralized argument concept-checking for all tag_invoke overloads provided.

If this proves to be applicable it opens up a path to fixing #6718.

Comment thread libs/core/execution_base/include/hpx/execution_base/execution.hpp Dismissed
template <executor_any Executor, typename F, typename... Ts>
requires(std::invocable<F &&, Ts && ...>)
HPX_FORCEINLINE constexpr decltype(auto) operator()(
Executor&& exec, F&& f, Ts&&... ts) const

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable ts is not used.
typename... Ts>
requires(std::invocable<F &&, shape_value_type_t<Shape>, Ts && ...>)
HPX_FORCEINLINE constexpr decltype(auto) operator()(
Executor&& exec, F&& f, Shape const& shape, Ts&&... ts) const

Check notice

Code scanning / CodeQL

Unused static variable Note

Static variable ts is never read.
typename... Ts>
requires(std::invocable<F &&, shape_value_type_t<Shape>, Ts && ...>)
HPX_FORCEINLINE constexpr decltype(auto) operator()(
Executor&& exec, F&& f, Shape const& shape, Ts&&... ts) const

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable ts is not used.
@hkaiser
Copy link
Copy Markdown
Contributor Author

hkaiser commented Jan 9, 2026

retest lsu

@StellarBot
Copy link
Copy Markdown

Performance test report

HPX Performance

Comparison

BENCHMARKFORK_JOIN_EXECUTORPARALLEL_EXECUTORSCHEDULER_EXECUTOR
For Each(=)-(=)

Info

PropertyBeforeAfter
HPX Commit501a58534e4371
HPX Datetime2025-08-24T21:58:54+00:002026-01-03T18:21:57+00:00
Envfile
Hostnamemedusa08.rostam.cct.lsu.edumedusa08.rostam.cct.lsu.edu
Datetime2025-08-24T17:06:08.105484-05:002026-01-09T15:25:09.339426-06:00
Clusternamerostamrostam
Compiler/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8

Comparison

BENCHMARKNO-EXECUTOR
Future Overhead - Create Thread Hierarchical - Latch+

Info

PropertyBeforeAfter
HPX Commit501a58534e4371
HPX Datetime2025-08-24T21:58:54+00:002026-01-03T18:21:57+00:00
Envfile
Hostnamemedusa08.rostam.cct.lsu.edumedusa08.rostam.cct.lsu.edu
Datetime2025-08-24T17:08:02.398682-05:002026-01-09T15:27:01.969622-06:00
Clusternamerostamrostam
Compiler/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8

Comparison

BENCHMARKFORK_JOIN_EXECUTOR_DEFAULT_FORK_JOIN_POLICY_ALLOCATORPARALLEL_EXECUTOR_DEFAULT_PARALLEL_POLICY_ALLOCATORSCHEDULER_EXECUTOR_DEFAULT_SCHEDULER_EXECUTOR_ALLOCATOR
Stream Benchmark - Add(=)---(=)
Stream Benchmark - Scale(=)---(=)
Stream Benchmark - Triad(=)-----
Stream Benchmark - Copy+------

Info

PropertyBeforeAfter
HPX Commit501a58534e4371
HPX Datetime2025-08-24T21:58:54+00:002026-01-03T18:21:57+00:00
Envfile
Hostnamemedusa08.rostam.cct.lsu.edumedusa08.rostam.cct.lsu.edu
Datetime2025-08-24T17:08:22.660177-05:002026-01-09T15:27:23.977086-06:00
Clusternamerostamrostam
Compiler/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8

Explanation of Symbols

SymbolMEANING
=No performance change (confidence interval within ±1%)
(=)Probably no performance change (confidence interval within ±2%)
(+)/(-)Very small performance improvement/degradation (≤1%)
+/-Small performance improvement/degradation (≤5%)
++/--Large performance improvement/degradation (≤10%)
+++/---Very large performance improvement/degradation (>10%)
?Probably no change, but quite large uncertainty (confidence interval with ±5%)
??Unclear result, very large uncertainty (±10%)
???Something unexpected…

- this is an experiment of how to best improve generated error messages if no
  appropriate tag_invoke overloads are being available

Signed-off-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>
@StellarBot
Copy link
Copy Markdown

Performance test report

HPX Performance

Comparison

BENCHMARKFORK_JOIN_EXECUTORPARALLEL_EXECUTORSCHEDULER_EXECUTOR
For Each(=)-(=)

Info

PropertyBeforeAfter
HPX Commit501a585544a647
HPX Datetime2025-08-24T21:58:54+00:002026-01-31T16:55:18+00:00
Clusternamerostamrostam
Compiler/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8
Envfile
Datetime2025-08-24T17:06:08.105484-05:002026-01-31T11:00:57.536949-06:00
Hostnamemedusa08.rostam.cct.lsu.edumedusa08.rostam.cct.lsu.edu

Comparison

BENCHMARKNO-EXECUTOR
Future Overhead - Create Thread Hierarchical - Latch+

Info

PropertyBeforeAfter
HPX Commit501a585544a647
HPX Datetime2025-08-24T21:58:54+00:002026-01-31T16:55:18+00:00
Clusternamerostamrostam
Compiler/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8
Envfile
Datetime2025-08-24T17:08:02.398682-05:002026-01-31T11:02:49.745745-06:00
Hostnamemedusa08.rostam.cct.lsu.edumedusa08.rostam.cct.lsu.edu

Comparison

BENCHMARKFORK_JOIN_EXECUTOR_DEFAULT_FORK_JOIN_POLICY_ALLOCATORPARALLEL_EXECUTOR_DEFAULT_PARALLEL_POLICY_ALLOCATORSCHEDULER_EXECUTOR_DEFAULT_SCHEDULER_EXECUTOR_ALLOCATOR
Stream Benchmark - Add(=)---(=)
Stream Benchmark - Scale(=)---=
Stream Benchmark - Triad(=)-----
Stream Benchmark - Copy+------

Info

PropertyBeforeAfter
HPX Commit501a585544a647
HPX Datetime2025-08-24T21:58:54+00:002026-01-31T16:55:18+00:00
Clusternamerostamrostam
Compiler/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8/opt/apps/llvm/18.1.8/bin/clang++ 18.1.8
Envfile
Datetime2025-08-24T17:08:22.660177-05:002026-01-31T11:03:11.819206-06:00
Hostnamemedusa08.rostam.cct.lsu.edumedusa08.rostam.cct.lsu.edu

Explanation of Symbols

SymbolMEANING
=No performance change (confidence interval within ±1%)
(=)Probably no performance change (confidence interval within ±2%)
(+)/(-)Very small performance improvement/degradation (≤1%)
+/-Small performance improvement/degradation (≤5%)
++/--Large performance improvement/degradation (≤10%)
+++/---Very large performance improvement/degradation (>10%)
?Probably no change, but quite large uncertainty (confidence interval with ±5%)
??Unclear result, very large uncertainty (±10%)
???Something unexpected…

@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for ac357ab1 0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ac357ab) Report Missing Report Missing Report Missing
Head commit (08cbce7) 49399 0 0.00%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#6843) 6 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants