mindspore-ai / mindspore

MindSpore is a new open source deep learning training/inference framework that could be used for mobile, edge and cloud scenarios.
https://gitee.com/mindspore/mindspore
Apache License 2.0
4.23k stars 700 forks source link

cudart.lib cannot be directly set on Windows 10 #215

Open wanjunling168 opened 1 year ago

wanjunling168 commented 1 year ago

Environment

Hardware Environment(Ascend/GPU/CPU): GPU

Uncomment only one /device <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/device ascend

/device gpu
/device cpu

Software Environment:

Describe the current behavior

cudart.lib cannot be directly set on Windows 10

Describe the expected behavior

cudart.lib should be set on Windows 10

Steps to reproduce the issue

  1. call build.bat ms_vs_gpu

Related log / screenshot

Detect gpu arch on this device. CMake Error at G:/Compiled/mindspore/build/mindspore/ccsrc/CMakeFiles/CMakeTmp/CMakeLists.txt:21 (target_link_libraries): Syntax error in cmake code at

G:/Compiled/mindspore/build/mindspore/ccsrc/CMakeFiles/CMakeTmp/CMakeLists.txt:21

when parsing string

D:\Program Files\NVIDIA Corporation\CUDA\v11.1/lib/x64/cudart.lib

Invalid character escape '\P'.

CMake Error at mindspore/ccsrc/CMakeLists.txt:37 (try_run): Failed to configure test project build system. Call Stack (most recent call first): mindspore/ccsrc/CMakeLists.txt:172 (set_nvcc_flag)

Special notes for this issue

Workaround by change mindspore /ccsrc/CMakeLists.txt at Line 35: find_library(CUDA_LIB_PATH "cudart" HINTS ${CUDA_PATH}/lib/x64)

set(CUDA_LIB_PATH ${CUDA_PATH}/lib/x64/cudart.lib)

Then it works.

cxl-ll commented 1 year ago

Hello, the question is being analyzed and will be answered as soon as possible.

fangwenyi commented 1 year ago

你好,算子众智问题可以直接和华为这边的众智接口人联系解决