From b540a1d18e3c03ef95057b6d35fc73f28a5b738b Mon Sep 17 00:00:00 2001 From: Pavel Durandin Date: Thu, 25 Jan 2024 07:50:15 +0400 Subject: [PATCH] Cuda graph (#846) * [NVIDIA] Add operator==/!= to DevicePointer * [NVIDIA] Add CUDA::NodeParams, CUDA::TransferNode, CUDA::KernelNode * [NVIDIA] Add kernel args getters for Insert/Slice * [NVIDIA] Add KernelNodeTest and TransferNodeTest * [NVIDIA] Fix review issues * [NVIDIA] Add launchers to TI, refactor Execute() * [NVIDIA] Add TiCudaGraphInfo * [NVIDIA] Update TI to support CUDA graph as a body of iterations loop * [NVIDIA] Add operator== for dim3, KernelNode and NodeParams * [NVIDIA] Update Run() of *TopologyRunners to take non-const context reference * [NVIDIA] Remove TiCudaGraphInfo, add set_current_graph(), add_new_graph_info(), get_current_graph_info(), select_current_graph() * [NVIDIA] Change IsCudaGraphCompatible() interface to GetCudaGraphCompatibility() using enum * [NVIDIA] Add ExecuteGraph() to IOperationExec/OperationBase * [NVIDIA] Remove paramsGraph_/resultsGraph_ from CudaGraphInfo * [CUDA] Merge, ph2 * [CUDA] Merge, ph3 * [CUDA] Merge, ph4 * [CUDA] Merge, ph5 * [CUDA] Merge, ph6 --------- Co-authored-by: Andrii Pavliuk --- .../nvidia_plugin/src/cuda_eager_topology_runner.cpp | 12 ++++++++++++ .../nvidia_plugin/src/cuda_eager_topology_runner.hpp | 1 + modules/nvidia_plugin/src/cuda_graph_context.hpp | 1 + 3 files changed, 14 insertions(+) create mode 100644 modules/nvidia_plugin/src/cuda_eager_topology_runner.cpp diff --git a/modules/nvidia_plugin/src/cuda_eager_topology_runner.cpp b/modules/nvidia_plugin/src/cuda_eager_topology_runner.cpp new file mode 100644 index 000000000..8f96cd407 --- /dev/null +++ b/modules/nvidia_plugin/src/cuda_eager_topology_runner.cpp @@ -0,0 +1,12 @@ +// Copyright (C) 2018-2023 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cuda_eager_topology_runner.hpp" + +namespace ov { +namespace nvidia_gpu { + + +} // namespace nvidia_gpu +} // namespace ov diff --git a/modules/nvidia_plugin/src/cuda_eager_topology_runner.hpp b/modules/nvidia_plugin/src/cuda_eager_topology_runner.hpp index 72c60b52f..fafd2e26f 100644 --- a/modules/nvidia_plugin/src/cuda_eager_topology_runner.hpp +++ b/modules/nvidia_plugin/src/cuda_eager_topology_runner.hpp @@ -25,6 +25,7 @@ class EagerTopologyRunner final : public SubGraph, public ITopologyRunner { void Run(InferenceRequestContext& context, const Workbuffers& workbuffers) const override{}; void Capture(InferenceRequestContext& context, const Workbuffers& workbuffers) const override{}; + void UpdateContext(InferenceRequestContext& context, const DeviceMemBlock& memoryBlock) const override{}; const SubGraph& GetSubGraph() const override { return *this; } diff --git a/modules/nvidia_plugin/src/cuda_graph_context.hpp b/modules/nvidia_plugin/src/cuda_graph_context.hpp index b058af53c..3dd9c7255 100644 --- a/modules/nvidia_plugin/src/cuda_graph_context.hpp +++ b/modules/nvidia_plugin/src/cuda_graph_context.hpp @@ -12,6 +12,7 @@ namespace ov { namespace nvidia_gpu { class ICudaGraphInfo { + public: virtual ~ICudaGraphInfo() = 0;