From cec086c91a9dbf4b6123dcf8f4547ab83dc22b1a Mon Sep 17 00:00:00 2001 From: janEbert Date: Wed, 17 Jul 2024 14:51:22 +0000 Subject: [PATCH] Fix database path default (#85) Before this change, the default for `database_path` would evaluate to the value that `BITBLAS_DATABASE_PATH` had upon the definition of the function, ignoring changes made using `set_database_path`. --- bitblas/cache/operator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bitblas/cache/operator.py b/bitblas/cache/operator.py index cbb2e0437..17702c6fc 100644 --- a/bitblas/cache/operator.py +++ b/bitblas/cache/operator.py @@ -167,7 +167,9 @@ def _instantiate_and_add_operator(self, mapping, config, rt_mod, srcpath, libpat global_operator_cache = OperatorCache() -def load_global_ops_cache(database_path=BITBLAS_DATABASE_PATH, target=None): +def load_global_ops_cache(database_path=None, target=None): + if database_path is None: + database_path = get_database_path() if target is None: target = bitblas.auto_detect_nvidia_target() logger.info(f"Loading operators from database {database_path} for target {target}")