if (EMSCRIPTEN)
set_target_properties(${GGML_CPU_NAME} PROPERTIES COMPILE_FLAGS "-msimd128")
endif()
+
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
+ # The compiler automatically enables "-ffast-math" which can cause NaNs in tests due to "-fassociative-math"
+ target_compile_options(${GGML_CPU_NAME} PRIVATE "-fno-associative-math")
+ endif()
endfunction()
case GGML_UNARY_OP_GELU_QUICK:
case GGML_UNARY_OP_GELU_ERF:
case GGML_UNARY_OP_TANH:
+ case GGML_UNARY_OP_EXP:
case GGML_UNARY_OP_SGN:
case GGML_UNARY_OP_ABS:
case GGML_UNARY_OP_ELU:
#else
return ggml_is_contiguous(op->src[0]) && (op->src[0]->type == GGML_TYPE_F32 && op->type == GGML_TYPE_F32) && (op->type == op->src[0]->type);
#endif
- case GGML_UNARY_OP_EXP:
- // Disable FP16 until we find out the root cause of failing fp16 sycl::exp
- return ggml_is_contiguous(op->src[0]) && (op->type == op->src[0]->type) && op->src[0]->type == GGML_TYPE_F32;
default:
return false;
}