Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
tilelang
Commits
1516f43c
Unverified
Commit
1516f43c
authored
Oct 20, 2025
by
Lei Wang
Committed by
GitHub
Oct 20, 2025
Browse files
[Cache] raise errors for `tileang.clear_cache()` (#1077)
parent
6a388c0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
tilelang/cache/__init__.py
tilelang/cache/__init__.py
+8
-2
No files found.
tilelang/cache/__init__.py
View file @
1516f43c
...
@@ -39,9 +39,15 @@ def cached(
...
@@ -39,9 +39,15 @@ def cached(
def
clear_cache
():
def
clear_cache
():
"""
"""
Clears the entire kernel cache (using KernelCache class).
Disabled helper that previously removed the entire kernel cache.
Raises:
RuntimeError: Always raised to warn users to clear the cache manually.
"""
"""
_kernel_cache_instance
.
clear_cache
()
cache_dir
=
env
.
TILELANG_CACHE_DIR
raise
RuntimeError
(
"tilelang.clear_cache() is disabled because deleting the cache directory "
"is dangerous. If you accept the risk, remove it manually with "
f
"`rm -rf '
{
cache_dir
}
'`."
)
if
env
.
TILELANG_CLEAR_CACHE
.
lower
()
in
(
"1"
,
"true"
,
"yes"
,
"on"
):
if
env
.
TILELANG_CLEAR_CACHE
.
lower
()
in
(
"1"
,
"true"
,
"yes"
,
"on"
):
...
...
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