Add error-checking for py binding, add missing include+hwasan check

PiperOrigin-RevId: 628453112
This commit is contained in:
Jan Wassenberg 2024-04-26 10:59:05 -07:00 committed by Copybara-Service
parent e8f59bb411
commit 7a12e29027
2 changed files with 6 additions and 0 deletions

View File

@ -89,6 +89,7 @@ cc_library(
deps = [
":args",
":gemma_lib",
"//compression:io",
"@hwy//:hwy",
],
)

View File

@ -31,6 +31,7 @@
#include <algorithm> // std::clamp
#include <thread> // NOLINT>
#include "compression/io.h" // Path
#include "gemma/configs.h"
#include "gemma/gemma.h"
#include "util/args.h"
@ -45,6 +46,10 @@ static inline const char* CompiledConfig() {
return "msan";
} else if (HWY_IS_TSAN) {
return "tsan";
#if defined(HWY_IS_HWASAN)
} else if (HWY_IS_HWASAN) {
return "hwasan";
#endif
#if defined(HWY_IS_UBSAN)
} else if (HWY_IS_UBSAN) {
return "ubsan";