Skip to content

Commit a9602c0

Browse files
authored
This commit changes the naming conventioins of the shared object file… (ggml-org#48)
* This commit changes the naming conventioins of the shared object files. This modificatioin will produce libfalcon.so instead of liblibfalcon.so which would create downstreem bugs. * This commit renames the falcon.cpp and falcon.h files the libfalcon.cpp and libfalcon.h. It produces shared object files that maintain the standard file format of libfalcon.so
1 parent 144eab3 commit a9602c0

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ target_link_libraries(llama PRIVATE
491491
)
492492

493493
# falcon
494-
add_library(libfalcon
494+
add_library(falcon
495495
libfalcon.cpp
496496
libfalcon.h
497497
llama-util.h
@@ -500,9 +500,9 @@ add_library(cmpnct_unicode
500500
cmpnct_unicode.cpp
501501
cmpnct_unicode.h
502502
)
503-
target_include_directories(libfalcon PUBLIC .)
504-
target_compile_features(libfalcon PUBLIC cxx_std_11) # don't bump
505-
target_link_libraries(libfalcon PRIVATE
503+
target_include_directories(falcon PUBLIC .)
504+
target_compile_features(falcon PUBLIC cxx_std_11) # don't bump
505+
target_link_libraries(falcon PRIVATE
506506
cmpnct_unicode
507507
ggml
508508
${LLAMA_EXTRA_LIBS}
@@ -517,10 +517,10 @@ if (BUILD_SHARED_LIBS)
517517
endif()
518518

519519
# falcon
520-
set_target_properties(libfalcon PROPERTIES POSITION_INDEPENDENT_CODE ON)
521-
target_compile_definitions(libfalcon PRIVATE LLAMA_SHARED LLAMA_BUILD)
520+
set_target_properties(falcon PROPERTIES POSITION_INDEPENDENT_CODE ON)
521+
target_compile_definitions(falcon PRIVATE LLAMA_SHARED LLAMA_BUILD)
522522
if (LLAMA_METAL)
523-
set_target_properties(libfalcon PROPERTIES RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/ggml-metal.metal")
523+
set_target_properties(falcon PROPERTIES RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/ggml-metal.metal")
524524
endif()
525525
#
526526
endif()
@@ -531,7 +531,7 @@ if (GGML_SOURCES_CUDA)
531531
set_property(TARGET ggml PROPERTY CUDA_SELECT_NVCC_ARCH_FLAGS "Auto")
532532
set_property(TARGET llama PROPERTY CUDA_ARCHITECTURES OFF)
533533
# falcon
534-
set_property(TARGET libfalcon PROPERTY CUDA_ARCHITECTURES OFF)
534+
set_property(TARGET falcon PROPERTY CUDA_ARCHITECTURES OFF)
535535

536536
endif()
537537

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ llama.o: llama.cpp ggml.h ggml-cuda.h llama.h llama-util.h
254254
cmpnct_unicode.o: cmpnct_unicode.cpp cmpnct_unicode.h
255255
$(CXX) $(CXXFLAGS) -c $< -o $@
256256

257-
libfalcon.o: libfalcon.cpp ggml.h ggml-cuda.h libfalcon.h llama-util.h cmpnct_unicode.h
257+
falcon.o: falcon.cpp ggml.h ggml-cuda.h falcon.h llama-util.h cmpnct_unicode.h
258258
$(CXX) $(CXXFLAGS) -c $< -o $@
259259

260260
common.o: examples/common.cpp examples/common.h
@@ -285,17 +285,17 @@ simple: examples/simple/simple.cpp build-info.h ggml.
285285
quantize: examples/quantize/quantize.cpp build-info.h ggml.o llama.o $(OBJS)
286286
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
287287

288-
falcon_main: examples/falcon/falcon_main.cpp build-info.h ggml.o libfalcon.o libfalcon.o cmpnct_unicode.o falcon_common.o $(OBJS)
288+
falcon_main: examples/falcon/falcon_main.cpp build-info.h ggml.o falcon.o falcon.o cmpnct_unicode.o falcon_common.o $(OBJS)
289289
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
290290
@echo
291291
@echo '==== Run ./falcon_main -h for help. ===='
292292
@echo 'Read the readme file for important parameters and usage'
293293
@echo
294294

295-
falcon_quantize: examples/falcon_quantize/quantize.cpp build-info.h ggml.o libfalcon.o libfalcon.o cmpnct_unicode.o $(OBJS)
295+
falcon_quantize: examples/falcon_quantize/quantize.cpp build-info.h ggml.o falcon.o falcon.o cmpnct_unicode.o $(OBJS)
296296
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
297297

298-
falcon_perplexity: examples/falcon_perplexity/falcon_perplexity.cpp build-info.h ggml.o libfalcon.o libfalcon.o falcon_common.o cmpnct_unicode.o $(OBJS)
298+
falcon_perplexity: examples/falcon_perplexity/falcon_perplexity.cpp build-info.h ggml.o falcon.o falcon.o falcon_common.o cmpnct_unicode.o $(OBJS)
299299
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
300300

301301

examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ endif()
3939

4040
target_include_directories(${FALCON_TARGET} PUBLIC .)
4141
target_compile_features(${FALCON_TARGET} PUBLIC cxx_std_11)
42-
target_link_libraries(${FALCON_TARGET} PRIVATE libfalcon)
42+
target_link_libraries(${FALCON_TARGET} PRIVATE falcon)
4343

4444
# examples
4545

examples/falcon/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET falcon_main)
22
add_executable(${TARGET} falcon_main.cpp)
3-
target_link_libraries(${TARGET} PRIVATE falcon_common libfalcon ${CMAKE_THREAD_LIBS_INIT})
3+
target_link_libraries(${TARGET} PRIVATE falcon_common falcon ${CMAKE_THREAD_LIBS_INIT})
44
target_compile_features(${TARGET} PRIVATE cxx_std_11)
55
if(TARGET BUILD_INFO)
66
add_dependencies(${TARGET} BUILD_INFO)

examples/falcon_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,4 @@ void console_init(console_state & con_st);
145145
void console_cleanup(console_state & con_st);
146146
void console_set_color(console_state & con_st, console_color_t color);
147147
bool console_readline(console_state & con_st, std::string & line);
148-
#endif
148+
#endif

examples/falcon_perplexity/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET falcon_perplexity)
22
add_executable(${TARGET} falcon_perplexity.cpp)
3-
target_link_libraries(${TARGET} PRIVATE falcon_common libfalcon ${CMAKE_THREAD_LIBS_INIT})
3+
target_link_libraries(${TARGET} PRIVATE falcon_common falcon ${CMAKE_THREAD_LIBS_INIT})
44
target_compile_features(${TARGET} PRIVATE cxx_std_11)
55
if(TARGET BUILD_INFO)
66
add_dependencies(${TARGET} BUILD_INFO)

examples/falcon_quantize/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET falcon_quantize)
22
add_executable(${TARGET} quantize.cpp)
3-
target_link_libraries(${TARGET} PRIVATE libfalcon ${CMAKE_THREAD_LIBS_INIT})
3+
target_link_libraries(${TARGET} PRIVATE falcon ${CMAKE_THREAD_LIBS_INIT})
44
target_compile_features(${TARGET} PRIVATE cxx_std_11)
55
if(TARGET BUILD_INFO)
66
add_dependencies(${TARGET} BUILD_INFO)

models/ggml-vocab.bin

-422 KB
Binary file not shown.

0 commit comments

Comments
 (0)