File tree Expand file tree Collapse file tree 4 files changed +13
-8
lines changed
Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ INSTALL=install
1212TS_OBJ = redisai.o tensor.o graph.o
1313
1414INCLUDE_FLAGS =-I $(DEPS_PATH ) /redis/src \
15+ -I . \
16+ -I backends \
1517 -I $(DEPS_PATH ) /dlpack/include \
1618
1719ifeq ($(shell uname) ,Linux)
2527endif
2628
2729# Tensorflow backend
28- TS_OBJ += backends_tensorflow .o
30+ TS_OBJ += backends/tensorflow_backend .o
2931FINAL_LDFLAGS += -ltensorflow
3032INCLUDE_FLAGS += -I $(DEPS_PATH ) /libtensorflow/include
3133LDPATH_FLAGS += -L $(DEPS_PATH ) /libtensorflow/lib
@@ -34,13 +36,16 @@ BACKEND_INSTALL += $(INSTALL) $(DEPS_PATH)/libtensorflow/lib/libtensorflow*.so $
3436all : redisai.so
3537
3638% .o : % .c
37- $(TS_CC ) $(INCLUDE_FLAGS ) -c $(FINAL_CFLAGS ) $<
39+ $(TS_CC ) $(INCLUDE_FLAGS ) -c $(FINAL_CFLAGS ) $< -o $@
40+
41+ % .o : backends/% .c
42+ $(TS_CC ) $(INCLUDE_FLAGS ) -c $(FINAL_CFLAGS ) $< -o backends/$@
3843
3944redisai.so : $(TS_OBJ )
4045 $(TS_LD ) $(LDPATH_FLAGS ) $(FINAL_LDFLAGS ) -o redisai.so $(TS_OBJ )
4146
4247clean :
43- rm * .o * .so
48+ rm * .o backends/ * .o * .so
4449
4550cleaninst :
4651 rm -rf $(INSTALL_PATH )
Original file line number Diff line number Diff line change 1- #include "backends_tensorflow .h"
1+ #include "tensorflow_backend .h"
22#include "tensor.h"
33#include "utils/arr_rm_alloc.h"
44
Original file line number Diff line number Diff line change 1- #ifndef SRC_BACKENDS_TENSORFLOW_H_
2- #define SRC_BACKENDS_TENSORFLOW_H_
1+ #ifndef SRC_TENSORFLOW_BACKEND_H_
2+ #define SRC_TENSORFLOW_BACKEND_H_
33
44#include "config.h"
55#include "tensor_struct.h"
@@ -18,4 +18,4 @@ void RAI_GraphFreeTF(RAI_Graph* graph);
1818
1919int RAI_GraphRunTF (RAI_GraphRunCtx * gctx );
2020
21- #endif /* SRC_BACKENDS_TENSORFLOW_H_ */
21+ #endif /* SRC_TENSORFLOW_BACKEND_H_ */
Original file line number Diff line number Diff line change 22#include "graph_struct.h"
33
44#ifdef RAI_TENSORFLOW_BACKEND
5- #include "backends_tensorflow .h"
5+ #include "backends/tensorflow_backend .h"
66#endif /* RAI_TENSORFLOW_BACKEND */
77
88#include "utils/arr_rm_alloc.h"
You can’t perform that action at this time.
0 commit comments