-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
37 lines (31 loc) · 1.18 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
all: NormCECodelets.gp custom_ops.so merge_copies.so
NormCECodelets.gp: custom_ops/NormCECodelets.cpp
popc --target=ipu2,ipu21 -DNDEBUG -O2 custom_ops/NormCECodelets.cpp custom_ops/NormCE.S custom_ops/NormCE_half_split.S -o NormCECodelets.gp
int4_to_half_codelets.gp: custom_ops/int4_to_half_codelets.cpp
popc --target=ipu2,ipu21 -DNDEBUG -O2 custom_ops/int4_to_half_codelets.cpp -o int4_to_half_codelets.gp
custom_ops.so: custom_ops/*.cpp
g++ -std=c++14 -fPIC \
-DONNX_NAMESPACE=onnx \
custom_ops/TileMappingCommon.cpp \
custom_ops/NormCE.cpp \
custom_ops/NormCEImpl.cpp \
custom_ops/softmax.cpp \
custom_ops/kv_cache.cpp \
custom_ops/kv_cache_pipeline.cpp \
custom_ops/beam_search_custom_op.cpp \
custom_ops/matmul_fp8.cpp \
custom_ops/cast_to_uint8.cpp \
custom_ops/int4_to_half_custom_op.cpp \
-shared -lpopart -lpoplar -lpoplin -lpopnn -lpopops -lpoputil -lpoprand \
-o custom_ops.so
merge_copies.so :
g++ -std=c++14 -fPIC \
-DONNX_NAMESPACE=onnx \
custom_ops/merge_copies/custom_transform.cpp \
-I custom_ops/merge_copies/ \
-shared \
-lpopart \
-o merge_copies.so
.PHONY : clean
clean:
-rm custom_ops.so NormCECodelets.gp merge_copies.so