mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-04 00:06:38 +08:00
[FIX]Fix Machete compile via ENABLE_MACHETE (#3727)
* add ENABLE_MACHETE * fix * revert * update * pre_commit * fix * fix --------- Co-authored-by: Ayakouji <yuhongh@qq.com> Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com> Co-authored-by: aquagull <hongyuh@qq.com>
This commit is contained in:
@@ -373,6 +373,7 @@ elif paddle.is_compiled_with_cuda():
|
||||
if not os.listdir(json_dir):
|
||||
raise ValueError("Git clone nlohmann_json failed!")
|
||||
|
||||
cc_compile_args = []
|
||||
nvcc_compile_args = get_gencode_flags(archs)
|
||||
nvcc_compile_args += ["-DPADDLE_DEV"]
|
||||
nvcc_compile_args += ["-DPADDLE_ON_INFERENCE"]
|
||||
@@ -519,12 +520,13 @@ elif paddle.is_compiled_with_cuda():
|
||||
sources += find_end_files("gpu_ops/wfp8afp8_sparse_gemm", ".cu")
|
||||
os.system("python gpu_ops/machete/generate.py")
|
||||
sources += find_end_files("gpu_ops/machete", ".cu")
|
||||
cc_compile_args += ["-DENABLE_MACHETE"]
|
||||
|
||||
setup(
|
||||
name="fastdeploy_ops",
|
||||
ext_modules=CUDAExtension(
|
||||
sources=sources,
|
||||
extra_compile_args={"nvcc": nvcc_compile_args},
|
||||
extra_compile_args={"cxx": cc_compile_args, "nvcc": nvcc_compile_args},
|
||||
libraries=["cublasLt"],
|
||||
extra_link_args=["-lcuda"],
|
||||
),
|
||||
|
Reference in New Issue
Block a user