Skip to content

Commit

Permalink
use functools.cache unconditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Aug 21, 2024
1 parent 96c6628 commit 11de09e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions python/cuml/cuml/internals/available_devices.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,12 +16,8 @@
from cuml.internals.device_support import GPU_ENABLED
from cuml.internals.safe_imports import gpu_only_import_from, UnavailableError

try:
from functools import cache # requires Python >= 3.9
except ImportError:
from functools import lru_cache

cache = lru_cache(maxsize=None)
from functools import cache


def gpu_available_no_context_creation():
Expand Down

0 comments on commit 11de09e

Please sign in to comment.