mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 08:12:37 +01:00
ircd: Add amdgcn--amdhsa build recipes.
This commit is contained in:
parent
ac163274f1
commit
071e108eac
1 changed files with 38 additions and 0 deletions
|
@ -458,6 +458,44 @@ libircd_la_SOURCES += gpt_gpu.spv.cc
|
|||
gpt_gpu.spv.cc: gpt_gpu.spv
|
||||
xxd -i $^ $@
|
||||
|
||||
#
|
||||
# GCN-HSA
|
||||
#
|
||||
|
||||
GCN_HSA_TARGET = amdgcn--amdhsa
|
||||
|
||||
GCN_HSA_CPPFLAGS = $(GPU_CPPFLAGS)
|
||||
GCN_HSA_CPPFLAGS += -D__OPENCL_VERSION__=200
|
||||
|
||||
GCN_HSA_CFLAGS = $(GPU_CFLAGS)
|
||||
GCN_HSA_CFLAGS += -std=cl2.0
|
||||
GCN_HSA_CFLAGS += -target $(GCN_HSA_TARGET)
|
||||
GCN_HSA_CFLAGS += -nogpulib
|
||||
GCN_HSA_CFLAGS += -march=amdgcn
|
||||
GCN_HSA_CFLAGS += -Xclang -mlink-bitcode-file -Xclang /usr/lib/clc/amdgcn--amdhsa.bc
|
||||
|
||||
BUILT_SOURCES += gpt_gpu.gcn_hsa.bc
|
||||
gpt_gpu.gcn_hsa.bc: gpt_gpu.cl
|
||||
$(CC) $(GCN_HSA_CFLAGS) $(GCN_HSA_CPPFLAGS) -emit-llvm -o $@ -x cl -c $^
|
||||
|
||||
BUILT_SOURCES += gpt_gpu.gcn_hsa.link.bc
|
||||
gpt_gpu.gcn_hsa.link.bc: gpt_gpu.gcn_hsa.bc
|
||||
llvm-link-14 $(GPU_LINKFLAGS) -o $@ $^ /usr/lib/clc/amdgcn--amdhsa.bc
|
||||
opt-14 $(GPU_OPTFLAGS) -o $@ $@
|
||||
|
||||
#BUILT_SOURCES += gpt_gpu.gcn_hsa.s
|
||||
gpt_gpu.gcn_hsa.s: gpt_gpu.gcn_hsa.link.bc
|
||||
$(CC) -cc1 $(GPU_ASFLAGS) -triple $(GCN_HSA_TARGET) -emit-obj -S -o $@ -x ir $^
|
||||
|
||||
#BUILT_SOURCES += gpt_gpu.gcn_hsa.o
|
||||
gpt_gpu.gcn_hsa.o: gpt_gpu.gcn_hsa.link.bc
|
||||
$(CC) -cc1 $(GPU_ASFLAGS) -triple $(GCN_HSA_TARGET) -emit-obj -o $@ -x ir $^
|
||||
|
||||
CLEANFILES += gpt_gpu.gcn_hsa.bc.cc
|
||||
libircd_la_SOURCES += gpt_gpu.gcn_hsa.bc.cc
|
||||
gpt_gpu.gcn_hsa.bc.cc: gpt_gpu.gcn_hsa.bc
|
||||
xxd -i $^ $@
|
||||
|
||||
#
|
||||
# R600
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue