Skip to content

Commit f3f4bf1

Browse files
authored
Merge pull request #1055 from InfiniTensor/issue/1033b
issue/1033 - further fix nv lua for backward compatibility
2 parents e7a1b12 + fc2500e commit f3f4bf1

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

xmake.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,14 @@ option_end()
235235

236236
-- Flash-Attn
237237
option("flash-attn")
238-
set_default(nil)
238+
set_default("")
239239
set_showmenu(true)
240240
set_description("Path to flash-attention repo. If not set, flash-attention will not used.")
241241
option_end()
242242

243243
if has_config("aten") then
244244
add_defines("ENABLE_ATEN")
245-
if get_config("flash-attn") ~= nil then
245+
if get_config("flash-attn") ~= false then
246246
add_defines("ENABLE_FLASH_ATTN")
247247
end
248248
end
@@ -462,7 +462,7 @@ target("infinicore_cpp_api")
462462
add_linkdirs(INFINI_ROOT.."/lib")
463463
add_links("infiniop", "infinirt", "infiniccl")
464464

465-
if get_config("flash-attn") == true then
465+
if get_config("flash-attn") ~= "" then
466466
add_installfiles("(builddir)/$(plat)/$(arch)/$(mode)/flash-attn*.so", {prefixdir = "lib"})
467467
if has_config("nv-gpu") then
468468
add_deps("flash-attn-nvidia")

xmake/nvidia.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ target("flash-attn-nvidia")
145145
add_links("cudart")
146146
add_cugencodes("native")
147147

148-
if FLASH_ATTN_ROOT and FLASH_ATTN_ROOT ~= false and FLASH_ATTN_ROOT ~= "" then
148+
if FLASH_ATTN_ROOT and FLASH_ATTN_ROOT ~= "" then
149149
before_build(function (target)
150150
local TORCH_DIR = os.iorunv("python", {"-c", "import torch, os; print(os.path.dirname(torch.__file__))"}):trim()
151151
local PYTHON_INCLUDE = os.iorunv("python", {"-c", "import sysconfig; print(sysconfig.get_paths()['include'])"}):trim()

0 commit comments

Comments
 (0)