* cmake : fix CUDA build
-Werror=vla needs to be passed to the host compiler.
* cmake : enable warnings for ggml-cuda.cu
* ggml : fix some unused variable warnings
-cmake_minimum_required (VERSION 3.0)
+cmake_minimum_required (VERSION 3.3)
project(ggml VERSION 0.1.0)
set(CMAKE_EXPORT_COMPILE_COMMANDS "on")
endif()
if (NOT MSVC)
- add_compile_options(-Werror=vla)
+ add_compile_options(
+ "$<$<COMPILE_LANGUAGE:C>:-Werror=vla>"
+ "$<$<COMPILE_LANGUAGE:CXX>:-Werror=vla>"
+ "$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler;-Werror=vla>"
+ )
endif()
# dependencies
if (GGML_ALL_WARNINGS)
if (NOT MSVC)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
- -Wunused \
- -Wextra \
- -Wshadow \
- -Wcast-qual \
- -Wdouble-promotion \
- -Wno-unused-function \
- -Wmissing-prototypes \
- ")
+ add_compile_options(-Wunused -Wextra -Wcast-qual -Wdouble-promotion)
+ add_compile_options("$<$<COMPILE_LANGUAGE:C>:-Wshadow;-Wno-unused-function;-Wmissing-prototypes>")
else()
# todo : windows
endif()
(void) src1;
(void) src0_ddq_i;
(void) src1_ddf_i;
+ (void) i02;
(void) i1;
}
#endif
}
#else
+ (void)nb;
// scalar
quantize_row_q8_0_reference(x, y, k);
#endif
#endif
}
#else
+ (void)nb;
// scalar
quantize_row_q8_1_reference(x, y, k);
#endif