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;