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

Making CudaGraph-constructor SFINAE with `requires` by fior512 · Pull Request #803 · taskflow/taskflow · GitHub

Making CudaGraph-constructor SFINAE with requires - #803

Merged
tsung-wei-huang merged 1 commit into
taskflow:masterfrom
fior512:cudaGraph_constructor_SFINAE
Jul 28, 2026
Merged

tsung-wei-huang merged 1 commit into
taskflow:masterfrom
fior512:cudaGraph_constructor_SFINAE

Conversation

fior512 commented Jul 20, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

Fixes #753, with requires std::is_invocable_r_v<...> for SFINAE friendly behavior of CudaGraphBase inside taskflow/cuda/cuda_graph.hpp:550

Tests

Replicated with:

static_assert(!std::constructible_from<cudaGraph, std::string>, "bug: cudaGraph should not be constructible with std::string");

with master branch (cudagraph_i753.cpp is a local file for test):

cudagraph_i753.cpp:10:17: error: static assertion failed: bug: cudaGraph should not be constructible from std::string
   10 |   static_assert(!std::constructible_from<cudaGraph, std::string>, "bug: cudaGraph should not be constructible with std::string");
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

with this PR: fixed.

Notes

fior512 changed the title SFINAE issue753 cudagraph_t Making CudaGraph-constructor SFINAE with requires Jul 20, 2026
tsung-wei-huang merged commit c4da2a4 into taskflow:master Jul 28, 2026

Copy link
Copy Markdown
Member

Excellent pull! Thanks!

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