compiler warnings are errors (#1870)

This commit is contained in:
Awni Hannun 2025-02-17 00:07:49 -08:00 committed by GitHub
parent 1762793989
commit 5274c3c43f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,6 @@ endif()
add_compile_definitions("MLX_VERSION=${MLX_VERSION}")
# --------------------- Processor tests -------------------------
message(
STATUS
"Building MLX for ${CMAKE_SYSTEM_PROCESSOR} processor on ${CMAKE_SYSTEM_NAME}"
@ -64,6 +63,7 @@ include(FetchContent)
cmake_policy(SET CMP0135 NEW)
add_library(mlx)
set_target_properties(mlx PROPERTIES COMPILE_WARNING_AS_ERROR ON)
if(MLX_BUILD_METAL)
set(METAL_LIB "-framework Metal")

View File

@ -43,6 +43,8 @@ void matmul_bnns(
BNNSDataType bnns_dtype = to_bnns_dtype(out.dtype());
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
const BNNSLayerParametersBroadcastMatMul gemm_params{
/* float alpha = */ alpha,
/* float beta = */ beta,
@ -124,6 +126,7 @@ void matmul_bnns(
}
BNNSFilterDestroy(bnns_filter);
#pragma GCC diagnostic pop
}
template <>