fix compile errors on cuda
This commit is contained in:
parent
33528f5b1d
commit
60e0c67874
2 changed files with 10 additions and 10 deletions
|
@ -322,6 +322,6 @@ target_compile_features(${TARGET} PUBLIC cxx_std_11) # don't bump
|
||||||
set_target_properties(${TARGET} PROPERTIES PREFIX "")
|
set_target_properties(${TARGET} PROPERTIES PREFIX "")
|
||||||
set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME "koboldcpp")
|
set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME "koboldcpp")
|
||||||
set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||||
target_link_libraries(${TARGET} PUBLIC ggml ggml_v1 common2 gpttype_adapter ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(${TARGET} PUBLIC ggml ggml_v1 ggml_v2 common2 gpttype_adapter ${CMAKE_THREAD_LIBS_INIT})
|
||||||
target_compile_features(${TARGET} PRIVATE cxx_std_11)
|
target_compile_features(${TARGET} PRIVATE cxx_std_11)
|
||||||
|
|
||||||
|
|
|
@ -3893,7 +3893,7 @@ struct ggml_v2_context * ggml_v2_init(struct ggml_v2_init_params params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(GGML_USE_CUBLAS)
|
#if defined(GGML_USE_CUBLAS)
|
||||||
ggml_v2_init_cublas();
|
ggml_init_cublas();
|
||||||
#elif defined(GGML_USE_CLBLAST)
|
#elif defined(GGML_USE_CLBLAST)
|
||||||
if(quants_unshuffled)
|
if(quants_unshuffled)
|
||||||
{
|
{
|
||||||
|
@ -9447,9 +9447,9 @@ static void ggml_v2_compute_forward_mul_mat_f32(
|
||||||
// compute by src0 rows
|
// compute by src0 rows
|
||||||
|
|
||||||
#if defined(GGML_USE_CUBLAS)
|
#if defined(GGML_USE_CUBLAS)
|
||||||
if (ggml_v2_cuda_can_mul_mat(src0, src1, dst)) {
|
if (ggml_cuda_can_mul_mat(src0, src1, dst)) {
|
||||||
if (params->ith == 0 && params->type == GGML_V2_TASK_COMPUTE) {
|
if (params->ith == 0 && params->type == GGML_V2_TASK_COMPUTE) {
|
||||||
ggml_v2_cuda_mul_mat(src0, src1, dst, params->wdata, params->wsize);
|
ggml_cuda_mul_mat(src0, src1, dst, params->wdata, params->wsize);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -9641,9 +9641,9 @@ static void ggml_v2_compute_forward_mul_mat_f16_f32(
|
||||||
// compute by src0 rows
|
// compute by src0 rows
|
||||||
|
|
||||||
#if defined(GGML_USE_CUBLAS)
|
#if defined(GGML_USE_CUBLAS)
|
||||||
if (ggml_v2_cuda_can_mul_mat(src0, src1, dst)) {
|
if (ggml_cuda_can_mul_mat(src0, src1, dst)) {
|
||||||
if (params->ith == 0 && params->type == GGML_V2_TASK_COMPUTE) {
|
if (params->ith == 0 && params->type == GGML_V2_TASK_COMPUTE) {
|
||||||
ggml_v2_cuda_mul_mat(src0, src1, dst, params->wdata, params->wsize);
|
ggml_cuda_mul_mat(src0, src1, dst, params->wdata, params->wsize);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -9880,9 +9880,9 @@ static void ggml_v2_compute_forward_mul_mat_q_f32(
|
||||||
// compute by src0 rows
|
// compute by src0 rows
|
||||||
|
|
||||||
#if defined(GGML_USE_CUBLAS)
|
#if defined(GGML_USE_CUBLAS)
|
||||||
if (ggml_v2_cuda_can_mul_mat(src0, src1, dst)) {
|
if (ggml_cuda_can_mul_mat(src0, src1, dst)) {
|
||||||
if (params->ith == 0 && params->type == GGML_V2_TASK_COMPUTE) {
|
if (params->ith == 0 && params->type == GGML_V2_TASK_COMPUTE) {
|
||||||
ggml_v2_cuda_mul_mat(src0, src1, dst, params->wdata, params->wsize);
|
ggml_cuda_mul_mat(src0, src1, dst, params->wdata, params->wsize);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -14060,10 +14060,10 @@ void ggml_v2_graph_compute(struct ggml_v2_context * ctx, struct ggml_v2_cgraph *
|
||||||
size_t cur = 0;
|
size_t cur = 0;
|
||||||
|
|
||||||
#if defined(GGML_USE_CUBLAS)
|
#if defined(GGML_USE_CUBLAS)
|
||||||
if (ggml_v2_cuda_can_mul_mat(node->src0, node->src1, node)) {
|
if (ggml_cuda_can_mul_mat(node->src0, node->src1, node)) {
|
||||||
node->n_tasks = 1; // TODO: this actually is doing nothing
|
node->n_tasks = 1; // TODO: this actually is doing nothing
|
||||||
// the threads are still spinning
|
// the threads are still spinning
|
||||||
cur = ggml_v2_cuda_mul_mat_get_wsize(node->src0, node->src1, node);
|
cur = ggml_cuda_mul_mat_get_wsize(node->src0, node->src1, node);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#elif defined(GGML_USE_CLBLAST)
|
#elif defined(GGML_USE_CLBLAST)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue