File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 15
15
# limitations under the License.
16
16
17
17
import os
18
+ import re
18
19
import subprocess
19
20
import sys
21
+ import sysconfig
20
22
21
23
22
24
def run (
@@ -105,6 +107,13 @@ def find_objects():
105
107
import os
106
108
107
109
objects = []
110
+ sfx_regexp = sysconfig .get_config_var ("EXT_SUFFIX" ).replace ("." , r"\." )
111
+ regexp1 = re .compile (r"^_tensor_.*impl" + sfx_regexp )
112
+ regexp2 = re .compile (r"^_device_queries" + sfx_regexp )
113
+
114
+ def is_py_ext (fn ):
115
+ return re .match (regexp1 , fn ) or re .match (regexp2 , fn )
116
+
108
117
for root , _ , files in os .walk ("_skbuild" ):
109
118
for file in files :
110
119
if not file .endswith (".so" ):
@@ -116,7 +125,7 @@ def find_objects():
116
125
for match in [
117
126
"libsyclinterface" ,
118
127
]
119
- ):
128
+ ) or is_py_ext ( file ) :
120
129
objects .extend (["-object" , os .path .join (root , file )])
121
130
return objects
122
131
You can’t perform that action at this time.
0 commit comments