From 195bb30068a0f778e6502ca906e0c69b13a5c3d0 Mon Sep 17 00:00:00 2001 From: littlemine Date: Wed, 3 Apr 2024 17:34:46 +0800 Subject: [PATCH] tdg written in right order --- projects/CUDA/graph/Task.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/CUDA/graph/Task.cpp b/projects/CUDA/graph/Task.cpp index 066a12c815..06516362de 100644 --- a/projects/CUDA/graph/Task.cpp +++ b/projects/CUDA/graph/Task.cpp @@ -243,6 +243,9 @@ struct WriteTaskDependencyGraph : INode { return; records.insert(node); + for (auto &&[tag, node] : node->deps) + process_node(jsons, node.get(), records); + Json json; json["name"] = node->tag; json["cmds"] = node->workItems; @@ -253,9 +256,6 @@ struct WriteTaskDependencyGraph : INode { Json j; j[node->tag] = json; jsons.push_back(j); - - for (auto &&[tag, node] : node->deps) - process_node(jsons, node.get(), records); } void apply() override { std::vector nodes;