Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
989f4f43
Unverified
Commit
989f4f43
authored
Mar 03, 2025
by
Cody Yu
Committed by
GitHub
Mar 04, 2025
Browse files
[Misc] Remove lru_cache in NvmlCudaPlatform (#14156)
Signed-off-by:
Cody Yu
<
hao.yu.cody@gmail.com
>
parent
bb5b6403
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
vllm/platforms/cuda.py
vllm/platforms/cuda.py
+1
-6
No files found.
vllm/platforms/cuda.py
View file @
989f4f43
...
...
@@ -4,7 +4,7 @@ pynvml. However, it should not initialize cuda context.
"""
import
os
from
functools
import
lru_cache
,
wraps
from
functools
import
wraps
from
typing
import
(
TYPE_CHECKING
,
Callable
,
List
,
Optional
,
Tuple
,
TypeVar
,
Union
)
...
...
@@ -284,7 +284,6 @@ class CudaPlatformBase(Platform):
class
NvmlCudaPlatform
(
CudaPlatformBase
):
@
classmethod
@
lru_cache
(
maxsize
=
8
)
@
with_nvml_context
def
get_device_capability
(
cls
,
device_id
:
int
=
0
...
...
@@ -298,7 +297,6 @@ class NvmlCudaPlatform(CudaPlatformBase):
return
None
@
classmethod
@
lru_cache
(
maxsize
=
8
)
@
with_nvml_context
def
has_device_capability
(
cls
,
...
...
@@ -311,14 +309,12 @@ class NvmlCudaPlatform(CudaPlatformBase):
return
False
@
classmethod
@
lru_cache
(
maxsize
=
8
)
@
with_nvml_context
def
get_device_name
(
cls
,
device_id
:
int
=
0
)
->
str
:
physical_device_id
=
device_id_to_physical_device_id
(
device_id
)
return
cls
.
_get_physical_device_name
(
physical_device_id
)
@
classmethod
@
lru_cache
(
maxsize
=
8
)
@
with_nvml_context
def
get_device_uuid
(
cls
,
device_id
:
int
=
0
)
->
str
:
physical_device_id
=
device_id_to_physical_device_id
(
device_id
)
...
...
@@ -326,7 +322,6 @@ class NvmlCudaPlatform(CudaPlatformBase):
return
pynvml
.
nvmlDeviceGetUUID
(
handle
)
@
classmethod
@
lru_cache
(
maxsize
=
8
)
@
with_nvml_context
def
get_device_total_memory
(
cls
,
device_id
:
int
=
0
)
->
int
:
physical_device_id
=
device_id_to_physical_device_id
(
device_id
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment