# 关于vllm-ascend的性能采集的问题

**URL:** <https://discuss.vllm.ai/t/vllm-ascend/2180>\
**Category:** Ascend Support\
**Created:** [January 5, 2026, 2:03am UTC](https://discuss.vllm.ai/t/vllm-ascend/2180 "2026-01-05T02:03:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbdjxgp](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/gbdjxgp/32/811_2.png) [@gbdjxgp](https://discuss.vllm.ai/u/gbdjxgp)\
**Post date:** [January 5, 2026, 2:03am UTC](https://discuss.vllm.ai/t/vllm-ascend/2180/1 "2026-01-05T02:03:20Z")

</div>

您好，相关问题链接：[https://www.hiascend.com/forum/thread-0261202960094059300-1-1.html](https://www.hiascend.com/forum/thread-0261202960094059300-1-1.html)

我想了解的是：vllm-ascend采集数据的逻辑是怎么样的？

msserviceprofiler通过entry\_points机制实现了自动profile功能，我了解到：v0.11.0并没有profiling\_config.py这个文件但却能正常用msserviceprofiler，

那是不是profiling\_config这个文件就不需要了？还是说这个文件存在的意义是给用户看的呢

---

<div class="post-metadata">

**Author:** ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)\
**Post date:** [January 5, 2026, 2:03am UTC](https://discuss.vllm.ai/t/vllm-ascend/2180/2 "2026-01-05T02:03:48Z")

</div>

我的理解是，vllm-ascend 的数据采集逻辑主要依赖于 torch\_npu 的 profiler 或 msserviceprofiler，两者本质上是不同的采集工具，但采集流程类似，都是在模型推理过程中收集算子、内存等信息。profiling\_config.py 文件的存在与否，主要影响的是配置采集参数和采集方式的灵活性，如果没有该文件，默认配置下 torch\_npu 的 profiler 依然可以正常工作，但无法自定义采集细节；而 msserviceprofiler 是独立于 torch\_npu profiler 的另一套采集实现，二者不是同一个东西，但采集流程类似，都是 hook 到推理流程中收集数据。据我所查，v0.11.0 没有 profiling\_config.py 也不会影响 msserviceprofiler 的正常使用，因为它们的调用入口和实现机制是分离的。

至于“如果有 profiling\_config.py 就不会调用 torch\_npu 的 profiler 而是调用钩子函数吗”，我的理解是 profiling\_config.py 只是提供配置选项，不会直接决定采集工具的切换，采集工具的选择还是由代码逻辑和环境变量决定。torch\_npu 的 profiler 和 msserviceprofiler 实际上是两套采集体系，采集流程类似但实现不同，二者的数据采集流程都是在推理主流程中插桩收集算子、内存等信息。是否需要更详细的采集流程代码分析？  
参考：[vllm profiling 官方文档](https://docs.vllm.ai/en/latest/contributing/profiling/profiling_index.html)、[vllm profiling 相关 issue](https://github.com/vllm-project/vllm/issues/11346)

Sources:

- [https://github.com/vllm-project/vllm/issues/11346](https://github.com/vllm-project/vllm/issues/11346)
- [vllm profiling 官方文档](https://docs.vllm.ai/en/latest/contributing/profiling/profiling_index.html)

Hint: Mention @RunLLM in the post for followups.
