From 8821e2ea3c93e5252c90bbfb49b613c09d2ab82c Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Tue, 25 Nov 2025 09:54:13 -0800 Subject: [PATCH] [SYCL RTC] Exclude libdevice's `.o/.spv` files from resources We only use `.bc` files from libdevice. Another potential implementation for this was to update libdevice's CMakeLists.txt to have separate `libdevice-bc` and `libdevice-non-bc` install components and only install the former into `rtc-resoruce-install` directory. However, that would be intrusive to libdevice with zero benefit there, so I decided to do the filter on the sycl-jit's side inside `generate.py`. --- sycl-jit/jit-compiler/utils/generate.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sycl-jit/jit-compiler/utils/generate.py b/sycl-jit/jit-compiler/utils/generate.py index 449723b8fa268..96a7ec87cce33 100644 --- a/sycl-jit/jit-compiler/utils/generate.py +++ b/sycl-jit/jit-compiler/utils/generate.py @@ -1,6 +1,7 @@ import os import argparse import glob +import re def main(): @@ -33,6 +34,9 @@ def main(): ) def process_file(file_path): + # We only need .bc files from libdevice: + if re.search(r"[/\\]libsycl-.*\.(o|obj|spv)$", file_path): + return out.write( f""" {{