From 394d2e0ea02478fd904d68810f25239e4e678a79 Mon Sep 17 00:00:00 2001 From: Jiawei Wang Date: Fri, 22 Oct 2021 14:09:18 +0800 Subject: [PATCH] Merge pull request #1437 from bjjwwang/develop version 0.7 suffix --- python/CMakeLists.txt | 10 +++++++--- python/paddle_serving_server/server.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 589420ad..86740ce6 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -72,9 +72,13 @@ if (SERVER) if(CUDA_VERSION EQUAL 10.1) set(VERSION_SUFFIX 101) elseif(CUDA_VERSION EQUAL 10.2) - set(VERSION_SUFFIX 102) - elseif(CUDA_VERSION EQUAL 11.0) - set(VERSION_SUFFIX 11) + if(CUDNN_MAJOR_VERSION EQUAL 7) + set(VERSION_SUFFIX 1027) + elseif(CUDNN_MAJOR_VERSION EQUAL 8) + set(VERSION_SUFFIX 1028) + endif() + elseif(CUDA_VERSION EQUAL 11.2) + set(VERSION_SUFFIX 112) endif() endif() diff --git a/python/paddle_serving_server/server.py b/python/paddle_serving_server/server.py index f21e13aa..0510579d 100755 --- a/python/paddle_serving_server/server.py +++ b/python/paddle_serving_server/server.py @@ -428,7 +428,7 @@ class Server(object): if device_type == "0": device_version = self.get_device_version() elif device_type == "1": - if version_suffix == "101" or version_suffix == "102": + if version_suffix == "101" or version_suffix == "1027" or version_suffix == "1028" or version_suffix == "112": device_version = "gpu-" + version_suffix else: device_version = "gpu-cuda" + version_suffix -- GitLab