-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Description
由于 issue #33208 中的原因,我需要手动为源码中的一些 gflags 赋值,如
Paddle/paddle/fluid/platform/dynload/dynamic_loader.cc
Lines 27 to 30 in e0aa1d6
| DEFINE_string(cudnn_dir, "", | |
| "Specify path for loading libcudnn.so. For instance, " | |
| "/usr/local/cudnn/lib. If empty [default], dlopen " | |
| "will search cudnn from LD_LIBRARY_PATH"); |
但我尝试过直接 export FLAGS_cudnn_dir=xxx 无效,使用 paddle.fluid.set_flags 则报错
>>> paddle.fluid.set_flags({'FLAGS_cudnn_dir': '/somewhere/anaconda3/lib'})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/zhaoyao/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/framework.py", line 6159, in set_flags
raise ValueError(
ValueError: Flag FLAGS_cudnn_dir cannot set its value through this function.请问在使用paddlepaddle的时候如何正确赋值这些 flags ?
paddlepaddle 版本为 2.1
Metadata
Metadata
Assignees
Labels
No labels