[Refactor] Unify torch profiler for omni and diffusion models (#2099)
Signed-off-by: gcanlin <canlinguosdu@gmail.com> Signed-off-by: Samit <285365963@qq.com> Co-authored-by: Samit <285365963@qq.com> Co-authored-by: lishunyang lishunyang12@163.com
This commit is contained in:
28 files changed
+1063
-404
No files matched your search
@@ -125,6 +125,16 @@ class OmniPlatform(Platform):
|
||||
|
||||
os.environ.pop(cls.device_control_env_var, None)
|
||||
|
||||
@classmethod
|
||||
def get_profiler_cls(cls) -> str:
|
||||
"""Get the profiler class for this platform.
|
||||
|
||||
Returns:
|
||||
Fully qualified class path of the profiler.
|
||||
Default returns the base OmniTorchProfilerWrapper.
|
||||
"""
|
||||
return "vllm_omni.profiler.omni_torch_profiler.OmniTorchProfilerWrapper"
|
||||
|
||||
|
||||
class UnspecifiedOmniPlatform(OmniPlatform):
|
||||
_omni_enum = OmniPlatformEnum.UNSPECIFIED
|
||||
|
||||
Reference in new issue
Block a user