clean ROCm hsaco as well
@@ -14,6 +14,7 @@ Note that this code relies on atime support of the filesystem.
import argparse
import datetime
import glob
+import itertools
import os
import sys
@@ -36,7 +37,9 @@ def main():
os.path.expanduser('~/.cupy/kernel_cache/'))
_log('Looking for cache files under {}...'.format(cache_dir))
records = []
- for f in glob.glob(os.path.join(cache_dir, '*.cubin')):
+ for f in itertools.chain(
+ glob.iglob(os.path.join(cache_dir, '*.cubin')),
+ glob.iglob(os.path.join(cache_dir, '*.hsaco'))):
stat = os.lstat(f)
records.append((stat.st_atime, stat.st_size, f))
records.sort(reverse=True) # newest cache first
