Commit 1fa56298 authored by wooway777's avatar wooway777
Browse files

demo131 - patch lua flags and includes

parent 7a18d241
...@@ -6,16 +6,14 @@ import infiniop.ninetoothed.build ...@@ -6,16 +6,14 @@ import infiniop.ninetoothed.build
import torch import torch
import os
def build():
if torch.cuda.is_available(): def build():
device_count = torch.cuda.device_count()
for i in range(device_count):
device_name = torch.cuda.get_device_name(i).lower()
if "metax" in device_name: env_vars_to_check = ["MACA_HOME", "MACA_PATH", "MACA_ROOT"]
return if any(var in os.environ for var in env_vars_to_check):
return
with_kv_cache_values = (0,) with_kv_cache_values = (0,)
emb_dim_values = (16, 32, 64, 128, 256) emb_dim_values = (16, 32, 64, 128, 256)
......
...@@ -77,7 +77,7 @@ target("infiniop-hygon") ...@@ -77,7 +77,7 @@ target("infiniop-hygon")
add_files("../src/infiniop/ops/swiglu/nvidia/*.cu") add_files("../src/infiniop/ops/swiglu/nvidia/*.cu")
if has_config("ninetoothed") then if has_config("ninetoothed") then
add_files("../build/ninetoothed/*.c", {cxxflags = {"-Wno-return-type"}}) add_files("../build/ninetoothed/*.c", "../build/ninetoothed/*.cpp", {cxxflags = {"-Wno-return-type"}})
end end
target_end() target_end()
......
...@@ -58,7 +58,7 @@ target("infiniop-iluvatar") ...@@ -58,7 +58,7 @@ target("infiniop-iluvatar")
add_files("../src/infiniop/ops/dequantize_awq/iluvatar/*.cu") add_files("../src/infiniop/ops/dequantize_awq/iluvatar/*.cu")
if has_config("ninetoothed") then if has_config("ninetoothed") then
add_files("../build/ninetoothed/*.c", {cxxflags = {"-Wno-return-type"}}) add_files("../build/ninetoothed/*.c", "../build/ninetoothed/*.cpp", {cxxflags = {"-Wno-return-type"}})
end end
target_end() target_end()
......
...@@ -54,7 +54,7 @@ target("infiniop-metax") ...@@ -54,7 +54,7 @@ target("infiniop-metax")
if has_config("ninetoothed") then if has_config("ninetoothed") then
add_includedirs(MACA_ROOT .. "/include/mcr") add_includedirs(MACA_ROOT .. "/include/mcr")
add_files("../build/ninetoothed/*.c", { add_files("../build/ninetoothed/*.c", "../build/ninetoothed/*.cpp", {
cxflags = { cxflags = {
"-include stdlib.h", "-include stdlib.h",
"-Wno-return-type", "-Wno-return-type",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment