FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

cudaGraphBase: constrain the variadic ctor on Creator being invocable by Gooh456 · Pull Request #804 · taskflow/taskflow · GitHub

cudaGraphBase: constrain the variadic ctor on Creator being invocable - #804

Open
Gooh456 wants to merge 1 commit into
taskflow:masterfrom
Gooh456:fix-cudagraphbase-sfinae-753
Open

Gooh456 wants to merge 1 commit into
taskflow:masterfrom
Gooh456:fix-cudagraphbase-sfinae-753

Conversation

Gooh456 commented Jul 24, 2026

Copy link
Copy Markdown

Fixes #753. cudaGraphBase(ArgsT&&...) forwards straight to Creator{}(args...) with no constraint, so anything that probes it via std::constructible_from/if constexpr gets a hard error from inside the constructor body instead of SFINAE'ing away cleanly. Added requires std::invocable<Creator, ArgsT...> — matches the fix suggested in the issue, <concepts> is already available transitively through traits.hpp so nothing new to include.

I don't have a CUDA toolchain here to compile-verify this against the reporter's exact if constexpr(std::constructible_from<...>) repro — flagging that so it gets a real build check in CI/review rather than assuming it's clean.

Signed-off-by: Kyue <164024549+Gooh456@users.noreply.github.com>

fior512 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Hey @Gooh456, why not using requires std::is_invocable_r_v<cudaGraph_t, Creator, ArgsT...> to check right after if convertible to cudaGraph_t ? Also i opened #803 few days ago, which cover same issue ticket

Gooh456 commented Jul 24, 2026

Copy link
Copy Markdown
Author

looks good, will review properly in a bit

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

cudaGraph constructor is not SFINAE-friendly

2 participants


Back | FazBrowse Home | New Git URL