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
304b4465
Commit
304b4465
authored
Mar 28, 2025
by
penguin_wwy
Committed by
LeiWang1999
Mar 28, 2025
Browse files
[Dev] Correcting cxx compiler (#294)
parent
5079e2a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
tilelang/contrib/cc.py
tilelang/contrib/cc.py
+2
-0
tilelang/jit/adapter/libgen.py
tilelang/jit/adapter/libgen.py
+2
-1
No files found.
tilelang/contrib/cc.py
View file @
304b4465
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# specific language governing permissions and limitations
# under the License.
# under the License.
"""Util to invoke C/C++ compilers in the system."""
"""Util to invoke C/C++ compilers in the system."""
import
functools
import
os
import
os
import
shutil
import
shutil
import
subprocess
import
subprocess
...
@@ -62,6 +63,7 @@ def get_cc():
...
@@ -62,6 +63,7 @@ def get_cc():
return
None
return
None
@
functools
.
lru_cache
(
maxsize
=
None
)
def
get_cplus_compiler
():
def
get_cplus_compiler
():
"""Return the path to the default C/C++ compiler.
"""Return the path to the default C/C++ compiler.
...
...
tilelang/jit/adapter/libgen.py
View file @
304b4465
...
@@ -67,10 +67,11 @@ class LibraryGenerator(object):
...
@@ -67,10 +67,11 @@ class LibraryGenerator(object):
src
.
name
,
src
.
name
,
]
]
elif
is_cpu_target
(
target
):
elif
is_cpu_target
(
target
):
from
tilelang.contrib.cc
import
get_cplus_compiler
src
=
tempfile
.
NamedTemporaryFile
(
mode
=
"w"
,
suffix
=
".cpp"
,
delete
=
False
)
src
=
tempfile
.
NamedTemporaryFile
(
mode
=
"w"
,
suffix
=
".cpp"
,
delete
=
False
)
libpath
=
src
.
name
.
replace
(
".cpp"
,
".so"
)
libpath
=
src
.
name
.
replace
(
".cpp"
,
".so"
)
command
=
[
"g++"
,
"-std=c++17"
,
"-fPIC"
,
"-shared"
,
src
.
name
]
command
=
[
get_cplus_compiler
()
,
"-std=c++17"
,
"-fPIC"
,
"-shared"
,
src
.
name
]
with_tl
=
False
with_tl
=
False
command
+=
[
command
+=
[
"-I"
+
TILELANG_TEMPLATE_PATH
,
"-I"
+
TILELANG_TEMPLATE_PATH
,
...
...
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