diff --git a/python/paddle/fluid/executor.py b/python/paddle/fluid/executor.py index 867b40c1fe094503436938d539bf45fcdf03f9b3..bbdf6002279f22515c3e3f808701322afaeefaf8 100755 --- a/python/paddle/fluid/executor.py +++ b/python/paddle/fluid/executor.py @@ -1413,7 +1413,11 @@ class Executor(object): if program._is_inference: return False - # Unsupported case 5 : disabled by FLAGS_CONVERT_GRAPH_TO_PROGRAM + # Unsupported case 5: CUDA Graph + if program._build_strategy is not None and program._build_strategy.allow_cuda_graph_capture: + return False + + # Unsupported case 6 : disabled by FLAGS_CONVERT_GRAPH_TO_PROGRAM if os.environ.get('FLAGS_CONVERT_GRAPH_TO_PROGRAM', None) not in [1, '1', True, 'True', 'true']: return False