0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-12 13:01:07 +01:00

ircd: Makefile variables for GPU toolchain.

This commit is contained in:
Jason Volk 2023-02-11 14:05:01 -08:00
parent 57305563e7
commit 0b8f1c0a9f

View file

@ -356,6 +356,10 @@ endif
if CLANG if CLANG
if OPENCL if OPENCL
GPU_OPT = opt-${CXX_EPOCH}
GPU_LINK = llvm-link-${CXX_EPOCH}
GPU_SPIRV = llvm-spirv-${CXX_EPOCH}
GPU_CPPFLAGS =# GPU_CPPFLAGS =#
GPU_CPPFLAGS += -Dcl_clang_storage_class_specifiers GPU_CPPFLAGS += -Dcl_clang_storage_class_specifiers
GPU_CPPFLAGS += -DNOFP64 GPU_CPPFLAGS += -DNOFP64
@ -420,7 +424,7 @@ gpt_gpu.spv.bc: gpt_gpu.cl
BUILT_SOURCES += gpt_gpu.spv BUILT_SOURCES += gpt_gpu.spv
gpt_gpu.spv: gpt_gpu.spv.bc gpt_gpu.spv: gpt_gpu.spv.bc
llvm-spirv -o $@ $^ $(GPU_SPIRV) -o $@ $^
CLEANFILES += gpt_gpu.spv.cc CLEANFILES += gpt_gpu.spv.cc
libircd_la_SOURCES += gpt_gpu.spv.cc libircd_la_SOURCES += gpt_gpu.spv.cc
@ -449,8 +453,8 @@ gpt_gpu.gcn_hsa.bc: gpt_gpu.cl
BUILT_SOURCES += gpt_gpu.gcn_hsa.link.bc BUILT_SOURCES += gpt_gpu.gcn_hsa.link.bc
gpt_gpu.gcn_hsa.link.bc: gpt_gpu.gcn_hsa.bc gpt_gpu.gcn_hsa.link.bc: gpt_gpu.gcn_hsa.bc
llvm-link-14 $(GPU_LINKFLAGS) -o $@ $^ /usr/lib/clc/amdgcn--amdhsa.bc $(GPU_LINK) $(GPU_LINKFLAGS) -o $@ $^ /usr/lib/clc/amdgcn--amdhsa.bc
opt-14 $(GPU_OPTFLAGS) -o $@ $@ $(GPU_OPT) $(GPU_OPTFLAGS) -o $@ $@
#BUILT_SOURCES += gpt_gpu.gcn_hsa.s #BUILT_SOURCES += gpt_gpu.gcn_hsa.s
gpt_gpu.gcn_hsa.s: gpt_gpu.gcn_hsa.link.bc gpt_gpu.gcn_hsa.s: gpt_gpu.gcn_hsa.link.bc
@ -490,8 +494,8 @@ gpt_gpu.r600_barts.bc: gpt_gpu.cl
#BUILT_SOURCES += gpt_gpu.r600_barts.link.bc #BUILT_SOURCES += gpt_gpu.r600_barts.link.bc
gpt_gpu.r600_barts.link.bc: gpt_gpu.r600_barts.bc gpt_gpu.r600_barts.link.bc: gpt_gpu.r600_barts.bc
llvm-link-14 $(GPU_LINKFLAGS) -o $@ $^ /usr/lib/clc/barts-r600--.bc $(GPU_LINK) $(GPU_LINKFLAGS) -o $@ $^ /usr/lib/clc/barts-r600--.bc
opt-14 $(GPU_OPTFLAGS) -o $@ $@ $(GPU_OPT) $(GPU_OPTFLAGS) -o $@ $@
#BUILT_SOURCES += gpt_gpu.r600_barts.s #BUILT_SOURCES += gpt_gpu.r600_barts.s
gpt_gpu.r600_barts.s: gpt_gpu.r600_barts.link.bc gpt_gpu.r600_barts.s: gpt_gpu.r600_barts.link.bc