Skip to content

Commit

Permalink
fix rpd_mark
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan138 committed Oct 1, 2024
1 parent 0812d36 commit b05b3ce
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions vllm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,19 @@ def __init__(self, name=None):
self.name = name

def __call__(self, func):
from hipScopedMarker import hipScopedMarker

@wraps(func)
def inner(*args, **kwds):
marker_name = self.name if self.name else f"{func.__name__}"
with hipScopedMarker(f"{marker_name}"):
return func(*args, **kwds)
if envs.VLLM_RPD_PROFILER_DIR is None:
return func
else:

@wraps(func)
def inner(*args, **kwds):
from hipScopedMarker import hipScopedMarker
marker_name = self.name if self.name else f"{func.__name__}"
with hipScopedMarker(f"{marker_name}"):
return func(*args, **kwds)

return inner
return inner


class Device(enum.Enum):
Expand Down

0 comments on commit b05b3ce

Please sign in to comment.