[Bugfix] Fix the issue where no exception is thrown when graph capture fails. (#5644)
### What this PR does / why we need it? Fix the issue where no exception is thrown when graph capture fails. - vLLM version: v0.13.0 - vLLM main: https://github.com/vllm-project/vllm/commit/2f4e6548efec402b913ffddc8726230d9311948d Signed-off-by: WithHades <244036962@qq.com>
This commit is contained in:
1 file changed
+2
@@ -3225,6 +3225,8 @@ def _replace_gpu_model_runner_function_wrapper(target_module_name):
|
||||
target_module = sys.modules[target_module_name]
|
||||
setattr(target_module, "graph_capture", graph_capture) # noqa: B010
|
||||
yield
|
||||
except Exception as e:
|
||||
raise RuntimeError(f"NPUModelRunner failed, error is {e}")
|
||||
finally:
|
||||
setattr(target_module, "graph_capture", graph_capture) # noqa: B010
|
||||
|
||||
|
||||
Reference in new issue
Block a user