Skip to content

Commit 0cb40b6

Browse files
committed
modify the config for build
1 parent 69050a1 commit 0cb40b6

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

common/CMakeLists.txt

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@ llama_add_compile_flags()
77
# Build info header
88
#
99

10-
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../.git")
11-
set(GIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.git")
12-
13-
# Is git submodule
14-
if(NOT IS_DIRECTORY "${GIT_DIR}")
15-
file(READ ${GIT_DIR} REAL_GIT_DIR_LINK)
16-
string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" REAL_GIT_DIR ${REAL_GIT_DIR_LINK})
17-
string(FIND "${REAL_GIT_DIR}" "/" SLASH_POS)
18-
if (SLASH_POS EQUAL 0)
19-
set(GIT_DIR "${REAL_GIT_DIR}")
20-
else()
21-
set(GIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${REAL_GIT_DIR}")
22-
endif()
23-
endif()
24-
25-
if(EXISTS "${GIT_DIR}/index")
26-
set(GIT_INDEX "${GIT_DIR}/index")
27-
else()
28-
message(WARNING "Git index not found in git repository.")
29-
set(GIT_INDEX "")
30-
endif()
31-
else()
32-
message(WARNING "Git repository not found; to enable automatic generation of build info, make sure Git is installed and the project is a Git repository.")
33-
set(GIT_INDEX "")
34-
endif()
10+
#if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../.git")
11+
# set(GIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.git")
12+
#
13+
# # Is git submodule
14+
# if(NOT IS_DIRECTORY "${GIT_DIR}")
15+
# file(READ ${GIT_DIR} REAL_GIT_DIR_LINK)
16+
# string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" REAL_GIT_DIR ${REAL_GIT_DIR_LINK})
17+
# string(FIND "${REAL_GIT_DIR}" "/" SLASH_POS)
18+
# if (SLASH_POS EQUAL 0)
19+
# set(GIT_DIR "${REAL_GIT_DIR}")
20+
# else()
21+
# set(GIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${REAL_GIT_DIR}")
22+
# endif()
23+
# endif()
24+
#
25+
# if(EXISTS "${GIT_DIR}/index")
26+
# set(GIT_INDEX "${GIT_DIR}/index")
27+
# else()
28+
# message(WARNING "Git index not found in git repository.")
29+
# set(GIT_INDEX "")
30+
# endif()
31+
#else()
32+
# message(WARNING "Git repository not found; to enable automatic generation of build info, make sure Git is installed and the project is a Git repository.")
33+
# set(GIT_INDEX "")
34+
#endif()
3535

3636
# Add a custom command to rebuild build-info.cpp when .git/index changes
3737
add_custom_command(

examples/simple/simple.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static void print_usage(int, char ** argv) {
1212

1313
int main(int argc, char ** argv) {
1414
// path to the model gguf file
15-
std::string model_path;
15+
std::string model_path = "/home/yhj/cuda_code/chkpoint/Qwen-gguf/Qwen-0.5B.gguf";
1616
// prompt to generate text from
1717
std::string prompt = "Hello my name is";
1818
// number of layers to offload to the GPU

ggml/src/ggml-cuda/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ if (CUDAToolkit_FOUND)
5353

5454
add_compile_definitions(GGML_CUDA_PEER_MAX_BATCH_SIZE=${GGML_CUDA_PEER_MAX_BATCH_SIZE})
5555

56-
if (GGML_CUDA_GRAPHS)
57-
add_compile_definitions(GGML_CUDA_USE_GRAPHS)
58-
endif()
56+
# if (GGML_CUDA_GRAPHS)
57+
# add_compile_definitions(GGML_CUDA_USE_GRAPHS)
58+
# endif()
5959

6060
if (GGML_CUDA_FORCE_MMQ)
6161
add_compile_definitions(GGML_CUDA_FORCE_MMQ)

0 commit comments

Comments
 (0)