From 11de09e55887150cec1d2fce4f48ca6f0761efe8 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 21 Aug 2024 18:07:56 -0500 Subject: [PATCH] use functools.cache unconditionally --- python/cuml/cuml/internals/available_devices.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/python/cuml/cuml/internals/available_devices.py b/python/cuml/cuml/internals/available_devices.py index 8110f1b5d1..ee3b9b2500 100644 --- a/python/cuml/cuml/internals/available_devices.py +++ b/python/cuml/cuml/internals/available_devices.py @@ -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. @@ -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():