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
jerrrrry
infinicore
Commits
f3f4bf16
Unverified
Commit
f3f4bf16
authored
Mar 06, 2026
by
thatPepe
Committed by
GitHub
Mar 06, 2026
Browse files
Merge pull request #1055 from InfiniTensor/issue/1033b
issue/1033 - further fix nv lua for backward compatibility
parents
e7a1b121
fc2500e5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
xmake.lua
xmake.lua
+3
-3
xmake/nvidia.lua
xmake/nvidia.lua
+1
-1
No files found.
xmake.lua
View file @
f3f4bf16
...
@@ -235,14 +235,14 @@ option_end()
...
@@ -235,14 +235,14 @@ option_end()
-- Flash-Attn
-- Flash-Attn
option
(
"flash-attn"
)
option
(
"flash-attn"
)
set_default
(
nil
)
set_default
(
""
)
set_showmenu
(
true
)
set_showmenu
(
true
)
set_description
(
"Path to flash-attention repo. If not set, flash-attention will not used."
)
set_description
(
"Path to flash-attention repo. If not set, flash-attention will not used."
)
option_end
()
option_end
()
if
has_config
(
"aten"
)
then
if
has_config
(
"aten"
)
then
add_defines
(
"ENABLE_ATEN"
)
add_defines
(
"ENABLE_ATEN"
)
if
get_config
(
"flash-attn"
)
~=
nil
then
if
get_config
(
"flash-attn"
)
~=
false
then
add_defines
(
"ENABLE_FLASH_ATTN"
)
add_defines
(
"ENABLE_FLASH_ATTN"
)
end
end
end
end
...
@@ -462,7 +462,7 @@ target("infinicore_cpp_api")
...
@@ -462,7 +462,7 @@ target("infinicore_cpp_api")
add_linkdirs
(
INFINI_ROOT
..
"/lib"
)
add_linkdirs
(
INFINI_ROOT
..
"/lib"
)
add_links
(
"infiniop"
,
"infinirt"
,
"infiniccl"
)
add_links
(
"infiniop"
,
"infinirt"
,
"infiniccl"
)
if
get_config
(
"flash-attn"
)
=
=
true
then
if
get_config
(
"flash-attn"
)
~
=
""
then
add_installfiles
(
"(builddir)/$(plat)/$(arch)/$(mode)/flash-attn*.so"
,
{
prefixdir
=
"lib"
})
add_installfiles
(
"(builddir)/$(plat)/$(arch)/$(mode)/flash-attn*.so"
,
{
prefixdir
=
"lib"
})
if
has_config
(
"nv-gpu"
)
then
if
has_config
(
"nv-gpu"
)
then
add_deps
(
"flash-attn-nvidia"
)
add_deps
(
"flash-attn-nvidia"
)
...
...
xmake/nvidia.lua
View file @
f3f4bf16
...
@@ -145,7 +145,7 @@ target("flash-attn-nvidia")
...
@@ -145,7 +145,7 @@ target("flash-attn-nvidia")
add_links
(
"cudart"
)
add_links
(
"cudart"
)
add_cugencodes
(
"native"
)
add_cugencodes
(
"native"
)
if
FLASH_ATTN_ROOT
and
FLASH_ATTN_ROOT
~=
false
and
FLASH_ATTN_ROOT
~=
""
then
if
FLASH_ATTN_ROOT
and
FLASH_ATTN_ROOT
~=
""
then
before_build
(
function
(
target
)
before_build
(
function
(
target
)
local
TORCH_DIR
=
os
.
iorunv
(
"python"
,
{
"-c"
,
"import torch, os; print(os.path.dirname(torch.__file__))"
}):
trim
()
local
TORCH_DIR
=
os
.
iorunv
(
"python"
,
{
"-c"
,
"import torch, os; print(os.path.dirname(torch.__file__))"
}):
trim
()
local
PYTHON_INCLUDE
=
os
.
iorunv
(
"python"
,
{
"-c"
,
"import sysconfig; print(sysconfig.get_paths()['include'])"
}):
trim
()
local
PYTHON_INCLUDE
=
os
.
iorunv
(
"python"
,
{
"-c"
,
"import sysconfig; print(sysconfig.get_paths()['include'])"
}):
trim
()
...
...
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