Skip to content

Commit bb941bd

Browse files
[SYCL RTC] Exclude libdevice's .o/.spv files from resources (#20759)
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`.
1 parent 259c433 commit bb941bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sycl-jit/jit-compiler/utils/generate.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import argparse
33
import glob
4+
import re
45

56

67
def main():
@@ -33,6 +34,9 @@ def main():
3334
)
3435

3536
def process_file(file_path):
37+
# We only need .bc files from libdevice:
38+
if re.search(r"[/\\]libsycl-.*\.(o|obj|spv)$", file_path):
39+
return
3640
out.write(
3741
f"""
3842
{{

0 commit comments

Comments
 (0)