From 57388ffd4d3784821e213e8ea12ceb027185745b Mon Sep 17 00:00:00 2001 From: Nadezhda Ageeva Date: Fri, 15 Sep 2023 15:33:29 +0400 Subject: [PATCH] Check CUDA_VERSION definition (#727) --- modules/nvidia_plugin/src/cuda/graph.cpp | 2 +- modules/nvidia_plugin/src/cuda/graph.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nvidia_plugin/src/cuda/graph.cpp b/modules/nvidia_plugin/src/cuda/graph.cpp index 76fa5a772..3bf743a1a 100644 --- a/modules/nvidia_plugin/src/cuda/graph.cpp +++ b/modules/nvidia_plugin/src/cuda/graph.cpp @@ -53,7 +53,7 @@ catch (std::exception &e) { } #endif -#if CUDA_VERSION >= 12020 +#if defined(CUDA_VERSION) && CUDA_VERSION >= 12020 cudaGraphExecUpdateResultInfo GraphExec::update(const Graph &g) const { cudaGraphExecUpdateResultInfo res; throwIfError(cudaGraphExecUpdate(get(), g.get(), &res)); diff --git a/modules/nvidia_plugin/src/cuda/graph.hpp b/modules/nvidia_plugin/src/cuda/graph.hpp index d4a388049..b014e2131 100644 --- a/modules/nvidia_plugin/src/cuda/graph.hpp +++ b/modules/nvidia_plugin/src/cuda/graph.hpp @@ -35,7 +35,7 @@ class GraphExec : public Handle { public: GraphExec(const Graph& g); -#if CUDA_VERSION >= 12020 +#if defined(CUDA_VERSION) && CUDA_VERSION >= 12020 cudaGraphExecUpdateResultInfo update(const Graph& g) const; #else cudaGraphExecUpdateResult update(const Graph& g) const;